Commit 506fab4
port: handle RTE_ETH_EVENT_INTR_RESET events
Register a callback for RTE_ETH_EVENT_INTR_RESET which is raised by
some DPDK drivers when the hardware requires a reset. This typically
happens when the PF driver modifies VF settings from the host side,
for example when changing a VF MAC address via ip link:
ip link set $pf vf $vf_num mac $mac
When the reset event is received, the port is fully reset and
reconfigured via rte_eth_dev_reset() followed by rte_eth_dev_configure()
and rte_eth_dev_start(). The MAC address is re-read from hardware to
pick up any changes made by the PF.
The DPDK callback may be invoked from internal threads and multiple
reset events can occur before the main event loop processes them. To
handle this, port IDs are queued in a mutex-protected vector and
processed in batch when the libevent callback fires.
Note that RTE_ETH_EVENT_INTR_RESET support varies by driver. The Intel
iavf driver reports this event when the VF MAC is changed from the PF.
The mlx5 driver does not report this event in the same scenario.
Signed-off-by: Robin Jarry <rjarry@redhat.com>
Reviewed-by: Christophe Fontaine <cfontain@redhat.com>1 parent cdc4398 commit 506fab4
2 files changed
+65
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
284 | | - | |
| 285 | + | |
285 | 286 | | |
286 | 287 | | |
287 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
288 | 294 | | |
| 295 | + | |
289 | 296 | | |
290 | 297 | | |
291 | 298 | | |
| |||
668 | 675 | | |
669 | 676 | | |
670 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
671 | 723 | | |
672 | 724 | | |
673 | 725 | | |
| |||
678 | 730 | | |
679 | 731 | | |
680 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
681 | 739 | | |
682 | 740 | | |
683 | 741 | | |
684 | 742 | | |
685 | 743 | | |
686 | 744 | | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
687 | 749 | | |
688 | 750 | | |
689 | 751 | | |
| |||
0 commit comments