The failsafe, bonding, and netvsc PMD use eth dev port ownership to control sub devices. These sub devices are hidden in the normal iteration over ports but some applications use a direct port mask. In these cases, user may still (incorrectly) try to directly use the sub devices.
This patch set introduces a helper function to check if a port is under ownership. And the follow on patches use that. IMHO this should not be marked as experimental and done as a bug fix back to DPDK 18.11 because then it will get picked up in LTS and users won't run into it on Azure. An alternative proposed in earlier discussion is to have each application try and own the port. But this solution would be more invasive, and does not handle the case if secondary process exits prematurely without releasing ownership. It makes more sense to keep the concept of ownership as strictly part of the device model and not part of the application layer. Stephen Hemminger (7): ethdev: add function to test port ownership examples/l2fwd-cat: block attempts to use owned ports examples/l3fwd: block attempts to use owned ports examples/l3fwd-acl: block attempts to use owned ports examples/l3fwd-power: block attempts to use owned ports examples/tep_termination: block attempts to use owned ports examples/vhost: block attempts to use owned ports examples/l2fwd-cat/Makefile | 2 ++ examples/l2fwd-cat/l2fwd-cat.c | 3 +++ examples/l2fwd-cat/meson.build | 1 + examples/l3fwd-acl/Makefile | 3 +++ examples/l3fwd-acl/main.c | 4 ++++ examples/l3fwd-acl/meson.build | 1 + examples/l3fwd-power/main.c | 4 ++++ examples/l3fwd/Makefile | 3 +++ examples/l3fwd/main.c | 4 ++++ examples/l3fwd/meson.build | 1 + examples/tep_termination/Makefile | 2 ++ examples/tep_termination/main.c | 2 +- examples/tep_termination/meson.build | 1 + examples/vhost/main.c | 2 +- lib/librte_ethdev/rte_ethdev.c | 9 +++++++++ lib/librte_ethdev/rte_ethdev.h | 15 +++++++++++++++ lib/librte_ethdev/rte_ethdev_version.map | 3 +++ 17 files changed, 58 insertions(+), 2 deletions(-) -- 2.20.1