Re: [PATCH v2 net-next 4/4] net: fib: avoid calling fib_flush for each device when doing batch close and unregister

2016-02-07 Thread Sergei Shtylyov
Hello. On 2/7/2016 9:09 AM, Salam Noureddine wrote: if (event == NETDEV_UNREGISTER) { - fib_disable_ip(dev, event, true); + if (fib_sync_down_dev(dev, event, true)) + net->ipv4.needs_fib_flush = true;

Re: [PATCH v2 net-next 4/4] net: fib: avoid calling fib_flush for each device when doing batch close and unregister

2016-02-06 Thread Salam Noureddine
On Fri, Feb 5, 2016 at 8:04 AM, Sergei Shtylyov wrote: > On 02/05/2016 02:35 AM, Salam Noureddine wrote: >> >> if (event == NETDEV_UNREGISTER) { >> - fib_disable_ip(dev, event, true); >> + if (fib_sync_down_dev(dev, event,

Re: [PATCH v2 net-next 4/4] net: fib: avoid calling fib_flush for each device when doing batch close and unregister

2016-02-05 Thread Sergei Shtylyov
On 02/05/2016 02:35 AM, Salam Noureddine wrote: Call fib_flush at the end when closing or unregistering multiple devices. This can save walking the fib many times and greatly reduce rtnl_lock hold time when unregistering many devices with a fib having hundreds of thousands of routes.

[PATCH v2 net-next 4/4] net: fib: avoid calling fib_flush for each device when doing batch close and unregister

2016-02-04 Thread Salam Noureddine
Call fib_flush at the end when closing or unregistering multiple devices. This can save walking the fib many times and greatly reduce rtnl_lock hold time when unregistering many devices with a fib having hundreds of thousands of routes. Signed-off-by: Salam Noureddine ---