]> git.baikalelectronics.ru Git - kernel.git/commit
{IB, net}/mlx5: E-Switch, Use index of rep for vport to IB port mapping
authorBodong Wang <bodong@mellanox.com>
Fri, 28 Jun 2019 22:35:53 +0000 (22:35 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 1 Jul 2019 23:40:30 +0000 (16:40 -0700)
commitf210aea30cdde3df6f9a3e9bc28b25526feb7738
treec75dfc8f7340bbb48f52e02c6dfc49df4e6f6d82
parente3241ae223a8e0a158faf95f73c655ec9f13aad1
{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>
drivers/infiniband/hw/mlx5/ib_rep.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
include/linux/mlx5/eswitch.h