Re: [PATCH rdma-core] vmw_pvrdma: Fix SRQN returned to library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 12, 2018 at 10:42:36AM -0800, Adit Ranadive wrote:
> From: Aditya Sarwade <asarwade@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> Reviewed-by: Bryan Tan <bryantan@xxxxxxxxxx>
> Signed-off-by: Aditya Sarwade <asarwade@xxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxx
>  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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux