]> 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)
commitec52ac7a066e98fbe7a6c22567e7f8363110392b
tree37a7c3b2ceb2d8b8395424866ecbafd319e54e4c
parent4782cd715dcb02ae29ffaaed09281107bc7156f3
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: 62a47bd6a1ab ("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