netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/6] devlink: make ethtool compat reliable
@ 2019-02-26  3:34 Jakub Kicinski
  2019-02-26  3:34 ` [PATCH net-next v4 1/6] net: devlink: turn devlink into a built-in Jakub Kicinski
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Jakub Kicinski @ 2019-02-26  3:34 UTC (permalink / raw)
  To: davem, jiri
  Cc: mkubecek, andrew, f.fainelli, netdev, oss-drivers, Jakub Kicinski

Hi!

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).
 
Jakub Kicinski (6):
  net: devlink: turn devlink into a built-in
  devlink: create a special NDO for getting the devlink instance
  nfp: add .ndo_get_devlink
  nfp: remove ethtool flashing fallback
  devlink: hold a reference to the netdevice around ethtool compat
  devlink: require non-NULL ops for devlink instances

 drivers/infiniband/hw/bnxt_re/Kconfig         |   1 -
 drivers/infiniband/hw/mlx4/Kconfig            |   1 -
 drivers/net/Kconfig                           |   1 -
 drivers/net/ethernet/broadcom/Kconfig         |   1 -
 drivers/net/ethernet/cavium/Kconfig           |   1 -
 drivers/net/ethernet/mellanox/mlx4/Kconfig    |   1 -
 .../net/ethernet/mellanox/mlx5/core/Kconfig   |   1 -
 drivers/net/ethernet/mellanox/mlxsw/Kconfig   |   1 -
 drivers/net/ethernet/netronome/Kconfig        |   1 -
 drivers/net/ethernet/netronome/nfp/nfp_app.h  |   2 +
 .../net/ethernet/netronome/nfp/nfp_devlink.c  |  11 ++
 .../ethernet/netronome/nfp/nfp_net_common.c   |   1 +
 .../ethernet/netronome/nfp/nfp_net_ethtool.c  |  24 ----
 .../net/ethernet/netronome/nfp/nfp_net_repr.c |   1 +
 include/linux/netdevice.h                     |   7 +
 include/net/devlink.h                         |  19 ++-
 net/Kconfig                                   |  11 +-
 net/core/devlink.c                            | 126 +++++++-----------
 net/core/ethtool.c                            |  13 +-
 net/dsa/Kconfig                               |   2 +-
 20 files changed, 90 insertions(+), 136 deletions(-)

-- 
2.19.2


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-03-01  7:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-26  3:34 [PATCH net-next v4 0/6] devlink: make ethtool compat reliable Jakub Kicinski
2019-02-26  3:34 ` [PATCH net-next v4 1/6] net: devlink: turn devlink into a built-in Jakub Kicinski
2019-02-28 15:01   ` Jiri Pirko
2019-02-28 16:02     ` Jakub Kicinski
2019-03-01  7:23       ` Jiri Pirko
2019-02-26  3:34 ` [PATCH net-next v4 2/6] devlink: create a special NDO for getting the devlink instance Jakub Kicinski
2019-02-26  8:56   ` Jiri Pirko
2019-02-26  3:34 ` [PATCH net-next v4 3/6] nfp: add .ndo_get_devlink Jakub Kicinski
2019-02-26  3:34 ` [PATCH net-next v4 4/6] nfp: remove ethtool flashing fallback Jakub Kicinski
2019-02-26  3:34 ` [PATCH net-next v4 5/6] devlink: hold a reference to the netdevice around ethtool compat Jakub Kicinski
2019-02-26  4:26   ` Florian Fainelli
2019-02-26  8:57   ` Jiri Pirko
2019-02-26  3:34 ` [PATCH net-next v4 6/6] devlink: require non-NULL ops for devlink instances Jakub Kicinski
2019-02-26  4:29   ` Florian Fainelli
2019-02-26  8:59   ` Jiri Pirko
2019-02-26 16:50 ` [PATCH net-next v4 0/6] devlink: make ethtool compat reliable David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).