Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp41133ybj; Fri, 8 May 2020 06:08:16 -0700 (PDT) X-Google-Smtp-Source: APiQypL/gqv8/dCe2o+e5OttUgVAhpmk0zSk43g5N5W0fe32Lo8EI4e/NWnmsZjT0qhj8ObVtXnC X-Received: by 2002:a05:6402:1fc:: with SMTP id i28mr2083800edy.18.1588943296503; Fri, 08 May 2020 06:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943296; cv=none; d=google.com; s=arc-20160816; b=ukjfAiG/GkJVg5KjQG4X666OhNE4ajUG/dpNTPyCApfTQgU7G8g/x7DesbmBR7G6TC 4qnhTabGPUXqrybueRga8hYXldx48O0zpzJEKVeq+PCf/xBI+jtholxCShKQCAsr+SPE MvaWElOJjuKMUs2keaDJdwmTNo4oEe2aUyV9wZswJgAHlZrX5Q1VWl3OOv+iJtuDYI8Z grJVdQFvHT2ONPpzXfOFW5OMTOR5VXW6aCKnwBgrPDPInradaRFA1xFAASmt0h7nJYVU C4doPs2BcuYkvg1e5SyYUnwfz0PXzsyBY9mZU+shRLwgZ5M3PP8U4xU/TiiP0RzEFjWF q3sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=f4ieFKSPt4LbFhxs9O2c309YFqNSw5ZLHEK1HmkplcI=; b=lLJUNHrvmPFdYFHQxQSKZRJIG7LN6kvGVQDyySWrPiIRJ24qvXiwL/YRF9CnUP25/S pBFQVOfgcdRb0l4aeteGBDZQtZBZReOF5LZmlHzq6cYEFtug7uuyZ8/jD8a8FphqkTdZ sJVFGTQTkx4/annG2zpKD0Y/lZyct8Iz7oqGZDO853tVtD2i5QO9ravX5wMqkcGNoOaM ISo4cMUgUP2S3WBO39vP1kdeqFZ9jmbWVugP4OXJGPexC0hh8XLJuOAZfEOi8YvgAPOW 1rvKaF6gR3h9p7KWbkbC9dJci9lQMUCOSeaE/08CPPRplp7Td9Ey553VtY/Qe0b3DWVa PqAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="eUeYS/sZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t23si958313edw.78.2020.05.08.06.07.52; Fri, 08 May 2020 06:08:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="eUeYS/sZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729122AbgEHNEB (ORCPT + 99 others); Fri, 8 May 2020 09:04:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:55150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727933AbgEHMt2 (ORCPT ); Fri, 8 May 2020 08:49:28 -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 CC44D21473; Fri, 8 May 2020 12:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588942168; bh=6PQThudiOADLiowU8hPRGHfSO63STL1z7Wa+F73g4G0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eUeYS/sZ3WV9nSdGiYk8fT2coV8gOenWwyL9EBtsbyy7fUicLZqCGqHywWQDZxGGr cA3Q51dVFyIzlkBYijlSpKNmMBXhA5Ogk9oCMeBZgJ6TuBjew+No3x6Tny3ug4hAy0 unzgr+LtfYv75nTlEhvecjAnVc6muS8WfgPGh5S0= 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.9 12/18] net: bcmgenet: suppress warnings on failed Rx SKB allocations Date: Fri, 8 May 2020 14:35:15 +0200 Message-Id: <20200508123033.424749203@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200508123030.497793118@linuxfoundation.org> References: <20200508123030.497793118@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 a234044805977..5d4189c94718c 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -1596,7 +1596,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, -- 2.20.1