The patchset fixes secondary process crash issue when it tries to access virtio-user pmd (e.g. via rte_eth_rx_burst).
The crash happens because the secondary process calls, at virtio_user_pmd_probe() to virtio_user_eth_dev_alloc()-> rte_eth_dev_allocate() instead of eth_dev_attach_secondary(), as it's done from rte_eth_dev_pci_probe. Therefore, the device is not properly initialized + the device data maybe overridden by the secondary process. The patchset contains 3 patches: 1. Export rte_eth_dev_attach_secondary, so non-pci drivers will be allowed to call it. 2. Fix the actual bug by calling the function during virtio_user probe. 3. Code style fixes following Yuanhan Lio's comments. Ami Sabo (3): lib/librte_ether: export secondary attach function net/virtio-user: fix multi-process issue lib/librte_ether: fix code style issues drivers/net/virtio/virtio_user_ethdev.c | 26 ++++++++++++++++---------- lib/librte_ether/rte_ethdev.c | 6 +++--- lib/librte_ether/rte_ethdev.h | 13 +++++++++++++ lib/librte_ether/rte_ether_version.map | 7 +++++++ 4 files changed, 39 insertions(+), 13 deletions(-) -- v2: * Fix code style issues following Yuanhan Liu's review. -- 2.7.4