From: Sagi Grimberg Date: Mon, 5 Feb 2018 14:24:52 +0000 (+0200) Subject: mlx5: fix mlx5_get_vector_affinity to start from completion vector 0 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2572cf57d75a7f91835d9a38771e9e76d575d122;p=openwrt%2Fstaging%2Fblogic.git mlx5: fix mlx5_get_vector_affinity to start from completion vector 0 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 Tested-by: Max Gurtovoy Reviewed-by: Max Gurtovoy Cc: # v4.15 Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford --- diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index fb7e8b205eb9..6ed79a8a8318 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -1277,7 +1277,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;