Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
From: Hannes Frederic SowaDate: Thu, 21 Apr 2016 09:43:11 +0200 > Hi David, > > On Wed, Apr 20, 2016, at 03:11, David Miller wrote: >> From: Hannes Frederic Sowa >> Date: Wed, 20 Apr 2016 03:06:13 +0200 >> >> > On Wed, Apr 20, 2016, at 02:27, David Miller wrote: >> >> From: Hannes Frederic Sowa >> >> Date: Mon, 18 Apr 2016 21:19:41 +0200 >> >> >> >> > This patchset removes the dependency of network drivers on vxlan or >> >> > geneve, so those don't get autoloaded when the nic driver is loaded. >> >> > >> >> > Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port >> >> > are not called without rtnl lock. >> >> >> >> In net-next, the 'qed' driver has tunneling offload support too. >> >> Don't you need to update this series to handle that driver as >> >> well? >> > >> > I audited qede as well: >> > >> > qede calls {vxlan,geneve}_get_rx_port only from ndo_open which isn't >> > reused anywhere else in the driver, only from ndo_open, which holds >> > rtnl_lock also. Thus the driver is safe and doesn't need a change. >> >> I'm talking about your final patches which elide the dependencies. > > could you look at this again? If you have further feedback I am happy to > incooperate those. Series applied, thanks Hannes.
Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
From: Hannes Frederic SowaDate: Thu, 21 Apr 2016 09:43:11 +0200 > could you look at this again? If you have further feedback I am happy to > incooperate those. I will.
Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
Hi David, On Wed, Apr 20, 2016, at 03:11, David Miller wrote: > From: Hannes Frederic Sowa> Date: Wed, 20 Apr 2016 03:06:13 +0200 > > > On Wed, Apr 20, 2016, at 02:27, David Miller wrote: > >> From: Hannes Frederic Sowa > >> Date: Mon, 18 Apr 2016 21:19:41 +0200 > >> > >> > This patchset removes the dependency of network drivers on vxlan or > >> > geneve, so those don't get autoloaded when the nic driver is loaded. > >> > > >> > Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port > >> > are not called without rtnl lock. > >> > >> In net-next, the 'qed' driver has tunneling offload support too. > >> Don't you need to update this series to handle that driver as > >> well? > > > > I audited qede as well: > > > > qede calls {vxlan,geneve}_get_rx_port only from ndo_open which isn't > > reused anywhere else in the driver, only from ndo_open, which holds > > rtnl_lock also. Thus the driver is safe and doesn't need a change. > > I'm talking about your final patches which elide the dependencies. could you look at this again? If you have further feedback I am happy to incooperate those. Thank you, Hannes
Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
On 20.04.2016 03:11, David Miller wrote: > From: Hannes Frederic Sowa> Date: Wed, 20 Apr 2016 03:06:13 +0200 > >> On Wed, Apr 20, 2016, at 02:27, David Miller wrote: >>> From: Hannes Frederic Sowa >>> Date: Mon, 18 Apr 2016 21:19:41 +0200 >>> This patchset removes the dependency of network drivers on vxlan or geneve, so those don't get autoloaded when the nic driver is loaded. Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port are not called without rtnl lock. >>> >>> In net-next, the 'qed' driver has tunneling offload support too. >>> Don't you need to update this series to handle that driver as >>> well? >> >> I audited qede as well: >> >> qede calls {vxlan,geneve}_get_rx_port only from ndo_open which isn't >> reused anywhere else in the driver, only from ndo_open, which holds >> rtnl_lock also. Thus the driver is safe and doesn't need a change. > > I'm talking about your final patches which elide the dependencies. The dependency will be removed with only the last two patches for all drivers. The static inline functions {vxlan,geneve}_get_rx_port now simply expand to a call to call_netdevice_notifiers, which is provided by the core kernel and not by the vxlan or geneve module anymore. During testing I saw that very often some drivers actually reused their *_attach or *_open function from other callbacks, e.g. pci ones. While they often didn't care about rtnl_lock, we now require that for the new get_rx_port functions, thus I added them. I hadn't had to modify all drivers with vxlan offloading support, e.g. also mlx5 and the broadcom drivers, bnx2x and bnxt, were already fine. Bye, Hannes
Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
From: Hannes Frederic SowaDate: Wed, 20 Apr 2016 03:06:13 +0200 > On Wed, Apr 20, 2016, at 02:27, David Miller wrote: >> From: Hannes Frederic Sowa >> Date: Mon, 18 Apr 2016 21:19:41 +0200 >> >> > This patchset removes the dependency of network drivers on vxlan or >> > geneve, so those don't get autoloaded when the nic driver is loaded. >> > >> > Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port >> > are not called without rtnl lock. >> >> In net-next, the 'qed' driver has tunneling offload support too. >> Don't you need to update this series to handle that driver as >> well? > > I audited qede as well: > > qede calls {vxlan,geneve}_get_rx_port only from ndo_open which isn't > reused anywhere else in the driver, only from ndo_open, which holds > rtnl_lock also. Thus the driver is safe and doesn't need a change. I'm talking about your final patches which elide the dependencies.
Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
On Wed, Apr 20, 2016, at 02:27, David Miller wrote: > From: Hannes Frederic Sowa> Date: Mon, 18 Apr 2016 21:19:41 +0200 > > > This patchset removes the dependency of network drivers on vxlan or > > geneve, so those don't get autoloaded when the nic driver is loaded. > > > > Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port > > are not called without rtnl lock. > > In net-next, the 'qed' driver has tunneling offload support too. > Don't you need to update this series to handle that driver as > well? I audited qede as well: qede calls {vxlan,geneve}_get_rx_port only from ndo_open which isn't reused anywhere else in the driver, only from ndo_open, which holds rtnl_lock also. Thus the driver is safe and doesn't need a change. Bye, Hannes
Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
From: Hannes Frederic SowaDate: Mon, 18 Apr 2016 21:19:41 +0200 > This patchset removes the dependency of network drivers on vxlan or > geneve, so those don't get autoloaded when the nic driver is loaded. > > Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port > are not called without rtnl lock. In net-next, the 'qed' driver has tunneling offload support too. Don't you need to update this series to handle that driver as well? Thanks.
[PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
This patchset removes the dependency of network drivers on vxlan or geneve, so those don't get autoloaded when the nic driver is loaded. Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port are not called without rtnl lock. Hannes Frederic Sowa (7): benet: be_resume needs to protect be_open with rtnl_lock fm10k: protect fm10k_open in fm10k_io_resume with rtnl_lock mlx4: protect mlx4_en_start_port in mlx4_en_restart with rtnl_lock ixgbe: protect vxlan_get_rx_port in ixgbe_service_task with rtnl_lock qlcnic: protect qlicnic_attach_func with rtnl_lock vxlan: break dependency with netdev drivers geneve: break dependency with netdev drivers drivers/net/ethernet/emulex/benet/be_main.c | 10 +--- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c| 2 ++ drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 ++ drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 10 ++-- drivers/net/geneve.c | 31 +--- drivers/net/vxlan.c | 14 +++ include/linux/netdevice.h| 2 ++ include/net/geneve.h | 6 ++--- include/net/vxlan.h | 6 ++--- 10 files changed, 63 insertions(+), 22 deletions(-) -- 2.5.5