Skip to content

Commit 050a4c0

Browse files
Shahar Shitritkuba-moo
authored andcommitted
net/mlx5: DR, select MSIX vector 0 for completion queue creation
When creating a software steering completion queue (CQ), an arbitrary MSIX vector n is selected. This results in the CQ sharing the same Ethernet traffic channel n associated with the chosen vector. However, the value of n is often unpredictable, which can introduce complications for interrupt monitoring and verification tools. Moreover, SW steering uses polling rather than event-driven interrupts. Therefore, there is no need to select any MSIX vector other than the existing vector 0 for CQ creation. In light of these factors, and to enhance predictability, we modify the code to consistently select MSIX vector 0 for CQ creation. Fixes: 297ccce ("net/mlx5: DR, Expose an internal API to issue RDMA operations") Signed-off-by: Shahar Shitrit <[email protected]> Reviewed-by: Yevgeny Kliteynik <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 75221e9 commit 050a4c0

File tree

1 file changed

+1
-3
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/steering/sws

1 file changed

+1
-3
lines changed

drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_send.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,6 @@ static struct mlx5dr_cq *dr_create_cq(struct mlx5_core_dev *mdev,
10671067
int inlen, err, eqn;
10681068
void *cqc, *in;
10691069
__be64 *pas;
1070-
int vector;
10711070
u32 i;
10721071

10731072
cq = kzalloc(sizeof(*cq), GFP_KERNEL);
@@ -1096,8 +1095,7 @@ static struct mlx5dr_cq *dr_create_cq(struct mlx5_core_dev *mdev,
10961095
if (!in)
10971096
goto err_cqwq;
10981097

1099-
vector = raw_smp_processor_id() % mlx5_comp_vectors_max(mdev);
1100-
err = mlx5_comp_eqn_get(mdev, vector, &eqn);
1098+
err = mlx5_comp_eqn_get(mdev, 0, &eqn);
11011099
if (err) {
11021100
kvfree(in);
11031101
goto err_cqwq;

0 commit comments

Comments
 (0)