]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: DR, Handle eswitch manager and uplink vports separately
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Tue, 2 Nov 2021 23:09:04 +0000 (01:09 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 16 Nov 2021 20:20:20 +0000 (12:20 -0800)
commit2cb5cd80630c38f4a68ea01342e9aa3400f3694a
tree37a7c3b2ceb2d8b8395424866ecbafd319e54e4c
parentba4e4eeda45bc996faef65dc7fcf857d81746a42
net/mlx5: DR, Handle eswitch manager and uplink vports separately

When querying eswitch manager vport capabilities as "other = 1",
we encounter a FW compatibility issue with older FW versions.
To maintain backward compatibility, eswitch manager vport should
be queried as "other = 0" vport both for ECPF and non-ECPF cases.

This patch fixes these queries and improves the code readability
by handling eswitch manager and uplink vports separately, avoiding
the excessive 'if' conditions. Also, uplink caps are stored similar
to esw manager and not as part of xarray.

Fixes: 5c2eacccdac8 ("net/mlx5: DR, Add missing query for vport 0")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h