Re: [patch net-next 2/3] net: introduce per-netns netdevice notifiers

2019-10-02 Thread David Miller
From: Jiri Pirko Date: Mon, 30 Sep 2019 10:15:10 +0200 > From: Jiri Pirko > > Often the code for example in drivers is interested in getting notifier > call only from certain network namespace. In addition to the existing > global netdevice notifier chain introduce per-netns chains and allow >

Re: [patch net-next 2/3] net: introduce per-netns netdevice notifiers

2019-09-30 Thread Jiri Pirko
Mon, Sep 30, 2019 at 05:33:43PM CEST, and...@lunn.ch wrote: >On Mon, Sep 30, 2019 at 04:23:49PM +0200, Jiri Pirko wrote: >> Mon, Sep 30, 2019 at 03:38:24PM CEST, and...@lunn.ch wrote: >> >> static int call_netdevice_notifiers_info(unsigned long val, >> >>struct

Re: [patch net-next 2/3] net: introduce per-netns netdevice notifiers

2019-09-30 Thread Andrew Lunn
On Mon, Sep 30, 2019 at 04:23:49PM +0200, Jiri Pirko wrote: > Mon, Sep 30, 2019 at 03:38:24PM CEST, and...@lunn.ch wrote: > >> static int call_netdevice_notifiers_info(unsigned long val, > >> struct netdev_notifier_info *info) > >> { > >> + struct net *net = d

Re: [patch net-next 2/3] net: introduce per-netns netdevice notifiers

2019-09-30 Thread Jiri Pirko
Mon, Sep 30, 2019 at 03:38:24PM CEST, and...@lunn.ch wrote: >> static int call_netdevice_notifiers_info(unsigned long val, >> struct netdev_notifier_info *info) >> { >> +struct net *net = dev_net(info->dev); >> +int ret; >> + >> ASSERT_RTNL(); >>

Re: [patch net-next 2/3] net: introduce per-netns netdevice notifiers

2019-09-30 Thread Andrew Lunn
> static int call_netdevice_notifiers_info(unsigned long val, >struct netdev_notifier_info *info) > { > + struct net *net = dev_net(info->dev); > + int ret; > + > ASSERT_RTNL(); > + > + /* Run per-netns notifier block chain first, then run

[patch net-next 2/3] net: introduce per-netns netdevice notifiers

2019-09-30 Thread Jiri Pirko
From: Jiri Pirko Often the code for example in drivers is interested in getting notifier call only from certain network namespace. In addition to the existing global netdevice notifier chain introduce per-netns chains and allow users to register to that. Eventually this would eliminate unnecessar