[v2,5/6] examples/l3fwd-power: block attempts to use owned ports
Checks
Commit Message
If a ethdev port is in use for a sub device, then it should not
be allowed in the portmask of l3fwd.
Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
Cc: matan@mellanox.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/l3fwd-power/main.c | 4 ++++
1 file changed, 4 insertions(+)
@@ -1396,6 +1396,10 @@ check_port_config(void)
portid);
return -1;
}
+ if (rte_eth_dev_is_owned(portid)) {
+ printf("port %u is already in use\n", portid);
+ return -1;
+ }
}
return 0;
}