diff mbox series

[net-next] net/mlx5: rate limit alloc_ent error messages

Message ID 1571905413-28405-1-git-send-email-lirongqing@baidu.com
State Awaiting Upstream
Delegated to: David Miller
Headers show
Series [net-next] net/mlx5: rate limit alloc_ent error messages | expand

Commit Message

Li RongQing Oct. 24, 2019, 8:23 a.m. UTC
when debug a bug, which triggers TX hang, and kernel log is
spammed with the following info message

    [ 1172.044764] mlx5_core 0000:21:00.0: cmd_work_handler:930:(pid 8):
    failed to allocate command entry

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Oct. 28, 2019, 8:35 p.m. UTC | #1
From: Li RongQing <lirongqing@baidu.com>
Date: Thu, 24 Oct 2019 16:23:33 +0800

> when debug a bug, which triggers TX hang, and kernel log is
> spammed with the following info message
> 
>     [ 1172.044764] mlx5_core 0000:21:00.0: cmd_work_handler:930:(pid 8):
>     failed to allocate command entry
> 
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Saeed, please pick this up if you haven't already.

Thank you.
Saeed Mahameed Oct. 28, 2019, 10:24 p.m. UTC | #2
On Mon, 2019-10-28 at 13:35 -0700, David Miller wrote:
> From: Li RongQing <lirongqing@baidu.com>
> Date: Thu, 24 Oct 2019 16:23:33 +0800
> 
> > when debug a bug, which triggers TX hang, and kernel log is
> > spammed with the following info message
> > 
> >     [ 1172.044764] mlx5_core 0000:21:00.0:
> cmd_work_handler:930:(pid 8):
> >     failed to allocate command entry
> > 
> > Signed-off-by: Li RongQing <lirongqing@baidu.com>
> 
> Saeed, please pick this up if you haven't already.
> 
> Thank you.

Sorry for the delays, applied to net-next-mlx5, will be submitted to
net-next shortly.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index ea934cd02448..34cba97f7bf4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -866,7 +866,7 @@  static void cmd_work_handler(struct work_struct *work)
 	if (!ent->page_queue) {
 		alloc_ret = alloc_ent(cmd);
 		if (alloc_ret < 0) {
-			mlx5_core_err(dev, "failed to allocate command entry\n");
+			mlx5_core_err_rl(dev, "failed to allocate command entry\n");
 			if (ent->callback) {
 				ent->callback(-EAGAIN, ent->context);
 				mlx5_free_cmd_msg(dev, ent->out);