Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Gal Pressman <gal.pressman@linux.dev>
To: Yonatan Nachum <ynachum@amazon.com>,
	jgg@nvidia.com, leon@kernel.org, linux-rdma@vger.kernel.org
Cc: mrgolin@amazon.com, sleybo@amazon.com, matua@amazon.com,
	Firas Jahjah <firasj@amazon.com>
Subject: Re: [PATCH for-next 2/2] RDMA/efa: Add AH cache handling on create and destroy AH
Date: Mon, 11 May 2026 11:00:43 +0300	[thread overview]
Message-ID: <de0c4cb0-4abe-4b2a-986f-c502018d16f0@linux.dev> (raw)
In-Reply-To: <20260510083035.458081-3-ynachum@amazon.com>

On 10/05/2026 11:30, Yonatan Nachum wrote:
> +static struct efa_ah_cache_entry *efa_ah_cache_lookup(struct efa_ah_cache *ah_cache, u16 pd,
> +						      u8 *gid)
> +	__must_hold(&ah_cache->lock)
> +{
> +	struct efa_ah_cache_key key;

Consider memsetting key to zero.

The code is fine today, but if padding will be added to the struct by
the compiler in the future, you'll likely have lookup issues.

> +
> +	memcpy(key.gid, gid, sizeof(key.gid));
> +	key.pd = pd;
> +
> +	return rhashtable_lookup_fast(&ah_cache->hashtable, &key, ah_cache_params);
> +}

      reply	other threads:[~2026-05-11  8:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10  8:30 [PATCH for-next 0/2] RDMA/efa: Add AH cache for AH reuse Yonatan Nachum
2026-05-10  8:30 ` [PATCH for-next 1/2] RDMA/efa: Add initialization of AH cache rhashtable Yonatan Nachum
2026-05-10  8:30 ` [PATCH for-next 2/2] RDMA/efa: Add AH cache handling on create and destroy AH Yonatan Nachum
2026-05-11  8:00   ` 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=de0c4cb0-4abe-4b2a-986f-c502018d16f0@linux.dev \
    --to=gal.pressman@linux.dev \
    --cc=firasj@amazon.com \
    --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