[PATCH] rtlwifi: ratelimit skb allocation failure message

Subsystems: networking drivers (wireless), the rest · Maintainers: Johannes Berg, Linus Torvalds

STALE4276d

2 messages, 2 authors, 2015-02-10 · open the first message on its own page

[PATCH] rtlwifi: ratelimit skb allocation failure message

From: Colin King <hidden>
Date: 2015-02-10 08:55:56

From: Colin Ian King <redacted>

when running low on memory I noticed rtlwifi was producing a large
quantity of repeated skb allocation failures messages.  This should
be ratelimited to reduce the noise.

Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/wireless/rtlwifi/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index c70efb9..ca0fd50 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -817,7 +817,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
 		/* get a new skb - if fail, old one will be reused */
 		new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
 		if (unlikely(!new_skb)) {
-			pr_err("Allocation of new skb failed in %s\n",
+			pr_err_ratelimited("Allocation of new skb failed in %s\n",
 			       __func__);
 			goto no_new;
 		}
-- 
2.1.4

Re: [PATCH] rtlwifi: ratelimit skb allocation failure message

From: Eric Dumazet <hidden>
Date: 2015-02-10 13:17:17

On Tue, 2015-02-10 at 08:54 +0000, Colin King wrote:
quoted hunk
From: Colin Ian King <redacted>

when running low on memory I noticed rtlwifi was producing a large
quantity of repeated skb allocation failures messages.  This should
be ratelimited to reduce the noise.

Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/wireless/rtlwifi/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index c70efb9..ca0fd50 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -817,7 +817,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
 		/* get a new skb - if fail, old one will be reused */
 		new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
 		if (unlikely(!new_skb)) {
-			pr_err("Allocation of new skb failed in %s\n",
+			pr_err_ratelimited("Allocation of new skb failed in %s\n",
 			       __func__);
Or even better, remove the message.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help