Skip to content
/ linux Public

Commit 7fe1872

Browse files
ajmesSasha Levin
authored andcommitted
IB/cache: update gid cache on client reregister event
[ Upstream commit ddd6c8c ] Some HCAs (e.g: ConnectX4) do not trigger a IB_EVENT_GID_CHANGE on subnet prefix update from SM (PortInfo). Since the commit d58c23c ("IB/core: Only update PKEY and GID caches on respective events"), 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: d58c23c ("IB/core: Only update PKEY and GID caches on respective events") Signed-off-by: Etienne AUJAMES <eaujames@ddn.com> Link: https://patch.msgid.link/aVUfsO58QIDn5bGX@eaujamesFR0130 Reviewed-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 660a9c1 commit 7fe1872

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/infiniband/core/cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,8 @@ static void ib_cache_event_task(struct work_struct *_work)
15551555
* the cache.
15561556
*/
15571557
ret = ib_cache_update(work->event.device, work->event.element.port_num,
1558-
work->event.event == IB_EVENT_GID_CHANGE,
1558+
work->event.event == IB_EVENT_GID_CHANGE ||
1559+
work->event.event == IB_EVENT_CLIENT_REREGISTER,
15591560
work->event.event == IB_EVENT_PKEY_CHANGE,
15601561
work->enforce_security);
15611562

0 commit comments

Comments
 (0)