Re: [PATCH v2 net-next 2/4] net: dev: add batching to net_device notifiers

2016-02-07 Thread Julian Anastasov
Hello, On Sat, 6 Feb 2016, Salam Noureddine wrote: > On Sat, Feb 6, 2016 at 10:58 AM, Julian Anastasov wrote: > >> + /* call batch notifiers which act on net namespaces */ > >> + list_for_each_entry(dev, head, unreg_list) { > >> +

Re: [PATCH v2 net-next 2/4] net: dev: add batching to net_device notifiers

2016-02-06 Thread Julian Anastasov
Hello, On Thu, 4 Feb 2016, Salam Noureddine wrote: > @@ -1572,12 +1583,17 @@ rollback: > call_netdevice_notifier(nb, NETDEV_GOING_DOWN, > dev); > call_netdevice_notifier(nb,

Re: [PATCH v2 net-next 2/4] net: dev: add batching to net_device notifiers

2016-02-06 Thread Salam Noureddine
On Sat, Feb 6, 2016 at 10:58 AM, Julian Anastasov wrote: > > I now see that we should split the loop > here, so that NETDEV_DOWN_BATCH is called only once per net: > > bool down = false; > > for_each_netdev(net, dev) { >

[PATCH v2 net-next 2/4] net: dev: add batching to net_device notifiers

2016-02-04 Thread Salam Noureddine
This can be used to optimize bringing down and unregsitering net_devices by running certain cleanup operations only on the net namespace instead of on each net_device. Signed-off-by: Salam Noureddine --- include/linux/netdevice.h | 2 ++ net/core/dev.c| 48