Re: [PATCH rdma-rc] IB/uverbs: Don't use the address vector's port number during modify_qp

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

 



On Mon, Jun 25, 2018 at 10:39:02AM +0300, jackm wrote:
> On Wed, 20 Jun 2018 12:00:37 -0600
> Jason Gunthorpe <jgg@xxxxxxxxxxxx> wrote:
> 
> 
> > 
> > diff --git a/drivers/infiniband/core/uverbs_cmd.c
> > b/drivers/infiniband/core/uverbs_cmd.c index
> > 908ee8ab32972f..d34179d2aa6d4b 100644 ---
> > a/drivers/infiniband/core/uverbs_cmd.c +++
> > b/drivers/infiniband/core/uverbs_cmd.c @@ -2027,13 +2027,35 @@ static
> > int modify_qp(struct ib_uverbs_file *file, attr->alt_timeout
> > = cmd->base.alt_timeout; attr->rate_limit	  = cmd->rate_limit;
> >  
> > -	if (cmd->base.attr_mask & IB_QP_AV)
> > +	if (cmd->base.attr_mask & IB_QP_AV) {
> > +		unsigned int primary_port = (cmd->base.attr_mask & IB_QP_PORT) ?
> > +						cmd->base.port_num :
> > +						    qp->port;
> Hi Jason,
> You have a problem in the above line when qp != qp->real_qp (as is the case with XRC
> target QPs).

Is IB_QP_AV a valid modifier for XRC target QPs?

> Thus:
> +		unsigned int primary_port = (cmd->base.attr_mask & IB_QP_PORT) ?
> +						cmd->base.port_num :
> +						    qp->port;
> 
> should be:
> +		unsigned int primary_port = (cmd->base.attr_mask & IB_QP_PORT) ?
> +						cmd->base.port_num :
> +                                             qp->real_qp->port;

Okay

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