Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4042681rwd; Sat, 17 Jun 2023 06:35:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6vzvjGFdjLcOMVPE+Z02A0WFnkAUWehapS0/umBMUPnFcUzRxmWPzYhRs+7Nqg74nmMKkL X-Received: by 2002:a17:902:c942:b0:1b0:7c3c:31f7 with SMTP id i2-20020a170902c94200b001b07c3c31f7mr3848654pla.28.1687008901844; Sat, 17 Jun 2023 06:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687008901; cv=none; d=google.com; s=arc-20160816; b=ysOwHaXnQ2Zf+axQIacOAIWV+IdV81qmwvG87wG1PPmIHutDmUjdPsCHojizdOb7PF +S8hR0l6i92UVcL8Q9FVLqvTOs4GssDFyAp1Ngmlm/HhW/0yRWql0A+tIhhX8OkyL2NN N9aJdadsoaR1yyGuXJrePWgitbziajuYSf+81ghrx4wDwja8Oa5ohZ+ftnTOZr3gLYqZ jaSC3xA/6dimyO4QSkrmQEQ6+3/iTmPSPAIaQCOlmLkX22em/cHVqWFCLCI7wFgTXxAY wePXFkU2KJjhiMSEBC5DDxRcFnOmKf5cezRiRqh3H1l0IEvoFtxsgokh0sCrVukbACbN o9NA== 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=aaf2DWnOQctTvYVGbc3GXKlxfjVF7wgNcLmZUvR+eAEpyJ2fb6crNOLUf0bd3139s4 PddUvfIFlfBzzMUtCiBkRYd03VvDlF4yfsa/R85CKr6dEwgMH8DRGCVyJxQvx7jgfR1f 5DV5epsbkOVvKTJBatMQlacvhjrxKsBhxWZuhIUIYuEVzMajuABCdLkyS1o6VOgZJ4Cr uzbGffL6uuY1nMPp7hs88A9zZVqOZD0FzQ0XnEXClodbymgYweAvnLztPBOc/Wey4gKJ QOVEjOk/6JBiAv02ydX1fOZAh1LRF1ccPR43PYgmsByPMovBwnSyJwwgffLe66gNmRi3 BTSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RVIGbaSX; 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 w13-20020a170902e88d00b001b546440895si1402248plg.72.2023.06.17.06.34.44; Sat, 17 Jun 2023 06:35:01 -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=RVIGbaSX; 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 S235924AbjFQNVW (ORCPT + 99 others); Sat, 17 Jun 2023 09:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbjFQNVT (ORCPT ); Sat, 17 Jun 2023 09:21:19 -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 5BA8B10FE for ; Sat, 17 Jun 2023 06:21:18 -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 E196260A0C for ; Sat, 17 Jun 2023 13:21:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCBBBC433CA; Sat, 17 Jun 2023 13:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687008077; bh=kJMjOEWBubOW9yDcj4y+c7DM6eBhC1GM5K1t94VIlM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RVIGbaSXkCFPPbMeKeLQgW7doJX/6W8mJHsWjog5hvpr/BkfpxQo6u1zSxX7ft3/I omdaQxRHy9zEHE3w7eB5aZnljK3pv5KcFtEqILinO4tQECr0rNu/C+2kCF3GfJM6a0 wpG026GCBZyhjaviLFMTUvhbLpRrTXwrLJkXyKxRbQZ+/xlW3PD/gaRms1LeLsgWB5 XXuNGVD4ruo1Nodwoi91zsEx+PLDpL3Y+mYmDMVnPaorHBqzUHxuwByJdzcmQiAZjf LVORniVAZRfsMiO0OWiV7Z0nxeL+jXkZqmwSDkxgcs91noWGJtqifn0ErXVMipPXjJ MYmbyphde0xhg== 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 v2 1/2] net: stmmac: don't clear network statistics in .ndo_open() Date: Sat, 17 Jun 2023 21:09:42 +0800 Message-Id: <20230617130943.2776-2-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230617130943.2776-1-jszhang@kernel.org> References: <20230617130943.2776-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