]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
{rdma,net}/mlx5: Query vports mac address from device
authorAdithya Jayachandran <ajayachandra@nvidia.com>
Thu, 16 Oct 2025 01:40:55 +0000 (18:40 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 25 Oct 2025 03:16:01 +0000 (20:16 -0700)
commiteea31f21dce10814e34dc7ef7ed5136269c7bb59
tree2ee03fb86d1f291e170c81221c6d2007f02eb5d0
parent3a8660878839faadb4f1a6dd72c3179c1df56787
{rdma,net}/mlx5: Query vports mac address from device

Before this patch during either switchdev or legacy mode enablement we
cleared the mac address of vports between changes. This change allows us
to preserve the vports mac address between eswitch mode changes.

Vports hold information for VFs/SFs such as the permanent mac address.
VF/SF mac can be set either by iproute vf interface or devlink function
interface. For no obvious reason we reset it to 0 on switchdev/legacy
mode changes, this patch is fixing that, to align with other vport
information that are never reset, e.g GUID,mtu,promisc mode, etc ..

Signed-off-by: Adithya Jayachandran <ajayachandra@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Acked-by: Leon Romanovsky <leon@kernel.org> # RDMA
drivers/infiniband/hw/mlx5/main.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/vport.c
include/linux/mlx5/vport.h