Skip to content

Commit 333e4d7

Browse files
maorgottliebjgunthorpe
authored andcommitted
RDMA/core: Rate limit GID cache warning messages
The GID cache warning messages can flood the kernel log when there are multiple failed attempts to add GIDs. This can happen when creating many virtual interfaces without having enough space for their GIDs in the GID table. Change pr_warn to pr_warn_ratelimited to prevent log flooding while still maintaining visibility of the issue. Link: https://patch.msgid.link/r/fd45ed4a1078e743f498b234c3ae816610ba1b18.1750062357.git.leon@kernel.org Signed-off-by: Maor Gottlieb <maorg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 2c6b640 commit 333e4d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/infiniband/core/cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ static int __ib_cache_gid_add(struct ib_device *ib_dev, u32 port,
582582
out_unlock:
583583
mutex_unlock(&table->lock);
584584
if (ret)
585-
pr_warn("%s: unable to add gid %pI6 error=%d\n",
586-
__func__, gid->raw, ret);
585+
pr_warn_ratelimited("%s: unable to add gid %pI6 error=%d\n",
586+
__func__, gid->raw, ret);
587587
return ret;
588588
}
589589

0 commit comments

Comments
 (0)