mbox series

[net-next,0/3] devlink: Add port width attribute

Message ID 20200519134032.1006765-1-idosch@idosch.org
Headers show
Series devlink: Add port width attribute | expand

Message

Ido Schimmel May 19, 2020, 1:40 p.m. UTC
From: Ido Schimmel <idosch@mellanox.com>

Danielle says:

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

This patch set adds the port's width as an attribute of a devlink port
and exposes the information to user space using a new attribute.

Patch #1 prepares mlxsw to pass width information to devlink
Patch #2 changes device drivers to pass width information to devlink and
exposes it to user space
Patch #3 adds a port split test

Danielle Ratson (3):
  mlxsw: Set port width attribute in driver
  devlink: Add a new devlink port width attribute and pass to netlink
  selftests: net: Add port split test

 .../net/ethernet/broadcom/bnxt/bnxt_devlink.c |   2 +-
 drivers/net/ethernet/intel/ice/ice_devlink.c  |   2 +-
 .../ethernet/mellanox/mlx5/core/en/devlink.c  |   4 +-
 .../net/ethernet/mellanox/mlx5/core/en_rep.c  |   2 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c    |   8 +-
 drivers/net/ethernet/mellanox/mlxsw/core.h    |   1 +
 drivers/net/ethernet/mellanox/mlxsw/minimal.c |   2 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |   1 +
 .../net/ethernet/mellanox/mlxsw/switchib.c    |   2 +-
 .../net/ethernet/mellanox/mlxsw/switchx2.c    |   2 +-
 .../net/ethernet/netronome/nfp/nfp_devlink.c  |   2 +-
 .../ethernet/pensando/ionic/ionic_devlink.c   |   2 +-
 drivers/net/netdevsim/dev.c                   |   2 +-
 include/net/devlink.h                         |   2 +
 include/uapi/linux/devlink.h                  |   2 +
 net/core/devlink.c                            |   7 +
 net/dsa/dsa2.c                                |   6 +-
 tools/testing/selftests/net/Makefile          |   1 +
 .../selftests/net/devlink_port_split.py       | 259 ++++++++++++++++++
 19 files changed, 292 insertions(+), 17 deletions(-)
 create mode 100755 tools/testing/selftests/net/devlink_port_split.py