[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAO7SqHCj3Fq+CXz_y+4ou+JxSvyMgpyQNRjMfX=Zvow3knocpw@mail.gmail.com>
Date: Sat, 6 Feb 2016 22:09:10 -0800
From: Salam Noureddine <noureddine@...sta.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jiri Pirko <jiri@...lanox.com>,
Alexei Starovoitov <ast@...mgrid.com>,
Daniel Borkmann <daniel@...earbox.net>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Julian Anastasov <ja@....bg>,
Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net-next 4/4] net: fib: avoid calling fib_flush for
each device when doing batch close and unregister
On Fri, Feb 5, 2016 at 8:04 AM, Sergei Shtylyov
<sergei.shtylyov@...entembedded.com> 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, true))
>> + net->ipv4.needs_fib_flush = true;
>> rt_flush_dev(dev);
>> return NOTIFY_DONE;
>> }
>>
>> + if (event == NETDEV_UNREGISTER_BATCH || event ==
>> NETDEV_DOWN_BATCH) {
>> + if (net->ipv4.needs_fib_flush) {
>> + fib_flush(net);
>> + net->ipv4.needs_fib_flush = false;
>> + }
>> + rt_cache_flush(net);
>> + arp_ifdown_all();
>> + return NOTIFY_DONE;
>> + }
>> +
>
>
> I'd convert to *switch* the above 2 *if*'s...
>
> [...]
>
> MBR, Sergei
>
I could do that.
Thanks,
Salam
Powered by blists - more mailing lists