diff mbox

[2/2] net/mlx5: fix affinity mask for completion vectors

Message ID 1517840992-29813-2-git-send-email-maxg@mellanox.com (mailing list archive)
State Superseded
Headers show

Commit Message

Max Gurtovoy Feb. 5, 2018, 2:29 p.m. UTC
Add an offset to ignore private mlx5 vectors.

Fixes: 05e0cc84e00c ("net/mlx5: Fix get vector affinity helper function")
Cc: <stable@vger.kernel.org>
Cc: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
 include/linux/mlx5/driver.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Sagi Grimberg Feb. 5, 2018, 2:36 p.m. UTC | #1
Already sent a patch, you can ignore this one.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index a061042..9bab9d3 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -1229,6 +1229,7 @@  enum {
 	MLX5_TRIGGERED_CMD_COMP = (u64)1 << 32,
 };
 
+/* Returns the affinity mask of a completion vector */
 static inline const struct cpumask *
 mlx5_get_vector_affinity(struct mlx5_core_dev *dev, int vector)
 {
@@ -1238,7 +1239,7 @@  enum {
 	int eqn;
 	int err;
 
-	err = mlx5_vector2eqn(dev, vector, &eqn, &irq);
+	err = mlx5_vector2eqn(dev, MLX5_EQ_VEC_COMP_BASE + vector, &eqn, &irq);
 	if (err)
 		return NULL;