One of the E-Switch vports plays the special role - it is assigned as "E-Switch manager" and has some special exclusive rights and duties - it maintains all the representors, manages FDB domain flows, etc. By default, the E-Switch vport index was supposed to be zero on standalone NICs (regular ConnectX) and 0xFFFE SmartNIC (BlueField), but that was not always correct - this index can be assigned with any value by kernel/hypervisor. To handle this and do not suggest any default values we should use DevX API to query E-Switch manager vport ID directly from firmware, to make sure we always use the correct value.
Shun Hao (2): common/mlx5: query E-Switch manager vport ID net/mlx5: new method to get E-Switch manager vport ID drivers/common/mlx5/mlx5_devx_cmds.c | 12 ++++++++++++ drivers/common/mlx5/mlx5_devx_cmds.h | 2 ++ drivers/common/mlx5/mlx5_prm.h | 12 ++++++++++++ drivers/net/mlx5/mlx5_flow_dv.c | 4 ++++ 4 files changed, 30 insertions(+) -- 2.20.0