https://bugs.dpdk.org/show_bug.cgi?id=805
Bug ID: 805 Summary: af_xdp PMD is broken with primary/secondary process Product: DPDK Version: 21.11 Hardware: All OS: Linux Status: UNCONFIRMED Severity: major Priority: Normal Component: core Assignee: dev@dpdk.org Reporter: step...@networkplumber.org Target Milestone: --- AF_XDP PMD is broken for primary/secondary process model. Both the procinfo, pdump and other applications need to be able to basic calls from secondary process. There is one bug easy bug, where af_xdp crashes when calling rte_eth_info_get() in secondary process because eth_dev->device was not set. --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -1800,6 +1800,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev) return -EINVAL; } eth_dev->dev_ops = &ops; + eth_dev->device = &dev->device; rte_eth_dev_probing_finish(eth_dev); return 0; } But there is a bigger problem when code calls rte_eth_stats_get(). The af_xdp PMD tries to send a request to kernel to get the number of missed packets; but the file descriptor is only valid in the primary process. Fixing this is much deeper and requires opening a different socket in each process, and will XDP in kernel handle this correctly? I think we should just mark AF_XDP as broken in with primary/secondary and return an error in probe in secondary process. -- You are receiving this mail because: You are the assignee for the bug.