]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit9091b821aaa4c2d107ca8f97c32baefcb1e7e40d
tree37a7c3b2ceb2d8b8395424866ecbafd319e54e4c
parent76ded29d3fcda4928da8849ffc446ea46871c1c2
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: dd4acb2a0954 ("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