]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: SD, Use correct mdev to build channel param
authorTariq Toukan <tariqt@nvidia.com>
Tue, 3 Dec 2024 20:49:19 +0000 (22:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:09 +0000 (20:03 +0100)
commit83ca241410e2d54b46a93bb31e745d01531b5aa8
tree81b9604513d07d8351dca30b4527504e2a1689e1
parent9ede83d292674627ac13ba810f82846b0d632918
net/mlx5e: SD, Use correct mdev to build channel param

[ Upstream commit 31f114c3d158dacbeda33f2afb0ca41f4ec6c9f9 ]

In a multi-PF netdev, each traffic channel creates its own resources
against a specific PF.
In the cited commit, where this support was added, the channel_param
logic was mistakenly kept unchanged, so it always used the primary PF
which is found at priv->mdev.
In this patch we fix this by moving the logic to be per-channel, and
passing the correct mdev instance.

This bug happened to be usually harmless, as the resulting cparam
structures would be the same for all channels, due to identical FW logic
and decisions.
However, in some use cases, like fwreset, this gets broken.

This could lead to different symptoms. Example:
Error cqe on cqn 0x428, ci 0x0, qn 0x10a9, opcode 0xe, syndrome 0x4,
vendor syndrome 0x32

Fixes: e4f9686bdee7 ("net/mlx5e: Let channels be SD-aware")
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Lama Kayal <lkayal@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Link: https://patch.msgid.link/20241203204920.232744-6-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c