Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5799510rwp; Mon, 17 Jul 2023 09:33:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQYM8ikHdKjk+hQrca+bDE4hC+mpTid9kR6lzSqJPWx+qi+fLrm46hk35xwUVQ5ONhuuvi X-Received: by 2002:ac2:54aa:0:b0:4f8:7734:8dd0 with SMTP id w10-20020ac254aa000000b004f877348dd0mr7027010lfk.2.1689611634672; Mon, 17 Jul 2023 09:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689611634; cv=none; d=google.com; s=arc-20160816; b=j2KNrXSLeUCmtAUzkWh+RHczjvDbDMZlEZINzfG4Tx3gWzyoycx3+Masu2PXua/Hw2 7YRCmzQROrian2IPeawRPIu4p2EF4/yVE3sr2qCr0UAQGk7wNaftoH2gS8g6fVoXwoKZ epC65uh93dIG2C0fneaM8j0ZMn+M3NKLP0jGrkCOKx4GmVKWPvO+xI9It7CrGx598jEf lb32ELN/1JlWDZgg0ct2DJh806NksNyxcI56DbbY8AJ2f3tgkFXXzMI0dGMg4ColDDSn KNcHFkjFQXPnTm1QvxNtEzntM16au+EK2x26m55vGf3e0d6V9HwGrUfN5RkOLsEbnrlp pNSQ== 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=DYiYS3LzDEIodbmeWFADgO5BIIwPuOW+n/4kXWwnoCA=; fh=hQu8OwQTFB3cscyFACwkuSjtxmCwtbovSUZrSk8FF6o=; b=F9WcdQV5M8TyZ1RNPwQ++BNh+S2RpK3Y8Fl6fjXcmJ8ibloGZwLvzEh3lL+2nXQ9U8 inagAsakb4vsnvlicCF9hzlZaAxTdGhWJtvtk5NlPZP76t3POdQHK4wewB8dX2kk4eM5 5nwL/xFPz0MT722WvteQedtJGOR2g4h2wcFSnUD4vWmTpDfMbtTSXpgLX76r8xwM/4bW duHmLFj0eet/wCye8HnFXjgRQLGHdOzRgr7vygAGfXVCfuPt7TrlYWhwczn9lOfahefB H7DsFTe/3+yL1WDv3A909SEuMkKMy2XJexBvNXHbaaO0Il1sndtTSoL2kd4xyJNqN1Y8 qQmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ILJWogfV; 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 h12-20020aa7de0c000000b0051da5244b7bsi13658606edv.469.2023.07.17.09.33.30; Mon, 17 Jul 2023 09:33:54 -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=ILJWogfV; 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 S231232AbjGQQSR (ORCPT + 99 others); Mon, 17 Jul 2023 12:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231976AbjGQQSJ (ORCPT ); Mon, 17 Jul 2023 12:18:09 -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 24AB910C8 for ; Mon, 17 Jul 2023 09:18:09 -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 AF15061158 for ; Mon, 17 Jul 2023 16:18:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6A37C433C8; Mon, 17 Jul 2023 16:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689610688; bh=a6VvoUZg7dS9d45AqM82cR3nCmR30DVYkJaln28I4NM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ILJWogfVZOXt3Ptyiyx+8hCIm+4MqkfoHnIQvxkiWMqPGODwq/9ztksKu/ES0B6Mb nJVRUUTiIsoHpOrSKXkwYvymoCFvEnMVcoQCgxLhesSFX0xlpeuLFB30TQq/v7sKSY ycHbZc72SFYLhRleIRfn7fmGl4Rp0STzTP8zk7GFavYZfbriE/Ykqa/TSEEBseNSZk gH4lCmLcSqP92x0BVxt4RtWaIepCy+pZ4jcxfJPpGp7WEY7Hux35CpCcKuxbZ05QCP MlfHOsvLRPVXRl+lXZzJrHdUT/TZfhUA1C6TYRZdaGobc4QKw+2fHbZX9o4MHafhtM Au72dxvHRp9hw== 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-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH net-next v5 1/2] net: stmmac: don't clear network statistics in .ndo_open() Date: Tue, 18 Jul 2023 00:06:29 +0800 Message-Id: <20230717160630.1892-2-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230717160630.1892-1-jszhang@kernel.org> References: <20230717160630.1892-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 efe85b086abe..a29a9619b48e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3829,10 +3829,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; @@ -7322,6 +7318,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.0