Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2570074yba; Mon, 6 May 2019 08:08:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6SlugFo4Q7CJ89jsX2AK+1XpIOtyhXt7IhxrzspzLqVAHnR6G7UV6j3aR/jyPbO6YDXgX X-Received: by 2002:a62:1b8a:: with SMTP id b132mr33657816pfb.19.1557155337812; Mon, 06 May 2019 08:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557155337; cv=none; d=google.com; s=arc-20160816; b=roD/jldyZpr/hhOZMfhLgMku8chsiZMRM/UXRYWAOLaSKXIHMA0xTxMuYX+pRQCah7 Py1cWGmWnVrpHxDZ6o6CYZT/cnWcAFVA+A3iJkXxPnwL608gCCuVrOg1W7CcO35mNb8v gIv4Mq+zoGNCGXlKpnKLKZx5A6Il1bLylnR2XsEbZXx5kycKlMcuy0WsaH28KqV3qN4a iZrF6IbjnhQofe44RV7KOfMXSGhcOQE/kTAAWs4vgf4KuFKPd0qfZ3x0yHKA3FFD7lzS C9SrgtXB8AB3+9FGwuFi/2Ngjxk/mqDHwsgHsR6kd03/xVxuLhrgoBZNJtB31wUE8mSA AB7g== 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=KaYtyLlZF/r4VHucf3FNfQWaH9LYM3ulADKZQaiaSuQ=; b=ys7JXwi+pDC4W62pYsLAPeSiVm9TyC/KHp9X0hNNR7hueu4SeNyKa23f7FtPLtBvOU YrJrukDi7wxaJQmAxk5LwnfDi42HU2p6qoSHF5u6saUze2lf4D4ZiEiMCTimPAKIerF0 gHgT0x7QR4+1syydlRZkSxh/TQuLmuU9hZqVgkzEG83VbBTLuXTshnLnMKRJjiQ39eJ+ iNKh7ZaQLxxz3l4dv+PK5UxPSzgyic7dcIh4Po/VMq6ZVTu05frvlgW5hhzCtOk5dFef XheZ+0kDEq9TQV25G9eTQ4nvFcY8Nr7CGFXkYefgh8gGZ2wFaIhFeHMk3OP+GZbT5OV/ 0UPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PiItCVHN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m23si15130785pgk.419.2019.05.06.08.08.39; Mon, 06 May 2019 08:08:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PiItCVHN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726560AbfEFPHe (ORCPT + 99 others); Mon, 6 May 2019 11:07:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:57550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726836AbfEFOg7 (ORCPT ); Mon, 6 May 2019 10:36:59 -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 9D135204EC; Mon, 6 May 2019 14:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153419; bh=5tKBW8PYzLrLHOVNxUwGQWrc0VZ1JE/XrthbPqqGBZ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PiItCVHNOR6YIG0VzHHWIEDhx19QRydgRA7jNh6XVtc4z66foUJzBifBcyRGm2hem cP/Z9HHDM02MOOhmV5AIeGq2BPpq5F50ZZz3OC2Xl2fL0AvUWf95OLhtL0kZwb355H 7H3k4YuflG0wfwM1AS+Jpc+D1qzUQu2DxHTnLRjw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aaro Koskinen , "David S. Miller" , "Sasha Levin (Microsoft)" Subject: [PATCH 5.0 051/122] net: stmmac: ratelimit RX error logs Date: Mon, 6 May 2019 16:31:49 +0200 Message-Id: <20190506143059.501226800@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@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 [ Upstream commit 972c9be784e077bc56472c78243e0326e525b689 ] Ratelimit RX error logs. Signed-off-by: Aaro Koskinen Signed-off-by: David S. Miller Signed-off-by: Sasha Levin (Microsoft) --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index f765869bd864..0ccf91a08290 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3407,9 +3407,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) * ignored */ if (frame_len > priv->dma_buf_sz) { - netdev_err(priv->dev, - "len %d larger than size (%d)\n", - frame_len, priv->dma_buf_sz); + if (net_ratelimit()) + netdev_err(priv->dev, + "len %d larger than size (%d)\n", + frame_len, priv->dma_buf_sz); priv->dev->stats.rx_length_errors++; break; } @@ -3466,9 +3467,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) } else { skb = rx_q->rx_skbuff[entry]; if (unlikely(!skb)) { - netdev_err(priv->dev, - "%s: Inconsistent Rx chain\n", - priv->dev->name); + if (net_ratelimit()) + netdev_err(priv->dev, + "%s: Inconsistent Rx chain\n", + priv->dev->name); priv->dev->stats.rx_dropped++; break; } -- 2.20.1