[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190801090347.8258-1-liuhangbin@gmail.com>
Date: Thu, 1 Aug 2019 17:03:47 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org
Cc: Thomas Falcon <tlfalcon@...ux.ibm.com>,
"David S . Miller" <davem@...emloft.net>,
Hangbin Liu <liuhangbin@...il.com>
Subject: [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list
When setting lots of multicast list on ibmveth, e.g. add 3000 membership on a
multicast group, the following error message flushes our log file
8507 [ 901.478251] ibmveth 30000003 env3: h_multicast_ctrl rc=4 when adding an entry to the filter table
...
1718386 [ 5636.808658] ibmveth 30000003 env3: h_multicast_ctrl rc=4 when adding an entry to the filter table
We got 1.5 million lines of messages in 1.3h. Let's replace netdev_err() by
net_err_ratelimited() to avoid this issue. I don't use netdev_err_once() in
case h_multicast_ctrl() return different lpar_rc types.
Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
---
drivers/net/ethernet/ibm/ibmveth.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index d654c234aaf7..3b9406a4ca92 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1446,9 +1446,11 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
IbmVethMcastAddFilter,
mcast_addr);
if (lpar_rc != H_SUCCESS) {
- netdev_err(netdev, "h_multicast_ctrl rc=%ld "
- "when adding an entry to the filter "
- "table\n", lpar_rc);
+ net_err_ratelimited("%s %s%s: h_multicast_ctrl rc=%ld when adding an entry to the filter table\n",
+ ibmveth_driver_name,
+ netdev_name(netdev),
+ netdev_reg_state(netdev),
+ lpar_rc);
}
}
--
2.19.2
Powered by blists - more mailing lists