[dpdk-stable] [PATCH v3 2/6] examples/l2fwd-cat: make applicaton aware of port ownership
Ferruh Yigit
ferruh.yigit at intel.com
Fri Apr 10 17:47:44 CEST 2020
On 4/2/2020 6:19 PM, Stephen Hemminger wrote:
> If a ethdev port is in use for a sub device, then it should not
> be allowed in the portmask of application.
>
> Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
> Cc: matan at mellanox.com
> Cc: stable at dpdk.org
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
<...>
> @@ -42,6 +42,9 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
> if (!rte_eth_dev_is_valid_port(port))
> return -1;
>
> + if (rte_eth_dev_owner_get(port, NULL) == 0)
> + return -1;
'port_init' is called by the loop:
RTE_ETH_FOREACH_DEV(portid)
if (port_init(portid, mbuf_pool) != 0)
And 'RTE_ETH_FOREACH_DEV' already iterates only on ports not owned, so this
check is redundant.
More information about the stable
mailing list