From: Etienne AUJAMES <eaujames@ddn.com>
To: linux-rdma@vger.kernel.org
Cc: Romain Fihue <romain.fihue@cea.fr>, Gael Delbary <gdelbary@ddn.com>
Subject: [PATCH] IB/cache: update gid cache on client reregister event
Date: Wed, 31 Dec 2025 14:07:45 +0100 [thread overview]
Message-ID: <aVUfsO58QIDn5bGX@eaujamesFR0130> (raw)
Some HCAs (e.g: ConnectX4) do not trigger a IB_EVENT_GID_CHANGE on
subnet prefix update from SM (PortInfo).
Since the d58c23c92548, the GID cache is updated exclusively on
IB_EVENT_GID_CHANGE. If this event is not emitted, the subnet prefix
in the IPoIB interface’s hardware address remains set to its default
value (0xfe80000000000000).
Then rdma_bind_addr() failed because it relies on hardware address to
find the port GID (subnet_prefix + port GUID).
This patch fixes this issue by updating the GID cache on
IB_EVENT_CLIENT_REREGISTER event (emitted on
PortInfo::ClientReregister=1).
Fixes: d58c23c92548 ("IB/core: Only update PKEY and GID caches onrespective events")
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
---
drivers/infiniband/core/cache.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index 81cf3c902e81..0fc1c5bce2f0 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -1537,7 +1537,8 @@ static void ib_cache_event_task(struct work_struct *_work)
* the cache.
*/
ret = ib_cache_update(work->event.device, work->event.element.port_num,
- work->event.event == IB_EVENT_GID_CHANGE,
+ work->event.event == IB_EVENT_GID_CHANGE ||
+ work->event.event == IB_EVENT_CLIENT_REREGISTER,
work->event.event == IB_EVENT_PKEY_CHANGE,
work->enforce_security);
--
2.51.1
next reply other threads:[~2025-12-31 13:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-31 13:07 Etienne AUJAMES [this message]
2026-01-03 14:11 ` [PATCH] IB/cache: update gid cache on client reregister event Parav Pandit
2026-01-04 14:37 ` Leon Romanovsky
2026-01-04 14:24 ` Leon Romanovsky
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=aVUfsO58QIDn5bGX@eaujamesFR0130 \
--to=eaujames@ddn.com \
--cc=gdelbary@ddn.com \
--cc=linux-rdma@vger.kernel.org \
--cc=romain.fihue@cea.fr \
/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