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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9A8AC433FE for ; Wed, 2 Nov 2022 01:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WFO5ZvWHaKP8AXcMCM9jsu5DUWvFyPEsy4+1R+L3Ivg=; b=EQLGcKVnpwWKHG m0/Rqx7ddPCi+5TlfTT1642kg50YfUaoOx+vsiCaB8iQRiDdwoKeN1A4pZ7L8VqbzGerr24wAAfpV tigMe5EHMxEOPVeS4l4T47NnLcLtUiOzSA+NBjN04dy3lXWp57JFN66JHsD1sWt4Y2uJ8VgUvxBxr dHujXR7O1r08GFU69Rme7FVkZDr7XPmpZfve0TJDkORf8MZpFnQjJeC1CoUlom0Qj0eV09qrfaWYi 4DbgzxthggnmL1WVzHcMGGoDbx/Uf34UqdXNqZ0TS95pgrZ7D87CeSzJUfPCIPxgjT6fkDBQTkK7r T8SyP/AKlOXkRKZlk1DQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oq2AF-007qNS-LI; Wed, 02 Nov 2022 01:03:31 +0000 Received: from fudo.makrotopia.org ([2a07:2ec0:3002::71]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oq2AC-007qMr-DP; Wed, 02 Nov 2022 01:03:29 +0000 Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.94.2) (envelope-from ) id 1oq29v-0007z2-7c; Wed, 02 Nov 2022 02:03:11 +0100 Date: Wed, 2 Nov 2022 01:03:08 +0000 From: Daniel Golle To: Andrew Lunn Cc: Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] net: ethernet: mediatek: ppe: add support for flow accounting Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221101_180328_468736_4A0D4E20 X-CRM114-Status: GOOD ( 15.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Andrew, On Wed, Nov 02, 2022 at 01:51:21AM +0100, Andrew Lunn wrote: > On Wed, Nov 02, 2022 at 12:42:40AM +0000, Daniel Golle wrote: > > The PPE units found in MT7622 and newer support packet and byte > > accounting of hw-offloaded flows. Add support for reading those > > counters as found in MediaTek's SDK[1]. > > > > [1]: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/bc6a6a375c800dc2b80e1a325a2c732d1737df92 > > Signed-off-by: Daniel Golle > > Sorry, but NACK. > > You have not explained why doing this correctly via ethtool -S cannot > be done. debugfs is a vendor crap way of doing this. The debugfs interface is pre-existing and **in addition** to the standard Linux interfaces which are also provided. It is true that the debugfs interface in this case doesn't provide much additional value apart from having the counter listed next to the hardware- specific hashtable keys. As the debugfs interface for now aims to be as complete as possible, naturally there is some redundance of things which can also be accessed using other (standard) interfaces. Anyway. See function mtk_flow_offload_stats which now also reports counters. Cheers Daniel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel