aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/cache.c
diff options
context:
space:
mode:
authorMaor Gottlieb <[email protected]>2025-06-16 08:26:21 +0000
committerJason Gunthorpe <[email protected]>2025-06-17 17:14:53 +0000
commit333e4d79316c9ed5877d7aac8b8ed22efc74e96d (patch)
tree7b984625e3a1c3319796975507b7d6b62def114f /drivers/infiniband/core/cache.c
parentRDMA/mlx5: Fix unsafe xarray access in implicit ODP handling (diff)
downloadkernel-333e4d79316c9ed5877d7aac8b8ed22efc74e96d.tar.gz
kernel-333e4d79316c9ed5877d7aac8b8ed22efc74e96d.zip
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 <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/infiniband/core/cache.c')
-rw-r--r--drivers/infiniband/core/cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index 9979a351577f..81cf3c902e81 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -582,8 +582,8 @@ static int __ib_cache_gid_add(struct ib_device *ib_dev, u32 port,
out_unlock:
mutex_unlock(&table->lock);
if (ret)
- pr_warn("%s: unable to add gid %pI6 error=%d\n",
- __func__, gid->raw, ret);
+ pr_warn_ratelimited("%s: unable to add gid %pI6 error=%d\n",
+ __func__, gid->raw, ret);
return ret;
}