diff options
| author | David S. Miller <davem@davemloft.net> | 2020-06-22 15:29:19 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2020-06-22 15:30:08 -0700 |
| commit | 389cc2f326fd095edc1c09d7713ac9f9dd591f8a (patch) | |
| tree | 2b9f511d83f3b755babc63b299810986e6802716 /include/linux | |
| parent | 29a720c1042f469c8fea317cb5e7f496b116e07d (diff) | |
| parent | 330077d14de12df5697ef192a88b11cc2166cd47 (diff) | |
| download | cachepc-linux-389cc2f326fd095edc1c09d7713ac9f9dd591f8a.tar.gz cachepc-linux-389cc2f326fd095edc1c09d7713ac9f9dd591f8a.zip | |
Merge branch 'devlink-Support-get-set-mac-address-of-a-port-function'
Parav Pandit says:
====================
devlink: Support get,set mac address of a port function
Currently, ip link set dev <pfndev> vf <vf_num> <param> <value> has
below few limitations.
1. Command is limited to set VF parameters only.
It cannot set the default MAC address for the PCI PF.
2. It can be set only on system where PCI SR-IOV capability exists.
In smartnic based system, eswitch of a NIC resides on a different
embedded cpu which has the VF and PF representors for the SR-IOV
functions of a host system in which this smartnic is plugged-in.
3. It cannot setup the function attributes of sub-function described
in detail in comprehensive RFC [1] and [2].
This series covers the first small part to let user query and set MAC
address (hardware address) of a PCI PF/VF which is represented by
devlink port pcipf, pcivf port flavours respectively.
Whenever a devlink port manages a function connected to a devlink port,
it allows to query and set its hardware address.
Driver implements necessary get/set callback functions if it supports
port function for a given port type.
Patch summary:
Patch-1 Prepares devlink port fill routines for extack
Patch-2 and 3 extended devlink interface to get/set port function
attributes, mainly hardware address to start with.
Patch-2 Extended port dump command to query port function hardware
address
Patch-3 Introduces a command to set the hardware address of a port
function
Patch-4 to 9 refactors and implement devlink callbacks in mlx5_core
driver.
Patch-4 Constify the mac address pointer in set routines
Patch-5 Introduces eswich check helper to use in devlink facing
callbacks
Patch-6 Moves port index, port number conversion routine to eswitch
header file
Patch-7 Implements port function query devlink callback
Patch-8 Refactors mac address setting routine to uniformly use
state_lock
Patch-9 Implements port function set devlink callback
[1] https://lore.kernel.org/netdev/20200519092258.GF4655@nanopsycho/
[2] https://marc.info/?l=linux-netdev&m=158555928517777&w=2
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx5/vport.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mlx5/vport.h b/include/linux/mlx5/vport.h index 8170da1e9f70..4db87bcfce7b 100644 --- a/include/linux/mlx5/vport.h +++ b/include/linux/mlx5/vport.h @@ -75,7 +75,7 @@ void mlx5_query_min_inline(struct mlx5_core_dev *mdev, u8 *min_inline); int mlx5_modify_nic_vport_min_inline(struct mlx5_core_dev *mdev, u16 vport, u8 min_inline); int mlx5_modify_nic_vport_mac_address(struct mlx5_core_dev *dev, - u16 vport, u8 *addr); + u16 vport, const u8 *addr); int mlx5_query_nic_vport_mtu(struct mlx5_core_dev *mdev, u16 *mtu); int mlx5_modify_nic_vport_mtu(struct mlx5_core_dev *mdev, u16 mtu); int mlx5_query_nic_vport_system_image_guid(struct mlx5_core_dev *mdev, |
