From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 108D7CD6E64 for ; Wed, 11 Oct 2023 12:41:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345945AbjJKMlg (ORCPT ); Wed, 11 Oct 2023 08:41:36 -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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -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