Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Gal Pressman <gal.pressman@linux.dev>
To: Michael Margolin <mrgolin@amazon.com>
Cc: jgg@nvidia.com, leon@kernel.org, linux-rdma@vger.kernel.org,
	sleybo@amazon.com, matua@amazon.com,
	Yonatan Nachum <ynachum@amazon.com>
Subject: Re: [PATCH for-next] RDMA/efa: Report device node description
Date: Thu, 3 Dec 2026 11:07:10 +0200	[thread overview]
Message-ID: <ad7dc2ea-f573-414d-85f5-0aecfba294e2@linux.dev> (raw)
In-Reply-To: <20261203085633.GA14440@dev-dsk-mrgolin-1c-b2091117.eu-west-1.amazon.com>

On 03/12/2026 10:56, Michael Margolin wrote:> On Wed, Dec 02, 2026 at
07:11:52PM +0200, Gal Pressman wrote:
>> On 02/12/2026 18:42, Michael Margolin wrote:
>>> +int efa_com_get_node_desc(struct efa_com_dev *edev,
>>> +			  struct efa_com_get_node_desc_result *result)
>>> +{
>>> +	struct efa_admin_get_feature_resp resp;
>>> +	struct efa_admin_feature_node_desc *nd;
>>> +	u32 buf_size = sizeof(*nd);
>>> +	dma_addr_t nd_dma;
>>> +	int err;
>>> +
>>> +	BUILD_BUG_ON(sizeof(nd->node_desc) > sizeof(result->node_desc));
>>> +
>>> +	nd = dma_alloc_coherent(edev->dmadev, buf_size, &nd_dma, GFP_KERNEL);
>>> +	if (!nd)
>>> +		return -ENOMEM;
>>> +
>>> +	err = efa_com_get_feature_ex(edev, &resp, EFA_ADMIN_NODE_DESC, nd_dma,
>>> +				     buf_size);
>>
>> Surprising it's the first usage of the control buffer and it actually
>> works. Is it needed because there's no room in the command response?
> 
> It worked as is, so the credit goes to whoever wrote it :)

:)

> And yes, the response only has room for 56 bytes, so the 64-byte node
> description needs to go through the control buffer.
I do not know what node description is used for, but the code looks good
to me.

Reviewed-by: Gal Pressman <gal.pressman@linux.dev>

      reply	other threads:[~2026-12-03  9:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 16:42 [PATCH for-next] RDMA/efa: Report device node description Michael Margolin
2026-12-02 16:45 ` sashiko-bot
2026-12-02 17:11 ` Gal Pressman
2026-12-03  8:56   ` Michael Margolin
2026-12-03  9:07     ` Gal Pressman [this message]

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=ad7dc2ea-f573-414d-85f5-0aecfba294e2@linux.dev \
    --to=gal.pressman@linux.dev \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matua@amazon.com \
    --cc=mrgolin@amazon.com \
    --cc=sleybo@amazon.com \
    --cc=ynachum@amazon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox