All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Yishai Hadas <yishaih@nvidia.com>
Cc: <linux-rdma@vger.kernel.org>, Bob Pearson <rpearsonhpe@gmail.com>,
	<maorg@nvidia.com>
Subject: Re: [PATCH 3/9] mlx5: Move context initialization out of mlx5_query_device_ex()
Date: Tue, 17 Nov 2020 15:08:37 -0400	[thread overview]
Message-ID: <20201117190837.GW917484@nvidia.com> (raw)
In-Reply-To: <7f9d950b-329d-17d0-a25f-4e6f5851c26f@nvidia.com>

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

  reply	other threads:[~2020-11-17 19:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 20:23 [PATCH 0/9] Simplify query_device() in libibverbs Jason Gunthorpe
2020-11-16 20:23 ` [PATCH 1/9] verbs: Simplify query_device_ex Jason Gunthorpe
2020-11-16 20:23 ` [PATCH 2/9] verbs: Add ibv_cmd_query_device_any() Jason Gunthorpe
2020-11-18 12:43   ` Gal Pressman
2020-11-18 12:45     ` Jason Gunthorpe
2020-11-16 20:23 ` [PATCH 3/9] mlx5: Move context initialization out of mlx5_query_device_ex() Jason Gunthorpe
2020-11-17 17:24   ` Yishai Hadas
2020-11-17 19:08     ` Jason Gunthorpe [this message]
2020-11-16 20:23 ` [PATCH 4/9] efa: Move the context intialization out of efa_query_device_ex() Jason Gunthorpe
2020-11-18  7:39   ` Gal Pressman
2020-11-18  8:07   ` Gal Pressman
2020-11-18 12:45   ` Gal Pressman
2020-11-18 20:59     ` Jason Gunthorpe
2020-11-16 20:23 ` [PATCH 5/9] mlx4: Move the context intialization out of mlx4_query_device_ex() Jason Gunthorpe
2020-11-16 20:23 ` [PATCH 6/9] providers: Remove normal query_device() from providers that have _ex Jason Gunthorpe
2020-11-18 12:47   ` Gal Pressman
2020-11-16 20:23 ` [PATCH 7/9] providers: Convert all providers to implement query_device_ex Jason Gunthorpe
2020-11-16 20:23 ` [PATCH 8/9] verbs: Remove dead code Jason Gunthorpe
2020-11-18 12:46   ` Gal Pressman
2020-11-18 12:53     ` Jason Gunthorpe
2020-11-16 20:23 ` [PATCH 9/9] verbs: Delete query_device() internal support Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201117190837.GW917484@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@nvidia.com \
    --cc=rpearsonhpe@gmail.com \
    --cc=yishaih@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.