diff options
author | Bodong Wang <bodong@mellanox.com> | 2019-06-28 22:35:53 +0000 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-07-01 16:40:30 -0700 |
commit | 2f69e591e4531d3192841a4eb2bd9b512f5a8b66 (patch) | |
tree | c75dfc8f7340bbb48f52e02c6dfc49df4e6f6d82 /include/linux/mlx5 | |
parent | d6518db278ed64561aa58f74ef5f3ee2f9dbe546 (diff) | |
download | linux-2f69e591e4531d3192841a4eb2bd9b512f5a8b66.tar.gz linux-2f69e591e4531d3192841a4eb2bd9b512f5a8b66.tar.bz2 linux-2f69e591e4531d3192841a4eb2bd9b512f5a8b66.zip |
{IB, net}/mlx5: E-Switch, Use index of rep for vport to IB port mapping
In the single IB device mode, the mapping between vport number and
rep relies on a counter. However for dynamic vport allocation, it is
desired to keep consistent map of eswitch vport and IB port.
Hence, simplify code to remove the free running counter and instead
use the available vport index during load/unload sequence from the
eswitch.
Signed-off-by: Bodong Wang <bodong@mellanox.com>
Suggested-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r-- | include/linux/mlx5/eswitch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mlx5/eswitch.h b/include/linux/mlx5/eswitch.h index aece3ae1902d..36cb641188b0 100644 --- a/include/linux/mlx5/eswitch.h +++ b/include/linux/mlx5/eswitch.h @@ -46,6 +46,8 @@ struct mlx5_eswitch_rep { u16 vport; u8 hw_id[ETH_ALEN]; u16 vlan; + /* Only IB rep is using vport_index */ + u16 vport_index; u32 vlan_refcount; }; |