]> 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)
commit427ab792a4b026f3b9827b318e1fc203906f5292
treec75dfc8f7340bbb48f52e02c6dfc49df4e6f6d82
parentf8ab7e10f98341ae27988785b72fb8f069facb47
{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