All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Doug Berger <opendmb@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.4 11/11] net: systemport: suppress warnings on failed Rx SKB allocations
Date: Thu, 30 Apr 2020 09:54:53 -0400	[thread overview]
Message-ID: <20200430135453.21353-11-sashal@kernel.org> (raw)
In-Reply-To: <20200430135453.21353-1-sashal@kernel.org>

From: Doug Berger <opendmb@gmail.com>

[ Upstream commit 3554e54a46125030c534820c297ed7f6c3907e24 ]

The driver is designed to drop Rx packets and reclaim the buffers
when an allocation fails, and the network interface needs to safely
handle this packet loss. Therefore, an allocation failure of Rx
SKBs is relatively benign.

However, the output of the warning message occurs with a high
scheduling priority that can cause excessive jitter/latency for
other high priority processing.

This commit suppresses the warning messages to prevent scheduling
problems while retaining the failure count in the statistics of
the network interface.

Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 3cb99ce7325b7..d46ea7a5e0886 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -526,7 +526,8 @@ static struct sk_buff *bcm_sysport_rx_refill(struct bcm_sysport_priv *priv,
 	dma_addr_t mapping;
 
 	/* Allocate a new SKB for a new packet */
-	skb = netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH);
+	skb = __netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH,
+				 GFP_ATOMIC | __GFP_NOWARN);
 	if (!skb) {
 		priv->mib.alloc_rx_buff_failed++;
 		netif_err(priv, rx_err, ndev, "SKB alloc failed\n");
-- 
2.20.1


      parent reply	other threads:[~2020-04-30 13:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 13:54 [PATCH AUTOSEL 4.4 01/11] iio:ad7797: Use correct attribute_group Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 02/11] selftests/ipc: Fix test failure seen after initial test run Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 03/11] wimax/i2400m: Fix potential urb refcnt leak Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 04/11] team: fix hang in team_mode_get() Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 05/11] cifs: protect updating server->dstaddr with a spinlock Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 06/11] macvlan: fix null dereference in macvlan_device_event() Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 07/11] scripts/config: allow colons in option strings for sed Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 08/11] perf/core: fix parent pid/tid in task exit events Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 09/11] lib/mpi: Fix building for powerpc with clang Sasha Levin
2020-04-30 13:54 ` [PATCH AUTOSEL 4.4 10/11] net: bcmgenet: suppress warnings on failed Rx SKB allocations Sasha Levin
2020-04-30 13:54 ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200430135453.21353-11-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=opendmb@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.