Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp786123rdg; Wed, 11 Oct 2023 05:41:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+qogk7RNcBN3ZUOEfQTLSoC3ulKdItxquZ8LsjL+EcgnBSzO5BQKJ393dmRvyg7I4tqXv X-Received: by 2002:a05:6a20:3cac:b0:15d:9ee7:1816 with SMTP id b44-20020a056a203cac00b0015d9ee71816mr26508320pzj.10.1697028108225; Wed, 11 Oct 2023 05:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697028108; cv=none; d=google.com; s=arc-20160816; b=kQM1JKilaKgxKarFR8umRA7TH+T7UjgEgqntGtKDU6cmT5GVRmr+whadg12n4H52Hj rFq90fnBZBCXBr9ZZpX3tDmcscLQQVBQ+8L4plUiQvXa84GVV9girMEKPLWn9R6WBJ+g uXI30c4DPobJhKF5y0klHWxcE4Ol3abd+sJseu2zMAU4BrmVr+oPLaZGVECq+rt0I/O/ jg6xKnZBAJSlAHKPRyUlYY0wUrxvVMMDvQ7skYru63d6KOqWmwB/g/FlAGYfBiW/XQoH xsHaC6C+EAXg7wlL/n4EICEzmnyRM+D6595Ze7TT1oBslZ1mnosJy7950vpD5IzSaj8F U2Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=10jsCd0D/yud1X3V4ZeOq13dIfU5Nng3hYOVE5ex/Z8=; fh=RuYSrahU4DCWDaKaOnBQfVhPzSgZ94GSocxAc9RNlYE=; b=gtUy7jq46is88MPjQKnBivPHNjKqcA7Y876zL9n3fYKI+toq3eaeKn49Ew7luGpzkE /GWnSXrXgRIKfIM+UvVYW1D3GfxDK8R/P5b0KgtMWayATh5TuUfHDF8usdutkPYcznHJ KNOo8oNij+vwSOeuvzKdgHos95HAPM9mhAkBjDbGvd48L9Hh5Y5uJm850h+mwTswkWZC FQIbi04lz1HU6IckSceiBolnfhi0g6mJReLQccp/I3hl1Em4pkS/SnlIEnxx5gjeROir nS2NcxeBBLONR1Vu8ruirS1u5ZM6dMzqeYsSYKD/zNqewk7kxlxJPt/jB5p3cQk/ebZ2 DfkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vhmROl4k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id fa17-20020a17090af0d100b002680abc3699si16617737pjb.115.2023.10.11.05.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:41:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vhmROl4k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EF533808D2AA; Wed, 11 Oct 2023 05:41:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234872AbjJKMlf (ORCPT + 99 others); Wed, 11 Oct 2023 08:41:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234829AbjJKMlf (ORCPT ); Wed, 11 Oct 2023 08:41:35 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EDA298; Wed, 11 Oct 2023 05:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=10jsCd0D/yud1X3V4ZeOq13dIfU5Nng3hYOVE5ex/Z8=; b=vhmROl4kvWcn2i7OSqV2XejI7k 5tzzV66f9OL32F7zw41dIhsVGzhDVx2lfYhHC0+IHeW0IQPD2CabyyOoeNVa3nRX1Ma9PcpEHYerG ywJNw+TRvOZmzwU5iTrRI28yWNp5ff9Yr3oFkefEN34Xwl+TGVPmLWE9PschKKnty2ko=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qqYWk-001Zg4-1L; Wed, 11 Oct 2023 14:41:26 +0200 Date: Wed, 11 Oct 2023 14:41:26 +0200 From: Andrew Lunn To: MD Danish Anwar Cc: Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, srk@ti.com, Vignesh Raghavendra , r-gunasekaran@ti.com, Roger Quadros Subject: Re: [PATCH] net: ti: icssg-prueth: Fix tx_total_bytes count Message-ID: <4d7c2ab9-e980-42a5-9452-79bc0d33e094@lunn.ch> References: <20231011063700.1824093-1-danishanwar@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231011063700.1824093-1-danishanwar@ti.com> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:41:46 -0700 (PDT) X-Spam-Level: ** > @@ -29,7 +30,12 @@ void emac_update_hardware_stats(struct prueth_emac *emac) > base + icssg_all_stats[i].offset, > val); > > + if (!strncmp(icssg_ethtool_stats[i].name, "tx_good_frames", ETH_GSTRING_LEN)) > + tx_pkt_cnt = val; Doing a strncmp seems very expensive. Could you make use of icssg_stats.offset? Andrew