Re: [PATCH 3/9] mlx5: Move context initialization out of mlx5_query_device_ex()

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

 



On Tue, Nov 17, 2020 at 07:24:41PM +0200, Yishai Hadas wrote:

> > +void mlx5_query_device_ctx(struct mlx5_context *mctx)
> > +{
> > +	struct ibv_device_attr_ex device_attr;
> > +	struct mlx5_query_device_ex_resp resp;
> > +	size_t resp_size = sizeof(resp);
> > +
> > +	get_lag_caps(mctx);
> > +
> > +	if (!(mctx->cmds_supp_uhw & MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE))
> > +		return;
> > +

> Any reason to not read some applicable context fields (e.g. max_dm_size)
> over uverbs by reducing the resp_size to the ib part ?

No, I missed the device_attr detail

> > +	if (ibv_cmd_query_device_any(&mctx->ibv_ctx.context, NULL, &device_attr,
> > +				     sizeof(device_attr), &resp.ibv_resp,
> > +				     &resp_size))
> > +		return;
> > +
> > +	mctx->cached_device_cap_flags = device_attr.orig_attr.device_cap_flags;
> > +	mctx->atomic_cap = device_attr.orig_attr.atomic_cap;
> > +	mctx->cached_tso_caps = device_attr.tso_caps;
> 
> The device_attr.tso_caps is not set over uverbs / cmd_device.c, it
> comes as UHW.  The below should be done instead.

Got it

I updated the github

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