Hey Han, Yes, you are right. I'll take your suggestion,
Thanks, Alex Wang, On Thu, Mar 6, 2014 at 5:44 AM, Han Zhou <zhou...@gmail.com> wrote: > Hi Alex, > > On Thu, 2014-02-27 at 11:44 -0800, Alex Wang wrote: > > > static int > > -dpif_linux_recv_set__(struct dpif *dpif_, bool enable) > > +dpif_linux_recv_set__(struct dpif *dpif_, bool enable, uint32_t > n_handlers) > > { > > struct dpif_linux *dpif = dpif_linux_cast(dpif_); > > > > - if ((dpif->epoll_fd >= 0) == enable) { > > + if ((dpif->epolls != NULL) == enable) { > > + if (enable && dpif->n_handlers != n_handlers) { > > + dpif_linux_refresh_channels(dpif_, n_handlers); > > This makes dpif_linux_handlers_set() never return error, even if > something wrong in dpif_linux_refresh_channels(). This trap could be > avoided by removing n_handlers from recv_set(), and let handlers_set() > do the n_handlers update. > > > + } > > return 0; > > } else if (!enable) { > > - destroy_channels(dpif); > > + destroy_all_channels(dpif); > > return 0; > > } else { > > - return dpif_linux_refresh_channels(dpif_); > > + return dpif_linux_refresh_channels(dpif_, n_handlers); > > } > > } > > > > Best regards, > Han > >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev