mbox series

[net-next,v4,00/12] Implement dev info and dev flash for line cards

Message ID 20220725082925.366455-1-jiri@resnulli.us (mailing list archive)
Headers show
Series Implement dev info and dev flash for line cards | expand

Message

Jiri Pirko July 25, 2022, 8:29 a.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

This patchset implements two features:
1) "devlink dev info" is exposed for line card (patches 6-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 4).

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

The first patch removes devlink_mutex from devlink_register/unregister()
which eliminates possible deadlock during devlink reload command. The
second patchset follows up with putting net pointer check into new
helper.

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: move net check into
    devlinks_xa_for_each_registered_get()
  net: devlink: introduce nested devlink entity for line card
  mlxsw: core_linecards: Introduce per line card auxiliary device
  mlxsw: core_linecards: Expose HW revision and INI version
  mlxsw: reg: Extend MDDQ by device_info
  mlxsw: core_linecards: Probe active 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        | 184 ++++++++
 .../ethernet/mellanox/mlxsw/core_linecards.c  | 405 ++++++++++++++++++
 drivers/net/ethernet/mellanox/mlxsw/reg.h     | 173 +++++++-
 include/net/devlink.h                         |   2 +
 include/uapi/linux/devlink.h                  |   2 +
 net/core/devlink.c                            | 288 ++++++-------
 .../drivers/net/mlxsw/devlink_linecard.sh     |  54 +++
 12 files changed, 1043 insertions(+), 171 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c

Comments

patchwork-bot+netdevbpf@kernel.org July 26, 2022, 9:20 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 25 Jul 2022 10:29:13 +0200 you wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> This patchset implements two features:
> 1) "devlink dev info" is exposed for line card (patches 6-9)
> 2) "devlink dev flash" is implemented for line card gearbox
>    flashing (patch 10)
> 
> [...]

Here is the summary with links:
  - [net-next,v4,01/12] net: devlink: make sure that devlink_try_get() works with valid pointer during xarray iteration
    https://git.kernel.org/netdev/net-next/c/30bab7cdb56d
  - [net-next,v4,02/12] net: devlink: move net check into devlinks_xa_for_each_registered_get()
    https://git.kernel.org/netdev/net-next/c/294c4f57cfe3
  - [net-next,v4,03/12] net: devlink: introduce nested devlink entity for line card
    https://git.kernel.org/netdev/net-next/c/7b2d9a1a50ec
  - [net-next,v4,04/12] mlxsw: core_linecards: Introduce per line card auxiliary device
    https://git.kernel.org/netdev/net-next/c/bd02fd76d190
  - [net-next,v4,05/12] mlxsw: core_linecards: Expose HW revision and INI version
    https://git.kernel.org/netdev/net-next/c/5ba325fec511
  - [net-next,v4,06/12] mlxsw: reg: Extend MDDQ by device_info
    https://git.kernel.org/netdev/net-next/c/4ea07cf638db
  - [net-next,v4,07/12] mlxsw: core_linecards: Probe active line cards for devices and expose FW version
    https://git.kernel.org/netdev/net-next/c/4da0eb2a75eb
  - [net-next,v4,08/12] mlxsw: reg: Add Management DownStream Device Tunneling Register
    https://git.kernel.org/netdev/net-next/c/8f9b0513a950
  - [net-next,v4,09/12] mlxsw: core_linecards: Expose device PSID over device info
    https://git.kernel.org/netdev/net-next/c/3fc0c51905fb
  - [net-next,v4,10/12] mlxsw: core_linecards: Implement line card device flashing
    https://git.kernel.org/netdev/net-next/c/9ca6a7a5f42d
  - [net-next,v4,11/12] selftests: mlxsw: Check line card info on provisioned line card
    https://git.kernel.org/netdev/net-next/c/e96c8da38039
  - [net-next,v4,12/12] selftests: mlxsw: Check line card info on activated line card
    https://git.kernel.org/netdev/net-next/c/949c84f05eb6

You are awesome, thank you!