Hello, On Sat, 6 Feb 2016, Salam Noureddine wrote:
> On Sat, Feb 6, 2016 at 10:58 AM, Julian Anastasov <j...@ssi.bg> wrote: > >> + /* call batch notifiers which act on net namespaces */ > >> + list_for_each_entry(dev, head, unreg_list) { > >> + net_add_event_list(&net_head, dev_net(dev)); > > > > Looks like we can move the above net_add_event_list with > > the comment into the previous loop after NETDEV_UNREGISTER, > > we will save some cycles. > > I didn't move it into the previous loop because the NETDEV_UNREGISTER > notifier can > end up calling rollback_registered_many (for example the vlan driver > unregistering > all vlans on top of a device) in which case we would be using the > event_list in the net > namespace. ok. May be another safe option is to call it just before NETDEV_UNREGISTER, so that if rollback_registered_many is called recursively we will have single NETDEV_UNREGISTER_BATCH call. Same should work for NETDEV_DOWN_BATCH in dev_close_many. But these are small optimizations, so it is up to you to decide. Regards -- Julian Anastasov <j...@ssi.bg>