netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next v2 00/12] mlxsw: Implement dev info and dev flash for line cards
@ 2022-07-19  6:48 Jiri Pirko
  2022-07-19  6:48 ` [patch net-next v2 01/12] net: devlink: make sure that devlink_try_get() works with valid pointer during xarray iteration Jiri Pirko
                   ` (12 more replies)
  0 siblings, 13 replies; 38+ messages in thread
From: Jiri Pirko @ 2022-07-19  6:48 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, idosch, petrm, pabeni, edumazet, mlxsw, saeedm,
	snelson

From: Jiri Pirko <jiri@nvidia.com>

This patchset implements two features:
1) "devlink dev info" is exposed for line card (patches 5-9)
2) "devlink dev flash" is implemented for line card gearbox
   flashing (patch 10)

For every line card, "a nested" auxiliary device is created which
allows to bind the features mentioned above (patch 3).

The relationship between line card and its auxiliary dev devlink
is carried over extra line card netlink attribute (patches 2 and 4).

The first patch removes devlink_mutex from devlink_register/unregister()
which eliminates possible deadlock during devlink reload command.

Examples:

$ devlink lc show pci/0000:01:00.0 lc 1
pci/0000:01:00.0:
  lc 1 state active type 16x100G nested_devlink auxiliary/mlxsw_core.lc.0
    supported_types:
       16x100G

$ devlink dev show auxiliary/mlxsw_core.lc.0
auxiliary/mlxsw_core.lc.0

$ devlink dev info auxiliary/mlxsw_core.lc.0
auxiliary/mlxsw_core.lc.0:
  versions:
      fixed:
        hw.revision 0
        fw.psid MT_0000000749
      running:
        ini.version 4
        fw 19.2010.1312

$ devlink dev flash auxiliary/mlxsw_core.lc.0 file mellanox/fw-AGB-rel-19_2010_1312-022-EVB.mfa2

Jiri Pirko (12):
  net: devlink: make sure that devlink_try_get() works with valid
    pointer during xarray iteration
  net: devlink: introduce nested devlink entity for line card
  mlxsw: core_linecards: Introduce per line card auxiliary device
  mlxsw: core_linecard_dev: Set nested devlink relationship for a line
    card
  mlxsw: core_linecards: Expose HW revision and INI version
  mlxsw: reg: Extend MDDQ by device_info
  mlxsw: core_linecards: Probe provisioned line cards for devices and
    expose FW version
  mlxsw: reg: Add Management DownStream Device Tunneling Register
  mlxsw: core_linecards: Expose device PSID over device info
  mlxsw: core_linecards: Implement line card device flashing
  selftests: mlxsw: Check line card info on provisioned line card
  selftests: mlxsw: Check line card info on activated line card

 Documentation/networking/devlink/mlxsw.rst    |  24 ++
 drivers/net/ethernet/mellanox/mlxsw/Kconfig   |   1 +
 drivers/net/ethernet/mellanox/mlxsw/Makefile  |   2 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c    |  44 +-
 drivers/net/ethernet/mellanox/mlxsw/core.h    |  35 ++
 .../mellanox/mlxsw/core_linecard_dev.c        | 183 ++++++++
 .../ethernet/mellanox/mlxsw/core_linecards.c  | 404 ++++++++++++++++++
 drivers/net/ethernet/mellanox/mlxsw/reg.h     | 173 +++++++-
 include/net/devlink.h                         |   2 +
 include/uapi/linux/devlink.h                  |   2 +
 net/core/devlink.c                            | 155 ++++++-
 .../drivers/net/mlxsw/devlink_linecard.sh     |  54 +++
 12 files changed, 1047 insertions(+), 32 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c

-- 
2.35.3


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

end of thread, other threads:[~2022-07-20 15:09 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19  6:48 [patch net-next v2 00/12] mlxsw: Implement dev info and dev flash for line cards Jiri Pirko
2022-07-19  6:48 ` [patch net-next v2 01/12] net: devlink: make sure that devlink_try_get() works with valid pointer during xarray iteration Jiri Pirko
2022-07-19 11:39   ` Ido Schimmel
2022-07-19 11:41     ` Jiri Pirko
2022-07-20  7:45   ` Ido Schimmel
2022-07-20 11:00     ` Jiri Pirko
2022-07-19  6:48 ` [patch net-next v2 02/12] net: devlink: introduce nested devlink entity for line card Jiri Pirko
2022-07-20  7:58   ` Ido Schimmel
2022-07-19  6:48 ` [patch net-next v2 03/12] mlxsw: core_linecards: Introduce per line card auxiliary device Jiri Pirko
2022-07-20  8:45   ` Ido Schimmel
2022-07-20 12:17     ` Jiri Pirko
2022-07-19  6:48 ` [patch net-next v2 04/12] mlxsw: core_linecard_dev: Set nested devlink relationship for a line card Jiri Pirko
2022-07-20  8:47   ` Ido Schimmel
2022-07-19  6:48 ` [patch net-next v2 05/12] mlxsw: core_linecards: Expose HW revision and INI version Jiri Pirko
2022-07-20  8:56   ` Ido Schimmel
2022-07-20 12:27     ` Jiri Pirko
2022-07-20 12:43       ` Ido Schimmel
2022-07-20 12:50         ` Ido Schimmel
2022-07-20 14:58           ` Jiri Pirko
2022-07-20 14:59         ` Jiri Pirko
2022-07-20 15:01           ` Ido Schimmel
2022-07-20 15:09             ` Jiri Pirko
2022-07-19  6:48 ` [patch net-next v2 06/12] mlxsw: reg: Extend MDDQ by device_info Jiri Pirko
2022-07-20  8:57   ` Ido Schimmel
2022-07-19  6:48 ` [patch net-next v2 07/12] mlxsw: core_linecards: Probe provisioned line cards for devices and expose FW version Jiri Pirko
2022-07-20  9:14   ` Ido Schimmel
2022-07-20 10:51     ` Jiri Pirko
2022-07-20 11:16       ` Ido Schimmel
2022-07-20 12:29         ` Jiri Pirko
2022-07-19  6:48 ` [patch net-next v2 08/12] mlxsw: reg: Add Management DownStream Device Tunneling Register Jiri Pirko
2022-07-19  6:48 ` [patch net-next v2 09/12] mlxsw: core_linecards: Expose device PSID over device info Jiri Pirko
2022-07-20 10:42   ` Ido Schimmel
2022-07-19  6:48 ` [patch net-next v2 10/12] mlxsw: core_linecards: Implement line card device flashing Jiri Pirko
2022-07-20 10:46   ` Ido Schimmel
2022-07-20 10:53     ` Jiri Pirko
2022-07-19  6:48 ` [patch net-next v2 11/12] selftests: mlxsw: Check line card info on provisioned line card Jiri Pirko
2022-07-19  6:48 ` [patch net-next v2 12/12] selftests: mlxsw: Check line card info on activated " Jiri Pirko
2022-07-19 10:30 ` [patch net-next v2 00/12] mlxsw: Implement dev info and dev flash for line cards Ido Schimmel

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).