Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-16 Thread David Ahern
On 9/15/19 11:38 PM, Jiri Pirko wrote: >> This is still more complicated than it needs to be. Why lump all >> fib_notifier_ops into 1 dump when they are separate databases with >> separate seq numbers? Just dump them 1 at a time and retry that 1 >> database as needed. > > Well I think that what yo

Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-15 Thread Jiri Pirko
Sun, Sep 15, 2019 at 10:05:47PM CEST, dsah...@gmail.com wrote: >On 9/14/19 12:45 AM, Jiri Pirko wrote: >> #define FIB_DUMP_MAX_RETRIES 5 >> -int register_fib_notifier(struct notifier_block *nb, >> +int register_fib_notifier(struct net *net, struct notifier_block *nb, >>void

Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-15 Thread David Ahern
On 9/14/19 12:45 AM, Jiri Pirko wrote: > #define FIB_DUMP_MAX_RETRIES 5 > -int register_fib_notifier(struct notifier_block *nb, > +int register_fib_notifier(struct net *net, struct notifier_block *nb, > void (*cb)(struct notifier_block *nb)) > { > int retries = 0; >

Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-15 Thread Jiri Pirko
Sun, Sep 15, 2019 at 10:06:02AM CEST, ido...@idosch.org wrote: >On Sat, Sep 14, 2019 at 08:45:55AM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Currently all users of FIB notifier only cares about events in init_net. > >s/cares/care/ ok > >> Later in this patchset, users get interested i

Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-15 Thread Ido Schimmel
On Sat, Sep 14, 2019 at 08:45:55AM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Currently all users of FIB notifier only cares about events in init_net. s/cares/care/ > Later in this patchset, users get interested in other namespaces too. > However, for every registered block user is interes

[patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-13 Thread Jiri Pirko
From: Jiri Pirko Currently all users of FIB notifier only cares about events in init_net. Later in this patchset, users get interested in other namespaces too. However, for every registered block user is interested only about one namespace. Make the FIB notifier registration per-netns and avoid u