> > > @@ -1864,7 +1874,10 @@ pmd_load_queues(struct pmd_thread *f, > > index = 0; > > > > CMAP_FOR_EACH (port, node, &f->dp->ports) { > > - if (netdev_is_pmd(port->netdev)) { > > + /* Calls port_try_ref() to prevent the main thread > > + * from deleting the port. */ > > + if (netdev_is_pmd(port->netdev) > > + && port_try_ref(port)) { > > int i; > > > port_try_ref() check should be first in the condition. > > Otherwise looks good. > Acked-by: Pravin B Shelar <pshe...@nicira.com> > >
Could you explain more about why? if port_try_ref() is called first, then we will try reference the both dpdk and non_dpdk port. And we need to un-reference the port outside the if statement. However, when we try to un-reference the port, we dont know if the reference succeeds. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev