Skip to content
Commit 879c8f84 authored by Bodong Wang's avatar Bodong Wang Committed by Saeed Mahameed
Browse files

net/mlx5: E-Switch, Use getter and iterator to access vport/rep



With only PF and VF, it is sufficient to have the vport/rep array
index as the vport number. This is because PF and VF vports numbers
are consecutive serial numbers. In downstream patches with
introducing of ECPF and UPLINK vports, it's not consecutive any more.

Use getter to get specific vport/rep, and use iterator to traversal
a list of vport/rep. This hides the translation between array index
and vport number, and provides flexibility of using different
translation mechanism in the future.

This patch doesn't change any functionality.

Signed-off-by: default avatarBodong Wang <bodong@mellanox.com>
Suggested-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent c9b99abc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment