Commit 703bdcbc authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'devlink-make-ethtool-compat-reliable'



Jakub Kicinski says:

====================
devlink: make ethtool compat reliable

This is a follow up to the series which added device flash
updates via devlink. I went with the approach of adding a
new NDO in the end. It seems to end up looking cleaner.

First patch removes the option to build devlink as a module.
Users can still decide to not build it, but the module option
ends up not being worth the maintenance cost.

Next two patches add a NDO which can be used to ask the driver
to return a devlink instance associated with a given netdev,
instead of iterating over devlink ports. Drivers which implement
this NDO must take into account the potential impact on the
visibility of the devlink instance.

With the new NDO in place we can remove NFP ethtool flash update
code.

Fifth patch makes sure we hold a reference to dev while
callbacks are active.

Last but not least the NULL-check of devlink->ops is moved
to instance allocation time.

Last but not least missing checks for devlink->ops are added.
There is currently no driver registering devlink without ops,
so can just fix this in -next.

v2 (Michal): add netdev_to_devlink() in patch 3.
v3 (Florian):
 - add missing checks for devlink->ops;
 - move locking/holding into devlink_compat_ functions.
v4 (Jiri):
 - hold devlink_mutex around callbacks (patch 2);
 - require non-NULL ops (patch 6).
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents d8cf757f be6fe1d8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
config INFINIBAND_BNXT_RE
    tristate "Broadcom Netxtreme HCA support"
    depends on ETHERNET && NETDEVICES && PCI && INET && DCB
    depends on MAY_USE_DEVLINK
    select NET_VENDOR_BROADCOM
    select BNXT
    ---help---
+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ config MLX4_INFINIBAND
	tristate "Mellanox ConnectX HCA support"
	depends on NETDEVICES && ETHERNET && PCI && INET
	depends on INFINIBAND_USER_ACCESS || !INFINIBAND_USER_ACCESS
	depends on MAY_USE_DEVLINK
	select NET_VENDOR_MELLANOX
	select MLX4_CORE
	---help---
+0 −1
Original line number Diff line number Diff line
@@ -505,7 +505,6 @@ source "drivers/net/hyperv/Kconfig"
config NETDEVSIM
	tristate "Simulated networking device"
	depends on DEBUG_FS
	depends on MAY_USE_DEVLINK
	help
	  This driver is a developer testing tool and software model that can
	  be used to test various control path networking APIs, especially
+0 −1
Original line number Diff line number Diff line
@@ -194,7 +194,6 @@ config SYSTEMPORT
config BNXT
	tristate "Broadcom NetXtreme-C/E support"
	depends on PCI
	depends on MAY_USE_DEVLINK
	select FW_LOADER
	select LIBCRC32C
	---help---
+0 −1
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ config CAVIUM_PTP
config LIQUIDIO
	tristate "Cavium LiquidIO support"
	depends on 64BIT && PCI
	depends on MAY_USE_DEVLINK
	depends on PCI
	imply PTP_1588_CLOCK
	select FW_LOADER
Loading