Skip to content

Expose port split attributes

Ido Schimmel netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 2 repliesIn review
  2. v29 patches 4 repliesSuperseded

Changes in v3 from the cover letter

* Remove some local variables from patch #3
* Reword function description in patch #5
* Fix a bug in patch #8
* Add a test for the splittable attribute in patch #9

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9devlink: Move set attribute of devlink_port_attrs to devlink_portinclude/net/devlink.h net/core/devlink.c+5 -50 replies
2/9devlink: Move switch_port attribute of devlink_port_attrs to devlink_portinclude/net/devlink.h net/core/devlink.c+6 -60 replies
3/9devlink: Replace devlink_port_attrs_set parameters with a structdrivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c drivers/net/ethernet/intel/ice/ice_devlink.c drivers/net/ethernet/mellanox/mlx5/core/en/devlink.c +8 more+82 -960 replies
4/9mlxsw: Set number of port lanes attribute in driverdrivers/net/ethernet/mellanox/mlxsw/core.c drivers/net/ethernet/mellanox/mlxsw/core.h drivers/net/ethernet/mellanox/mlxsw/minimal.c +3 more+11 -60 replies
5/9devlink: Add a new devlink port lanes attribute and pass to netlinkdrivers/net/ethernet/mellanox/mlxsw/core.c include/net/devlink.h include/uapi/linux/devlink.h +1 more+9 -00 replies
6/9mlxsw: Set port split ability attribute in driverdrivers/net/ethernet/mellanox/mlxsw/core.c drivers/net/ethernet/mellanox/mlxsw/core.h drivers/net/ethernet/mellanox/mlxsw/minimal.c +3 more+14 -120 replies
7/9devlink: Add a new devlink port split ability attribute and pass to netlinkdrivers/net/ethernet/mellanox/mlxsw/core.c drivers/net/ethernet/netronome/nfp/nfp_devlink.c include/net/devlink.h +2 more+9 -10 replies
8/9devlink: Move input checks from driver to devlinkdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/netronome/nfp/nfp_devlink.c net/core/devlink.c+23 -190 replies
9/9selftests: net: Add port split testtools/testing/selftests/net/Makefile tools/testing/selftests/net/devlink_port_split.py+278 -00 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJiri PirkoPetr MachataJakub Kicinski
SeriesR-b
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH net-next v3 0/9] Expose port split attributes

From: Ido Schimmel <[email protected]>

Danielle says:

Currently, user space has no way of knowing if a port can be split and into how many ports. Among other things, this makes it impossible to write generic tests for port split functionality.

Therefore, this set exposes two new devlink port attributes to user
space: Number of lanes and whether the port can be split or not.

Patch set overview:

Patches #1-#4 cleanup 'struct devlink_port_attrs' and reduce the number of parameters passed between drivers and devlink via devlink_port_attrs_set()

Patch #5 adds devlink port lanes attributes

Patches #6-#7 add devlink port splittable attribute

Patch #8 exploits the fact that devlink is now aware of port's number of lanes and whether the port can be split or not and moves some checks from drivers to devlink

Patch #9 adds a port split test

Changes since v2:
* Remove some local variables from patch #3
* Reword function description in patch #5
* Fix a bug in patch #8
* Add a test for the splittable attribute in patch #9

Changes since v1:
* Rename 'width' attribute to 'lanes'
* Add 'splittable' attribute
* Move checks from drivers to devlink

Danielle Ratson (9):
devlink: Move set attribute of devlink_port_attrs to devlink_port
devlink: Move switch_port attribute of devlink_port_attrs to
devlink_port
devlink: Replace devlink_port_attrs_set parameters with a struct
mlxsw: Set number of port lanes attribute in driver
devlink: Add a new devlink port lanes attribute and pass to netlink
mlxsw: Set port split ability attribute in driver
devlink: Add a new devlink port split ability attribute and pass to
netlink
devlink: Move input checks from driver to devlink
selftests: net: Add port split test

 .../net/ethernet/broadcom/bnxt/bnxt_devlink.c |   9 +-
 drivers/net/ethernet/intel/ice/ice_devlink.c  |   6 +-
 .../ethernet/mellanox/mlx5/core/en/devlink.c  |  19 +-
 .../net/ethernet/mellanox/mlx5/core/en_rep.c  |  16 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c    |  18 +-
 drivers/net/ethernet/mellanox/mlxsw/core.h    |   4 +-
 drivers/net/ethernet/mellanox/mlxsw/minimal.c |   4 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  23 +-
 .../net/ethernet/mellanox/mlxsw/switchib.c    |   2 +-
 .../net/ethernet/mellanox/mlxsw/switchx2.c    |   2 +-
 .../net/ethernet/netronome/nfp/nfp_devlink.c  |  17 +-
 .../ethernet/pensando/ionic/ionic_devlink.c   |   5 +-
 drivers/net/netdevsim/dev.c                   |  10 +-
 include/net/devlink.h                         |  30 +-
 include/uapi/linux/devlink.h                  |   3 +
 net/core/devlink.c                            |  93 +++---
 net/dsa/dsa2.c                                |  17 +-
 tools/testing/selftests/net/Makefile          |   1 +
 .../selftests/net/devlink_port_split.py       | 277 ++++++++++++++++++
 19 files changed, 424 insertions(+), 132 deletions(-)
 create mode 100755 tools/testing/selftests/net/devlink_port_split.py
Signature · 1 line
2.26.2