]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix mlx5_get_vector_affinity function
authorIsrael Rukshin <israelr@mellanox.com>
Thu, 12 Apr 2018 09:49:11 +0000 (09:49 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Apr 2018 19:43:19 +0000 (12:43 -0700)
commit105cf201420a14a707a4a69ab9eb30971d59b1b5
treecc15d44b4e8d71aaa4cced3961b0ae3c71246f42
parentd1465365b1d96f11bb37f16c1afb692b28956be5
net/mlx5: Fix mlx5_get_vector_affinity function

Adding the vector offset when calling to mlx5_vector2eqn() is wrong.
This is because mlx5_vector2eqn() checks if EQ index is equal to vector number
and the fact that the internal completion vectors that mlx5 allocates
don't get an EQ index.

The second problem here is that using effective_affinity_mask gives the same
CPU for different vectors.
This leads to unmapped queues when calling it from blk_mq_rdma_map_queues().
This doesn't happen when using affinity_hint mask.

Fixes: 47d2266631c5 ("mlx5: fix mlx5_get_vector_affinity to start from completion vector 0")
Fixes: 30e26272050a ("net/mlx5: Fix get vector affinity helper function")
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
drivers/infiniband/hw/mlx5/main.c
include/linux/mlx5/driver.h