public inbox for linux-rdma@vger.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
       [not found] ` <20180205142452.7630-1-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Sagi Grimberg @ 2018-02-05 14:24 UTC (permalink / raw)
  To: Jason Gunthorpe, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Logan Gunthorpe,
	Stephen Bates, Saeed Mahameed, Max Gurtuvoy

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-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
Tested-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v4.15
Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mlx5: fix mlx5_get_vector_affinity to start from completion vector 0
       [not found] ` <20180205142452.7630-1-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
@ 2018-02-05 14:28   ` Sagi Grimberg
       [not found]     ` <64670132-9662-9bbe-9979-fd02260a7fb3-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  2018-02-05 15:57   ` Doug Ledford
  2018-02-05 17:16   ` Logan Gunthorpe
  2 siblings, 1 reply; 6+ messages in thread
From: Sagi Grimberg @ 2018-02-05 14:28 UTC (permalink / raw)
  To: Jason Gunthorpe, Doug Ledford
  Cc: Saeed Mahameed, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stephen Bates,
	Max Gurtuvoy, Logan Gunthorpe

Sorry, now my .gitaliases updated with Jason's correct email.


On 02/05/2018 04:24 PM, Sagi Grimberg wrote:
> 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-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
> Tested-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v4.15
> Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
> ---
>   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;
>   
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mlx5: fix mlx5_get_vector_affinity to start from completion vector 0
       [not found]     ` <64670132-9662-9bbe-9979-fd02260a7fb3-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
@ 2018-02-05 15:23       ` Doug Ledford
       [not found]         ` <1517844212.3936.64.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Ledford @ 2018-02-05 15:23 UTC (permalink / raw)
  To: Sagi Grimberg, Jason Gunthorpe
  Cc: Saeed Mahameed, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stephen Bates,
	Max Gurtuvoy, Logan Gunthorpe

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

On Mon, 2018-02-05 at 16:28 +0200, Sagi Grimberg wrote:
> Sorry, now my .gitaliases updated with Jason's correct email.

Jason prefers jgg-uk2M96/98Pc@public.gmane.org for his upstream work, so might need to
update again ;-)

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] mlx5: fix mlx5_get_vector_affinity to start from completion vector 0
       [not found]         ` <1517844212.3936.64.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2018-02-05 15:28           ` Sagi Grimberg
  0 siblings, 0 replies; 6+ messages in thread
From: Sagi Grimberg @ 2018-02-05 15:28 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Saeed Mahameed, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stephen Bates,
	Max Gurtuvoy, Logan Gunthorpe

>> Sorry, now my .gitaliases updated with Jason's correct email.
> 
> Jason prefers jgg-uk2M96/98Pc@public.gmane.org for his upstream work, so might need to
> update again ;-)

Updated ;)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mlx5: fix mlx5_get_vector_affinity to start from completion vector 0
       [not found] ` <20180205142452.7630-1-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  2018-02-05 14:28   ` Sagi Grimberg
@ 2018-02-05 15:57   ` Doug Ledford
  2018-02-05 17:16   ` Logan Gunthorpe
  2 siblings, 0 replies; 6+ messages in thread
From: Doug Ledford @ 2018-02-05 15:57 UTC (permalink / raw)
  To: Sagi Grimberg, Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Logan Gunthorpe,
	Stephen Bates, Saeed Mahameed, Max Gurtuvoy

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

On Mon, 2018-02-05 at 16:24 +0200, Sagi Grimberg wrote:
> 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-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
> Tested-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v4.15
> Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>

Thanks, applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] mlx5: fix mlx5_get_vector_affinity to start from completion vector 0
       [not found] ` <20180205142452.7630-1-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
  2018-02-05 14:28   ` Sagi Grimberg
  2018-02-05 15:57   ` Doug Ledford
@ 2018-02-05 17:16   ` Logan Gunthorpe
  2 siblings, 0 replies; 6+ messages in thread
From: Logan Gunthorpe @ 2018-02-05 17:16 UTC (permalink / raw)
  To: Sagi Grimberg, Jason Gunthorpe, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Stephen Bates,
	Saeed Mahameed, Max Gurtuvoy

Thanks Sagi,

I can confirm this fixes our issue.

Nice Catch!

Logan

On 05/02/18 07:24 AM, Sagi Grimberg wrote:
> 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-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
> Tested-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v4.15
> Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
> ---
>   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;
>   
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

Thread overview: 6+ 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
     [not found] ` <20180205142452.7630-1-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2018-02-05 14:28   ` Sagi Grimberg
     [not found]     ` <64670132-9662-9bbe-9979-fd02260a7fb3-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2018-02-05 15:23       ` Doug Ledford
     [not found]         ` <1517844212.3936.64.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-02-05 15:28           ` Sagi Grimberg
2018-02-05 15:57   ` Doug Ledford
2018-02-05 17:16   ` Logan Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox