Re: [PATCH rdma-next v2 5/7] RDMA/cm: Send and receive ECE parameter over the wire

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

 



On Mon, May 25, 2020 at 02:58:12PM -0300, Jason Gunthorpe wrote:
> On Mon, Apr 13, 2020 at 05:15:36PM +0300, Leon Romanovsky wrote:
> > @@ -2204,6 +2220,12 @@ static void cm_format_rep(struct cm_rep_msg *rep_msg,
> >  		IBA_SET(CM_REP_LOCAL_EE_CONTEXT_NUMBER, rep_msg, param->qp_num);
> >  	}
> >
> > +	IBA_SET(CM_REP_VENDOR_ID_L, rep_msg, param->ece.vendor_id & 0xFF);
> > +	IBA_SET(CM_REP_VENDOR_ID_M, rep_msg,
> > +		(param->ece.vendor_id >> 8) & 0xFF);
> > +	IBA_SET(CM_REP_VENDOR_ID_H, rep_msg,
> > +		(param->ece.vendor_id >> 16) & 0xFF);
>
> I'm pretty sure the & 0xFF isn't needed?

vendor_id is 32 bits, but IBTA spec uses only 24 bits. I preferred to
write it implicitly, but of course IBA_SET() will mask it properly.

>
> > diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
> > index ed2c17046ee1..b67cdd2ef187 100644
> > +++ b/drivers/infiniband/core/ucma.c
> > @@ -362,7 +362,6 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id,
> >
> >  	uevent->resp.ece.vendor_id = event->ece.vendor_id;
> >  	uevent->resp.ece.attr_mod = event->ece.attr_mod;
> > -
> >  	if (event->event == RDMA_CM_EVENT_CONNECT_REQUEST) {
> >  		if (!ctx->backlog) {
> >  			ret = -ENOMEM;
>
> Extra hunk?

Right

>
> Jason



[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