Skip to content

Commit ec9c2fb

Browse files
mark-blochSaeed Mahameed
authored andcommitted
IB/mlx5: Disable self loopback check when in switchdev mode
When in switchdev mode, there is no need to do self loopback checks as we can't receive those packets, we insert steering rules to the eswitch that make sure packets can't be looped back. Signed-off-by: Mark Bloch <[email protected]> Reviewed-by: Or Gerlitz <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent c5447c7 commit ec9c2fb

File tree

1 file changed

+8
-0
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+8
-0
lines changed

drivers/infiniband/hw/mlx5/qp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,10 @@ static int create_raw_packet_qp_tir(struct mlx5_ib_dev *dev,
12791279
if (tunnel_offload_en)
12801280
MLX5_SET(tirc, tirc, tunneled_offload_en, 1);
12811281

1282+
if (dev->rep)
1283+
MLX5_SET(tirc, tirc, self_lb_block,
1284+
MLX5_TIRC_SELF_LB_BLOCK_BLOCK_UNICAST_);
1285+
12821286
err = mlx5_core_create_tir(dev->mdev, in, inlen, &rq->tirn);
12831287

12841288
kvfree(in);
@@ -1570,6 +1574,10 @@ static int create_rss_raw_qp_tir(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
15701574
MLX5_SET(rx_hash_field_select, hfso, selected_fields, selected_fields);
15711575

15721576
create_tir:
1577+
if (dev->rep)
1578+
MLX5_SET(tirc, tirc, self_lb_block,
1579+
MLX5_TIRC_SELF_LB_BLOCK_BLOCK_UNICAST_);
1580+
15731581
err = mlx5_core_create_tir(dev->mdev, in, inlen, &qp->rss_qp.tirn);
15741582

15751583
if (err)

0 commit comments

Comments
 (0)