diff options
author | Jiri Pirko <jiri@mellanox.com> | 2018-05-18 09:29:00 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-19 16:30:39 -0400 |
commit | b9ffcbaf56d3040efee64d3818688083c29b2a44 (patch) | |
tree | b9ecd9e63e51be84e5050ba94b754de9ea9050a8 /drivers/net/ethernet/mellanox/mlxsw/core.c | |
parent | eb38401c779d350e9e31396471ea072fa29aec9b (diff) | |
download | talos-op-linux-b9ffcbaf56d3040efee64d3818688083c29b2a44.tar.gz talos-op-linux-b9ffcbaf56d3040efee64d3818688083c29b2a44.zip |
devlink: introduce devlink_port_attrs_set
Change existing setter for split port information into more generic
attrs setter. Alongside with that, allow to set port number and subport
number for split ports.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c index e13ac3b8dff7..958769689ca2 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core.c @@ -1714,15 +1714,16 @@ EXPORT_SYMBOL(mlxsw_core_port_fini); void mlxsw_core_port_eth_set(struct mlxsw_core *mlxsw_core, u8 local_port, void *port_driver_priv, struct net_device *dev, - bool split, u32 split_group) + u32 port_number, bool split, + u32 split_port_subnumber) { struct mlxsw_core_port *mlxsw_core_port = &mlxsw_core->ports[local_port]; struct devlink_port *devlink_port = &mlxsw_core_port->devlink_port; mlxsw_core_port->port_driver_priv = port_driver_priv; - if (split) - devlink_port_split_set(devlink_port, split_group); + devlink_port_attrs_set(devlink_port, port_number, + split, split_port_subnumber); devlink_port_type_eth_set(devlink_port, dev); } EXPORT_SYMBOL(mlxsw_core_port_eth_set); |