All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mlx5: fix mlx5_get_vector_affinity to start from completion vector 0
@ 2018-02-05 14:24 ` Sagi Grimberg
  0 siblings, 0 replies; 12+ messages in thread
From: Sagi Grimberg @ 2018-02-05 14:24 UTC (permalink / raw)


The consumers of this routine expects the affinity map of of vector
index relative to the first completion vector. The upper layers are
not aware of internal/private completion vectors that mlx5 allocates
for its own usage.

Hence, return the affinity map of vector index relative to the first
completion vector.

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

diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index a0610427e168..b82c4ae92411 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -1238,7 +1238,7 @@ mlx5_get_vector_affinity(struct mlx5_core_dev *dev, int vector)
 	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;
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-02-05 17:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-05 14:24 [PATCH] mlx5: fix mlx5_get_vector_affinity to start from completion vector 0 Sagi Grimberg
2018-02-05 14:24 ` Sagi Grimberg
2018-02-05 14:28 ` Sagi Grimberg
2018-02-05 14:28   ` Sagi Grimberg
2018-02-05 15:23   ` Doug Ledford
2018-02-05 15:23     ` Doug Ledford
2018-02-05 15:28     ` Sagi Grimberg
2018-02-05 15:28       ` Sagi Grimberg
2018-02-05 15:57 ` Doug Ledford
2018-02-05 15:57   ` Doug Ledford
2018-02-05 17:16 ` Logan Gunthorpe
2018-02-05 17:16   ` Logan Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.