netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list
@ 2019-08-01  9:03 Hangbin Liu
  2019-08-01 10:28 ` Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Hangbin Liu @ 2019-08-01  9:03 UTC (permalink / raw)
  To: netdev; +Cc: Thomas Falcon, David S . Miller, Hangbin Liu

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@gmail.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


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

end of thread, other threads:[~2019-08-12 18:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-01  9:03 [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list Hangbin Liu
2019-08-01 10:28 ` Joe Perches
2019-08-01 14:10   ` Hangbin Liu
2019-08-01 17:54     ` Joe Perches
2019-08-01 16:51 ` David Miller
2019-08-01 21:34   ` Joe Perches
2019-08-02  9:53   ` Hangbin Liu
2019-08-09  0:29 ` [PATCHv2 net 0/2] Add netdev_level_ratelimited to avoid netdev msg flush Hangbin Liu
2019-08-09  0:29   ` [PATCHv2 net 1/2] netdevice.h: add netdev_level_ratelimited for netdevice Hangbin Liu
2019-08-09  0:29   ` [PATCHv2 net 2/2] ibmveth: use netdev_err_ratelimited when set_multicast_list Hangbin Liu
2019-08-12  4:08   ` [PATCHv2 net 0/2] Add netdev_level_ratelimited to avoid netdev msg flush David Miller
2019-08-12  7:37     ` Hangbin Liu
2019-08-12 15:56       ` Thomas Falcon
2019-08-12 18:27         ` David Miller

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).