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 A91FEC4332F for ; Wed, 2 Nov 2022 01:03:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229926AbiKBBDa (ORCPT ); Tue, 1 Nov 2022 21:03:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbiKBBD2 (ORCPT ); Tue, 1 Nov 2022 21:03:28 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED8965CA; Tue, 1 Nov 2022 18:03:27 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.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