Re: [PATCH 4/9] efa: Move the context intialization out of efa_query_device_ex()

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

 



On Wed, Nov 18, 2020 at 02:45:42PM +0200, Gal Pressman wrote:

> > +	size_t resp_size = sizeof(resp);
> > +	unsigned int qp_table_sz;
> > +	int err;
> > +
> > +	if (ctx->cmds_supp_udata_mask & EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE) {
> > +		err = ibv_cmd_query_device_any(&ctx->ibvctx.context, NULL,
> > +					       &attr, sizeof(attr),
> > +					       &resp.ibv_resp, &resp_size);
> > +		if (err)
> > +			return err;
> > +
> > +		ctx->device_caps = resp.device_caps;
> > +		ctx->max_sq_wr = resp.max_sq_wr;
> > +		ctx->max_rq_wr = resp.max_rq_wr;
> > +		ctx->max_sq_sge = resp.max_sq_sge;
> > +		ctx->max_rq_sge = resp.max_rq_sge;
> > +		ctx->max_rdma_size = resp.max_rdma_size;
> > +		ctx->max_wr_rdma_sge = attr.orig_attr.max_sge_rd;
> 
> max_wr_rdma_sge assignment can be done in the else clause as well.

Yes, it is the same mistake as I did in mlx5

I updated everything, thanks

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