Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6662528rwd; Mon, 19 Jun 2023 10:17:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5W/EULS06L9TTfIeVlwM4Ny6da9t8FIt8KNLItBEUQdSqd2xV56NT0ZQ9P2jjj/TeGfMhW X-Received: by 2002:a05:6a00:398a:b0:666:ba76:eee7 with SMTP id fi10-20020a056a00398a00b00666ba76eee7mr5939896pfb.13.1687195078057; Mon, 19 Jun 2023 10:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687195078; cv=none; d=google.com; s=arc-20160816; b=ckW/0lA1Dr6Y0zdC3bI+4dNBvHHh8AENJKyNjHOVL3PsJA4xfgVp2c6LiZ+R2U6gBO WjAMK4Q6aaf3UPEv7JCpAm4DLwqtD+e0OctEUV/09p+VX1Ebm/aWFtP9KF0uSUUgkGP0 XgIQwOlgxktTHoz9dqVwbv4vlz6rb5r/GnyAiO54Ncaz+VuTzjZmicXkE25DSb1eVTfc Ma3jieQqkw6sPx9J+DblFBoTNEpwSrJygN3u0ZdhDDm2S1BhufC6+0RNhpJnio55otZZ LIl5D6s8QsEz80Ifv1flOOvrGw8o7xjrIRUf+hu7XrnmChVo9kSyoYTwYodIFMEhNeCb M+Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tCGwowr6cYetpy3WmAJmrSbGAwY1jhGHnPYAGKXZ19c=; b=ERZ+Mhw5iODprIrLonvWRAv/vSV23fGtWS8DoDNDJADRBcbDhC1Xm+5K5SXvPWp8mZ UtCHpb+vrOfRPZqxilwlrfWOTp+KGm+Ks8i4aDcEt143g8Fc9baOYVUq8ZGJJs7BeJOG 2JDnAkeO5ZbXbWZp7pJbCw13a40Zkur9mLD1O00foEUXlglIz2fAnMvLAssW7+Jh7nK9 mrMFdYcRBCFkLfQnw23E0aHuNLqQ0XeI3kcJZlwJW59qxJ9BjrnGeQ6wxUXOtzPtcaZ1 kuBBOauvRwTColFSxssz2uY/4s4EgQhDWlg7Bwc14dOP1ClJdteYTp1rXs/MiCMTl9N6 7rLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MZgVSa7D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r3-20020aa79ec3000000b0066866fbb7e7si4711242pfq.31.2023.06.19.10.17.45; Mon, 19 Jun 2023 10:17:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MZgVSa7D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231136AbjFSREC (ORCPT + 99 others); Mon, 19 Jun 2023 13:04:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231717AbjFSRDw (ORCPT ); Mon, 19 Jun 2023 13:03:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5514110DB for ; Mon, 19 Jun 2023 10:03:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B361D60D24 for ; Mon, 19 Jun 2023 17:03:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19E0CC433CA; Mon, 19 Jun 2023 17:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687194229; bh=kJMjOEWBubOW9yDcj4y+c7DM6eBhC1GM5K1t94VIlM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MZgVSa7DmSzA23REOyCumO6xcP5Egtb2oN4i51WmfDWg9jMil2nIDr5BY4xjc0cqF ltXokjrS+yaCpDXsilDiUn2W1wZa+qq0Q8n3N6NQXSZEs3y7mpd46R1NqA9gtVYd6T e1Zd32k3Qytg5DMVli31N7CFgtVsde+O4ZXNTncboXht36eei1wXPV9h1Wxd4110W/ dc974OJsoxUmJYVbDZdkh7JD5nKw8SsB7PN0VNfPA3pCEyZ4BF0qeD7wyspbd6+1k7 Iz1myfVJRHLqaxtpSoC8u6FThqazRsB0IGQ5gAHRBzPq9uAfdlg+HXlEwdgW9vpEyg 9da33KtsSLZqw== From: Jisheng Zhang To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Simon Horman Subject: [PATCH net-next v3 1/2] net: stmmac: don't clear network statistics in .ndo_open() Date: Tue, 20 Jun 2023 00:52:19 +0800 Message-Id: <20230619165220.2501-2-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230619165220.2501-1-jszhang@kernel.org> References: <20230619165220.2501-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org FWICT, the common style in other network drivers: the network statistics are not cleared since initialization, follow the common style for stmmac. Signed-off-by: Jisheng Zhang --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 5c645b6d5660..eb83396d6971 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3827,10 +3827,6 @@ static int __stmmac_open(struct net_device *dev, } } - /* Extra statistics */ - memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); - priv->xstats.threshold = tc; - priv->rx_copybreak = STMMAC_RX_COPYBREAK; buf_sz = dma_conf->dma_buf_sz; @@ -7315,6 +7311,8 @@ int stmmac_dvr_probe(struct device *device, #endif priv->msg_enable = netif_msg_init(debug, default_msg_level); + priv->xstats.threshold = tc; + /* Initialize RSS */ rxq = priv->plat->rx_queues_to_use; netdev_rss_key_fill(priv->rss.key, sizeof(priv->rss.key)); -- 2.40.1