linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-next] RDMA/core: Rate limit GID cache warning messages
@ 2025-06-16  8:26 Leon Romanovsky
  2025-06-17 17:40 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2025-06-16  8:26 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: Maor Gottlieb, linux-rdma

From: Maor Gottlieb <maorg@nvidia.com>

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.

Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/core/cache.c | 4 ++--
 1 file 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;
 }
 
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH rdma-next] RDMA/core: Rate limit GID cache warning messages
  2025-06-16  8:26 [PATCH rdma-next] RDMA/core: Rate limit GID cache warning messages Leon Romanovsky
@ 2025-06-17 17:40 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2025-06-17 17:40 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: Maor Gottlieb, linux-rdma

On Mon, Jun 16, 2025 at 11:26:21AM +0300, Leon Romanovsky wrote:
> From: Maor Gottlieb <maorg@nvidia.com>
> 
> 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.
> 
> Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/core/cache.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to for-rc, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-17 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16  8:26 [PATCH rdma-next] RDMA/core: Rate limit GID cache warning messages Leon Romanovsky
2025-06-17 17:40 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).