]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: E-Switch, Initialize MAC Address for Default GID
authorMaor Gottlieb <maorg@nvidia.com>
Wed, 23 Apr 2025 08:36:08 +0000 (11:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:39:38 +0000 (09:39 +0200)
commit225ee358a4ed62153728d45d783db725617211f0
tree1c1e166793f7ebfa2eef88e52f2b4258bcb30d69
parent9d3ef89b6a5e9f2e940de2cef3d543be0be8dec5
net/mlx5: E-Switch, Initialize MAC Address for Default GID

[ Upstream commit 5d1a04f347e6cbf5ffe74da409a5d71fbe8c5f19 ]

Initialize the source MAC address when creating the default GID entry.
Since this entry is used only for loopback traffic, it only needs to
be a unicast address. A zeroed-out MAC address is sufficient for this
purpose.
Without this fix, random bits would be assigned as the source address.
If these bits formed a multicast address, the firmware would return an
error, preventing the user from switching to switchdev mode:

Error: mlx5_core: Failed setting eswitch to offloads.
kernel answers: Invalid argument

Fixes: 80f09dfc237f ("net/mlx5: Eswitch, enable RoCE loopback traffic")
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250423083611.324567-3-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/rdma.c