[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190301160542.6474-1-jiri@resnulli.us>
Date: Fri, 1 Mar 2019 17:05:34 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, mlxsw@...lanox.com, idosch@...lanox.com,
jakub.kicinski@...ronome.com, dirk.vandermerwe@...ronome.com,
f.fainelli@...il.com, andrew@...n.ch, vivien.didelot@...il.com
Subject: [patch net-next RFC 0/8] net: expose switch ID via devlink
From: Jiri Pirko <jiri@...lanox.com>
To provide visibility of the ports, as discussed this week, this
patchset exposes switch ID for devlink ports, which are part of a
switch. The rest of the ports if any (in case of sr-iov for example)
do not set switch ID.
Note that I send this as RFC because I don't have the NFP bits correct.
The switch ID should be only set for the eswitch ports (representors).
Jakub, could you please help with this?
As a follow-up I also plan to add devlink_port_attrs_set to all users
of ndo_get_port_parent_id and ndo_get_phys_port_name and remove these
ndos completely. But that also depends on Jakub's patchset which
introduces PF and VF port flavours.
Jiri Pirko (8):
net: devlink: convert devlink_port_attrs bools to bits
net: devlink: extend port attrs for switch ID
net: devlink: introduce devlink_compat_switch_id_get() helper
mlxsw: Pass switch ID through devlink_port_attrs_set()
mlxsw: Remove ndo_get_port_parent_id implementation
nfp: pass switch ID through devlink_port_attrs_set()
nfp: register devlink port before netdev
nfp: remove ndo_get_port_parent_id implementation
drivers/net/ethernet/mellanox/mlxsw/core.c | 7 ++-
drivers/net/ethernet/mellanox/mlxsw/core.h | 4 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 17 ++-----
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 16 +------
drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 6 ++-
.../net/ethernet/netronome/nfp/nfp_net_common.c | 1 -
drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 27 ++++++-----
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 1 -
drivers/net/ethernet/netronome/nfp/nfp_port.c | 16 -------
include/net/devlink.h | 23 +++++++--
include/uapi/linux/devlink.h | 2 +
net/core/dev.c | 8 +++-
net/core/devlink.c | 54 +++++++++++++++++++---
net/dsa/dsa2.c | 6 +--
14 files changed, 109 insertions(+), 79 deletions(-)
--
2.14.5
Powered by blists - more mailing lists