Message ID | 1518460956-4629-1-git-send-email-aditr@vmware.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Mon, Feb 12, 2018 at 10:42:36AM -0800, Adit Ranadive wrote: > From: Aditya Sarwade <asarwade@vmware.com> > > Here's a fix for the vmw_pvrdma library. It needs to go into the > stable branch for 16.0 as well since we can then add it to OFED-4.8-2. > > The PR is here: > https://github.com/linux-rdma/rdma-core/pull/291 > > Thanks, > Adit > > Use the correct SQN reported by the driver. > > Fixes: 4c8ed14eb6b7 ("vmw_pvrdma: Add SRQ support") > Reviewed-by: Adit Ranadive <aditr@vmware.com> > Reviewed-by: Bryan Tan <bryantan@vmware.com> > Signed-off-by: Aditya Sarwade <asarwade@vmware.com> > Cc: stable@linux-rdma.org > providers/vmw_pvrdma/qp.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c > index 34c8020..efcc99b 100644 > +++ b/providers/vmw_pvrdma/qp.c > @@ -108,7 +108,7 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd, > { > struct pvrdma_device *dev = to_vdev(pd->context->device); > struct user_pvrdma_create_srq cmd; > - struct ib_uverbs_create_srq_resp resp; > + struct user_pvrdma_create_srq_resp resp; > struct pvrdma_srq *srq; > int ret; > > @@ -142,12 +142,12 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd, > > ret = ibv_cmd_create_srq(pd, &srq->ibv_srq, attr, > &cmd.ibv_cmd, sizeof(cmd), > - &resp, sizeof(resp)); > + &resp.ibv_resp, sizeof(resp)); > > if (ret) > goto err_free; > > - srq->srqn = resp.srqn; > + srq->srqn = resp.udata.srqn; I can't make sense of this. Why doesn't grep turn up anything for struct pvrdma_create_srq_resp in the kernel? And why do we have two things called srqn in this struct? Jason -- 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
On 2/12/18 10:59 AM, Jason Gunthorpe wrote: > On Mon, Feb 12, 2018 at 10:42:36AM -0800, Adit Ranadive wrote: >> From: Aditya Sarwade <asarwade@vmware.com> >> >> Here's a fix for the vmw_pvrdma library. It needs to go into the >> stable branch for 16.0 as well since we can then add it to OFED-4.8-2. >> <snip> > > I can't make sense of this. > > Why doesn't grep turn up anything for struct pvrdma_create_srq_resp in > the kernel? Do you mean user_pvrdma_create_srq_resp? There isn’t one. Its part of our ABI fix up in rdma-core. > > And why do we have two things called srqn in this struct? It looks like the uverbs in the kernel reports the XRC SRQN in the one of these while the other gets populated by the driver in the udata here. The SRQN for a regular SRQ only gets reported in this second srqn field. I'm not sure why that's the case but we need to report the one from the driver here then. > > Jason > -- 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
On Mon, Feb 12, 2018 at 02:23:18PM -0800, Adit Ranadive wrote: > > I can't make sense of this. > > > > Why doesn't grep turn up anything for struct pvrdma_create_srq_resp in > > the kernel? > > Do you mean user_pvrdma_create_srq_resp? There isn’t one. No, I mean what I wrote.. include/uapi/rdma/vmw_pvrdma-abi.h:struct pvrdma_create_srq_resp { Why isn't it used anywhere? > > And why do we have two things called srqn in this struct? > > It looks like the uverbs in the kernel reports the XRC SRQN in the one of > these while the other gets populated by the driver in the udata here. The SRQN > for a regular SRQ only gets reported in this second srqn field. > I'm not sure why that's the case but we need to report the one from the > driver here then. Ok Jason -- 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
On 2/12/18 2:26 PM, Jason Gunthorpe wrote: > On Mon, Feb 12, 2018 at 02:23:18PM -0800, Adit Ranadive wrote: > >>> I can't make sense of this. >>> >>> Why doesn't grep turn up anything for struct pvrdma_create_srq_resp in >>> the kernel? >> >> Do you mean user_pvrdma_create_srq_resp? There isn’t one. > > No, I mean what I wrote.. > > include/uapi/rdma/vmw_pvrdma-abi.h:struct pvrdma_create_srq_resp { > > Why isn't it used anywhere? Hrm, it should be. We seem to be copying the srqn directly into the udata rather than using this structure for copying. I'll send out a patch for this. We still need the rdma-core patch though independently of this kernel patch. -- 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
Le 12/02/2018 à 19:42, Adit Ranadive a écrit : > From: Aditya Sarwade <asarwade@vmware.com> > > Here's a fix for the vmw_pvrdma library. It needs to go into the > stable branch for 16.0 as well since we can then add it to OFED-4.8-2. > > The PR is here: > https://github.com/linux-rdma/rdma-core/pull/291 > > Thanks, > Adit > --- > Submitted to stable-v16. Do you know when OFED 4.8-2 is going out ? Is a new v16.3 release needed right now ? Nicolas -- 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
OFED 4.8.2 rc1 was just released on 02/09/2018. The Openfabrics EWG chair thinks maybe 2-4 weeks out for OFED 4.8.2. Cheers. -- Llolsten -----Original Message----- From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-owner@vger.kernel.org] On Behalf Of Nicolas Morey-Chaisemartin Sent: Tuesday, February 13, 2018 7:24 AM To: Adit Ranadive <aditr@vmware.com>; dledford@redhat.com; jgg@mellanox.com; leon@kernel.org Cc: linux-rdma@vger.kernel.org; Aditya Sarwade <asarwade@vmware.com>; stable@linux-rdma.org Subject: Re: [PATCH rdma-core] vmw_pvrdma: Fix SRQN returned to library Le 12/02/2018 à 19:42, Adit Ranadive a écrit : > From: Aditya Sarwade <asarwade@vmware.com> > > Here's a fix for the vmw_pvrdma library. It needs to go into the > stable branch for 16.0 as well since we can then add it to OFED-4.8-2. > > The PR is here: > https://github.com/linux-rdma/rdma-core/pull/291 > > Thanks, > Adit > --- > Submitted to stable-v16. Do you know when OFED 4.8-2 is going out ? Is a new v16.3 release needed right now ? Nicolas -- 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 -- 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
On 2/13/18 4:24 AM, Nicolas Morey-Chaisemartin wrote: > > Submitted to stable-v16. > Do you know when OFED 4.8-2 is going out ? Is a new v16.3 release needed right now ? > Thanks Nicolas! We would need a v16.3 for OFED-4.8-2 but let me test OFED-4.8-2 RC1 with this change and get back to you today. Thanks, Adit -- 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
On 2/13/18 4:24 AM, Nicolas Morey-Chaisemartin wrote: > > > > Submitted to stable-v16. > Do you know when OFED 4.8-2 is going out ? Is a new v16.3 release needed right now ? > Thanks Nicolas! I have completed my testing so we would need a new v16.3 release. I can let Vlad know once its generated for him to pick up the new rdma-core. Thanks, Adit -- 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
Le 14/02/2018 à 07:12, Adit Ranadive a écrit : > On 2/13/18 4:24 AM, Nicolas Morey-Chaisemartin wrote: >> >> >> Submitted to stable-v16. >> Do you know when OFED 4.8-2 is going out ? Is a new v16.3 release needed right now ? >> > Thanks Nicolas! I have completed my testing so we would need a new v16.3 release. > I can let Vlad know once its generated for him to pick up the new rdma-core. > > Thanks, > Adit > -- Do you mind if I wait til next week for a release ? There are no more fixes pending atm, but if you're not in a hurry, I'd like to wait a bit to avoid releasing too often. Nicolas -- 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
On 2/13/18 11:59 PM, Nicolas Morey-Chaisemartin wrote: > > > Le 14/02/2018 à 07:12, Adit Ranadive a écrit : >> On 2/13/18 4:24 AM, Nicolas Morey-Chaisemartin wrote: >>> >>> >>> Submitted to stable-v16. >>> Do you know when OFED 4.8-2 is going out ? Is a new v16.3 release needed right now ? >>> >> Thanks Nicolas! I have completed my testing so we would need a new v16.3 release. >> I can let Vlad know once its generated for him to pick up the new rdma-core. >> >> Thanks, >> Adit >> -- > > Do you mind if I wait til next week for a release ? > There are no more fixes pending atm, but if you're not in a hurry, I'd like to wait a bit to avoid releasing too often. > That's fine with me. Unless, Vlad needs it asap. -- 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
On 2/13/18 11:59 PM, Nicolas Morey-Chaisemartin wrote: > > > Le 14/02/2018 à 07:12, Adit Ranadive a écrit : >> On 2/13/18 4:24 AM, Nicolas Morey-Chaisemartin wrote: >>> >>> >>> Submitted to stable-v16. >>> Do you know when OFED 4.8-2 is going out ? Is a new v16.3 release needed right now ? >>> >> Thanks Nicolas! I have completed my testing so we would need a new v16.3 release. >> I can let Vlad know once its generated for him to pick up the new rdma-core. >> >> Thanks, >> Adit >> -- > > Do you mind if I wait til next week for a release ? > There are no more fixes pending atm, but if you're not in a hurry, I'd like to wait a bit to avoid releasing too often. Hi Nicolas, Turns out there is one more patch that needs to go into v16.3. It was an older internal branch which I had forgotten about after we moved to a new git repo. Sorry for the mixup and thanks for holding up the release! I'll send out the other patch. Thanks, Adit -- 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 --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c index 34c8020..efcc99b 100644 --- a/providers/vmw_pvrdma/qp.c +++ b/providers/vmw_pvrdma/qp.c @@ -108,7 +108,7 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd, { struct pvrdma_device *dev = to_vdev(pd->context->device); struct user_pvrdma_create_srq cmd; - struct ib_uverbs_create_srq_resp resp; + struct user_pvrdma_create_srq_resp resp; struct pvrdma_srq *srq; int ret; @@ -142,12 +142,12 @@ struct ibv_srq *pvrdma_create_srq(struct ibv_pd *pd, ret = ibv_cmd_create_srq(pd, &srq->ibv_srq, attr, &cmd.ibv_cmd, sizeof(cmd), - &resp, sizeof(resp)); + &resp.ibv_resp, sizeof(resp)); if (ret) goto err_free; - srq->srqn = resp.srqn; + srq->srqn = resp.udata.srqn; return &srq->ibv_srq;