* [PATCH v1] IB/cma: Use inner P_Key to determine netdev
@ 2015-10-20 6:53 Haggai Eran
[not found] ` <1445323981-28582-1-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Haggai Eran @ 2015-10-20 6:53 UTC (permalink / raw)
To: Doug Ledford
Cc: Sean Hefty, Hal Rosenstock, Jason Gunthorpe, Ira Weiny,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Eli Cohen, Or Gerlitz,
Haggai Eran
When discussing the patches to demux ids in rdma_cm instead of ib_cm, it
was decided that it is best to use the P_Key value in the packet headers.
However, the mlx5 and ipath drivers are currently unable to send correct
P_Key values in GMP headers. They always send using a single P_Key that is
set during the GSI QP initialization.
Change the rdma_cm code to look at the P_Key value that is part of the
packet payload as a workaround. Once the drivers are fixed this patch can
be reverted.
Fixes: 4c21b5bcef73 ("IB/cma: Add net_dev and private data checks to
RDMA CM")
Signed-off-by: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Changes from v0:
- improve commit message
drivers/infiniband/core/cma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 59a2dafc8c57..e8324543e085 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1067,14 +1067,14 @@ static int cma_save_req_info(const struct ib_cm_event *ib_event,
sizeof(req->local_gid));
req->has_gid = true;
req->service_id = req_param->primary_path->service_id;
- req->pkey = req_param->bth_pkey;
+ req->pkey = be16_to_cpu(req_param->primary_path->pkey);
break;
case IB_CM_SIDR_REQ_RECEIVED:
req->device = sidr_param->listen_id->device;
req->port = sidr_param->port;
req->has_gid = false;
req->service_id = sidr_param->service_id;
- req->pkey = sidr_param->bth_pkey;
+ req->pkey = sidr_param->pkey;
break;
default:
return -EINVAL;
--
1.7.11.2
--
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] 4+ messages in thread[parent not found: <1445323981-28582-1-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH v1] IB/cma: Use inner P_Key to determine netdev [not found] ` <1445323981-28582-1-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> @ 2015-10-20 7:20 ` Doug Ledford [not found] ` <5625EB59.4020304-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Doug Ledford @ 2015-10-20 7:20 UTC (permalink / raw) To: Haggai Eran Cc: Sean Hefty, Hal Rosenstock, Jason Gunthorpe, Ira Weiny, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Eli Cohen, Or Gerlitz [-- Attachment #1: Type: text/plain, Size: 1941 bytes --] On 10/20/2015 02:53 AM, Haggai Eran wrote: > When discussing the patches to demux ids in rdma_cm instead of ib_cm, it > was decided that it is best to use the P_Key value in the packet headers. > However, the mlx5 and ipath drivers are currently unable to send correct > P_Key values in GMP headers. They always send using a single P_Key that is > set during the GSI QP initialization. > > Change the rdma_cm code to look at the P_Key value that is part of the > packet payload as a workaround. Once the drivers are fixed this patch can > be reverted. > > Fixes: 4c21b5bcef73 ("IB/cma: Add net_dev and private data checks to > RDMA CM") > Signed-off-by: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > --- > Changes from v0: > - improve commit message > > drivers/infiniband/core/cma.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c > index 59a2dafc8c57..e8324543e085 100644 > --- a/drivers/infiniband/core/cma.c > +++ b/drivers/infiniband/core/cma.c > @@ -1067,14 +1067,14 @@ static int cma_save_req_info(const struct ib_cm_event *ib_event, > sizeof(req->local_gid)); > req->has_gid = true; > req->service_id = req_param->primary_path->service_id; > - req->pkey = req_param->bth_pkey; > + req->pkey = be16_to_cpu(req_param->primary_path->pkey); > break; > case IB_CM_SIDR_REQ_RECEIVED: > req->device = sidr_param->listen_id->device; > req->port = sidr_param->port; > req->has_gid = false; > req->service_id = sidr_param->service_id; > - req->pkey = sidr_param->bth_pkey; > + req->pkey = sidr_param->pkey; > break; > default: > return -EINVAL; > And, to be clear, you are looking for this to be part of 4.3-rc updates, yes? -- Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> GPG KeyID: 0E572FDD [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 884 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <5625EB59.4020304-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH v1] IB/cma: Use inner P_Key to determine netdev [not found] ` <5625EB59.4020304-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2015-10-20 8:35 ` Haggai Eran [not found] ` <5625FCD8.8080807-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Haggai Eran @ 2015-10-20 8:35 UTC (permalink / raw) To: Doug Ledford Cc: Sean Hefty, Hal Rosenstock, Jason Gunthorpe, Ira Weiny, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Eli Cohen, Or Gerlitz On 20/10/2015 10:20, Doug Ledford wrote: > On 10/20/2015 02:53 AM, Haggai Eran wrote: >> When discussing the patches to demux ids in rdma_cm instead of ib_cm, it >> was decided that it is best to use the P_Key value in the packet headers. >> However, the mlx5 and ipath drivers are currently unable to send correct >> P_Key values in GMP headers. They always send using a single P_Key that is >> set during the GSI QP initialization. >> >> Change the rdma_cm code to look at the P_Key value that is part of the >> packet payload as a workaround. Once the drivers are fixed this patch can >> be reverted. >> >> Fixes: 4c21b5bcef73 ("IB/cma: Add net_dev and private data checks to >> RDMA CM") >> Signed-off-by: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> >> --- >> Changes from v0: >> - improve commit message >> >> drivers/infiniband/core/cma.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c >> index 59a2dafc8c57..e8324543e085 100644 >> --- a/drivers/infiniband/core/cma.c >> +++ b/drivers/infiniband/core/cma.c >> @@ -1067,14 +1067,14 @@ static int cma_save_req_info(const struct ib_cm_event *ib_event, >> sizeof(req->local_gid)); >> req->has_gid = true; >> req->service_id = req_param->primary_path->service_id; >> - req->pkey = req_param->bth_pkey; >> + req->pkey = be16_to_cpu(req_param->primary_path->pkey); >> break; >> case IB_CM_SIDR_REQ_RECEIVED: >> req->device = sidr_param->listen_id->device; >> req->port = sidr_param->port; >> req->has_gid = false; >> req->service_id = sidr_param->service_id; >> - req->pkey = sidr_param->bth_pkey; >> + req->pkey = sidr_param->pkey; >> break; >> default: >> return -EINVAL; >> > > And, to be clear, you are looking for this to be part of 4.3-rc updates, > yes? Yes, the issue was introduced in 4.3 in my cma demux patch. Haggai -- 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] 4+ messages in thread
[parent not found: <5625FCD8.8080807-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH v1] IB/cma: Use inner P_Key to determine netdev [not found] ` <5625FCD8.8080807-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> @ 2015-10-20 20:46 ` Doug Ledford 0 siblings, 0 replies; 4+ messages in thread From: Doug Ledford @ 2015-10-20 20:46 UTC (permalink / raw) To: Haggai Eran Cc: Sean Hefty, Hal Rosenstock, Jason Gunthorpe, Ira Weiny, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Eli Cohen, Or Gerlitz [-- Attachment #1: Type: text/plain, Size: 2208 bytes --] On 10/20/2015 04:35 AM, Haggai Eran wrote: > On 20/10/2015 10:20, Doug Ledford wrote: >> On 10/20/2015 02:53 AM, Haggai Eran wrote: >>> When discussing the patches to demux ids in rdma_cm instead of ib_cm, it >>> was decided that it is best to use the P_Key value in the packet headers. >>> However, the mlx5 and ipath drivers are currently unable to send correct >>> P_Key values in GMP headers. They always send using a single P_Key that is >>> set during the GSI QP initialization. >>> >>> Change the rdma_cm code to look at the P_Key value that is part of the >>> packet payload as a workaround. Once the drivers are fixed this patch can >>> be reverted. >>> >>> Fixes: 4c21b5bcef73 ("IB/cma: Add net_dev and private data checks to >>> RDMA CM") >>> Signed-off-by: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> >>> --- >>> Changes from v0: >>> - improve commit message >>> >>> drivers/infiniband/core/cma.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c >>> index 59a2dafc8c57..e8324543e085 100644 >>> --- a/drivers/infiniband/core/cma.c >>> +++ b/drivers/infiniband/core/cma.c >>> @@ -1067,14 +1067,14 @@ static int cma_save_req_info(const struct ib_cm_event *ib_event, >>> sizeof(req->local_gid)); >>> req->has_gid = true; >>> req->service_id = req_param->primary_path->service_id; >>> - req->pkey = req_param->bth_pkey; >>> + req->pkey = be16_to_cpu(req_param->primary_path->pkey); >>> break; >>> case IB_CM_SIDR_REQ_RECEIVED: >>> req->device = sidr_param->listen_id->device; >>> req->port = sidr_param->port; >>> req->has_gid = false; >>> req->service_id = sidr_param->service_id; >>> - req->pkey = sidr_param->bth_pkey; >>> + req->pkey = sidr_param->pkey; >>> break; >>> default: >>> return -EINVAL; >>> >> >> And, to be clear, you are looking for this to be part of 4.3-rc updates, >> yes? > > Yes, the issue was introduced in 4.3 in my cma demux patch. Applied, thanks. -- Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> GPG KeyID: 0E572FDD [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 884 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-20 20:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-20 6:53 [PATCH v1] IB/cma: Use inner P_Key to determine netdev Haggai Eran
[not found] ` <1445323981-28582-1-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-10-20 7:20 ` Doug Ledford
[not found] ` <5625EB59.4020304-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-20 8:35 ` Haggai Eran
[not found] ` <5625FCD8.8080807-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-10-20 20:46 ` Doug Ledford
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).