Hi Matan, On Sat, Jan 20, 2018 at 06:14:13PM +0000, Matan Azrad wrote:
<snip> > > > > > > > @@ -1394,7 +1394,7 @@ struct cmd_config_speed_all { > > > > > > > &link_speed) < 0) > > > > > > > return; > > > > > > > > > > > > > > - RTE_ETH_FOREACH_DEV(pid) { > > > > > > > + RTE_ETH_FOREACH_DEV_OWNED_BY(pid, my_owner.id) { > > > > > > > > > > > > Why do we need all these changes? > > > > > > As I understand you changed definition of RTE_ETH_FOREACH_DEV(), > > > > > > so no testpmd should work ok default (no_owner case). > > > > > > Am I missing something here? > > > > > > > > > > Now, After Gaetan suggestion RTE_ETH_FOREACH_DEV(pid) will iterate > > > > over all valid and ownerless ports. To be clear: you did not implement what I suggested, but your own interpretation of it. Please do not write as if I validated this interpretation. Essentially, the NO_OWNER semantic is completely different from a default owner. A default owner would protect ports from race conditions and force port ownership requests to go through proper channels protected by critical sections. NO_OWNER means that anyone is free to take any ownerless port at any time. And as a result, your are thus forced here to fix this by modifying an existing application for any entity using your ownership API to function with it. This is very different from what I suggested. What I said was that I wanted the most common case to be taken care of, and for existing applications to continue working. It entails having a more complicated API, but I think this is a price we should pay. You are implementing the most common case in testpmd (the app entity creating an owner and putting its valid ports within). Your API should ease that up as much as possible before considering forcing everyone to work with it. ~*~ You implemented a way for the failsafe to capture existing ports. How does it work without the channels for requesting ports suggested above? Regards, -- Gaëtan Rivet 6WIND