From patchwork Fri May 8 12:32:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 226110 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,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 B8E34C38A2A for ; Fri, 8 May 2020 13:18:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8BC9B218AC for ; Fri, 8 May 2020 13:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588943910; bh=0+cc2i/KRxthcaGTG/Xr9mN+nP18onUrbB2ErqEFFOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=p+MzP7lQrLzVfm41ni++lawZcgO5rWWuSAybc5ULueuF+r9T5dDBH1Weh67fDlK18 eL4S0Lm73CFLzwZXE9z2+snEIgeDI/hr1rWgcqerFyUdPUat+x6ClMoAgbk5DIJfo1 T/vwu8ga8LDymCNFWbP4Uwv/3PlU+i3suTw+t2+4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730187AbgEHNS3 (ORCPT ); Fri, 8 May 2020 09:18:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:40434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728588AbgEHMm4 (ORCPT ); Fri, 8 May 2020 08:42:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE8A824968; Fri, 8 May 2020 12:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588941776; bh=0+cc2i/KRxthcaGTG/Xr9mN+nP18onUrbB2ErqEFFOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zsYoO+llBWI7X9OEWXFlK77GrFkKMThFxNOWE+5D/2EfGZUnAj+WUOC7IaMJ3H5QK 24VXRaZZ2hedOo/EGqhAE3ow46Ayp3E8EY8DisSIBZB5trr+x99agoFtM7hJCdvUBe /Qb0lCUqmc467CQucW55tr9IFzMoPC07GdFFyol8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Doug Berger , Florian Fainelli , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 167/312] net: bcmgenet: suppress warnings on failed Rx SKB allocations Date: Fri, 8 May 2020 14:32:38 +0200 Message-Id: <20200508123136.207635526@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200508123124.574959822@linuxfoundation.org> References: <20200508123124.574959822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Doug Berger [ Upstream commit ecaeceb8a8a145d93c7e136f170238229165348f ] 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/genet/bcmgenet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 34fae5576b603..4b3b396bd8ebe 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -1575,7 +1575,8 @@ static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv, dma_addr_t mapping; /* Allocate a new Rx skb */ - skb = netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT); + skb = __netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT, + GFP_ATOMIC | __GFP_NOWARN); if (!skb) { priv->mib.alloc_rx_buff_failed++; netif_err(priv, rx_err, priv->dev,