From: Gaëtan Rivet, Monday, January 8, 2018 1:40 PM > Hi Matan, > > On Sun, Jan 07, 2018 at 09:45:51AM +0000, Matan Azrad wrote: > > Testpmd should not use ethdev ports which are managed by other DPDK > > entities. > > > > Set Testpmd ownership to each port which is not used by other entity > > and prevent any usage of ethdev ports which are not owned by Testpmd. > > > > This patch should not be necessary. > > Ideally, your API evolution should not impact the default case. As such, the > default iterator RTE_ETH_FOREACH_DEV should still be used in testpmd. > Why? We want to adjust testpmd to the port ownership.
> RTE_ETH_FOREACH_DEV should call RTE_ETH_FOREACH_DEV_OWNED_BY, > with the default owner (meaning that it would thus iterate on the > application-owned set of device). > It will break the API (we already talked about it). There is not any default owner: Any DPDK entity includes applications must to allocate an owner ID and use it to own the ports they wants to use. The application can include more than 1 owner depends on the user needs. Each DPDK entity which can synchronize all its port usage can be a valid DPDK entity for the ownership mechanism. > This new API should avoid breaking the current code as much as possible. > Yes, but there is a real big problem in testpmd regarding ownership issue - it must be changed. The previous testpmd thought any port is for it in many places in the code. Please see a lot of discussions about port ownership in the previous version. > -- > Gaëtan Rivet > 6WIND