From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDDD5C47247 for ; Thu, 30 Apr 2020 13:59:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91B8A2076D for ; Thu, 30 Apr 2020 13:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588255140; bh=8JRo0BwlFzZ5rDWV4zsiKnnD3Xyq+9giUvYtHt65Wq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=i9wauuGfqBMTckyUR4PhYG/tNjliTBkDDoCgoOZ7N0JYEc9t9UyzfzEDEj5gpruF6 JenMxEHgyJVKmtLHKOUSZhONcuIWVfSUeZbsWXdnHfTrrrLxlKY+PfsWzK1Ym+dxaB HpTiq2BLnCj+oZ7cPdd6zZVOfhSM006nfnAqhoAk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728986AbgD3N67 (ORCPT ); Thu, 30 Apr 2020 09:58:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:37070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728992AbgD3Nyd (ORCPT ); Thu, 30 Apr 2020 09:54:33 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB60724959; Thu, 30 Apr 2020 13:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588254872; bh=8JRo0BwlFzZ5rDWV4zsiKnnD3Xyq+9giUvYtHt65Wq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kfj+2LHPzFWRnpUMvKxjs7n336HQPG1aYmvW+rfIYvCG8SttOYKNgtlY7c+w4zyWW 9usqLIcdHpdasTdwGohenpqAOK2FC90dY9627J2NEDmDg2gnUofU5aqVbrKoNSAJgA wVu2sC9oMIFWy0He5DjIAoy4pOsroCGVZTwRkIV8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Doug Berger , Florian Fainelli , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 27/27] net: systemport: suppress warnings on failed Rx SKB allocations Date: Thu, 30 Apr 2020 09:54:02 -0400 Message-Id: <20200430135402.20994-27-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430135402.20994-1-sashal@kernel.org> References: <20200430135402.20994-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Doug Berger [ 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 Acked-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 f48f7d104af21..123ee5c11bc0c 100644 --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c @@ -645,7 +645,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