]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mlx5e: Enhance function structures for self loopback prevention application
authorTariq Toukan <tariqt@nvidia.com>
Thu, 30 Oct 2025 13:32:33 +0000 (15:32 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Nov 2025 01:04:35 +0000 (17:04 -0800)
commit091400a5d411ee7398095ba832361eb12b345f3d
treebc49b18be04629ded99fa56c7d8aae45ae3785c4
parent52665fcc2241f8f9a17543d9a6531b1a1b029bde
net/mlx5e: Enhance function structures for self loopback prevention application

The re-application of self loopback prevention attributes in TIRs is
necessary in old firmwares (where tis_tir_td_order cap is cleared) after
recreation of SQs.

However, this is not needed in new firmware with tis_tir_td_order=1.

As a preparation patch, enhance the function structures to differentiate
between an explicit loopback prevention configuration apply, and the
re-apply operation required by old firmware.

Loopback selftests should now call mlx5e_modify_tirs_lb() directly, as
their use case is not related to the firmware limitation.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/1761831159-1013140-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_common.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c