Skip to content

checking for owned ports in portmask

Stephen Hemminger dpdk-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 3 repliesIn review
  2. v26 patches 4 repliesSuperseded
  3. v17 patches 2 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6rte_ethdev: change rte_eth_dev_owner_get to return error if unowneddrivers/net/failsafe/failsafe_eal.c drivers/net/netvsc/hn_vf.c lib/librte_ethdev/rte_ethdev.c +1 more+14 -111 reply
2/6examples/l2fwd-cat: make applicaton aware of port ownershipexamples/l2fwd-cat/Makefile examples/l2fwd-cat/l2fwd-cat.c examples/l2fwd-cat/meson.build+6 -01 reply
3/6examples/l3fwd: make applicaton aware of port ownershipexamples/l3fwd/Makefile examples/l3fwd/main.c examples/l3fwd/meson.build+9 -00 replies
4/6examples/l3fwd-acl: make applicaton aware of port ownershipexamples/l3fwd-acl/Makefile examples/l3fwd-acl/main.c examples/l3fwd-acl/meson.build+8 -00 replies
5/6examples/l3fwd-power: make applicaton aware of port ownershipexamples/l3fwd-power/main.c+4 -00 replies
6/6examples/tep_termination: rework the port setup logicexamples/tep_termination/Makefile examples/tep_termination/main.c examples/tep_termination/meson.build+28 -451 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [dpdk-dev] [PATCH v3 0/6] checking for owned ports in portmask

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 changes the rte_eth_dev_owner_get function so that it can be used to test for any ownership. And the follow on patches use that.

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.

v3 - use rte_eth_dev_owner_get directly, and change the function return
rework port setup in tep_termination example
v2 - rename the helper function and use rte_eth_dev_owner_get

Stephen Hemminger (6):
rte_ethdev: change rte_eth_dev_owner_get to return error if unowned examples/l2fwd-cat: make applicaton aware of port ownership examples/l3fwd: make applicaton aware of port ownership examples/l3fwd-acl: make applicaton aware of port ownership examples/l3fwd-power: make applicaton aware of port ownership examples/tep_termination: rework the port setup logic

 drivers/net/failsafe/failsafe_eal.c  |  4 +-
 drivers/net/netvsc/hn_vf.c           | 11 ++---
 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                |  5 ++
 examples/l3fwd/meson.build           |  1 +
 examples/tep_termination/Makefile    |  2 +
 examples/tep_termination/main.c      | 70 ++++++++++------------------
 examples/tep_termination/meson.build |  1 +
 lib/librte_ethdev/rte_ethdev.c       |  4 +-
 lib/librte_ethdev/rte_ethdev.h       |  6 ++-
 17 files changed, 69 insertions(+), 56 deletions(-)
Signature · 1 line
2.20.1