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 D8147C4332F for ; Wed, 2 Nov 2022 10:17:44 +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=uBXVsNTDDXapj5yecXKPvEZbtCBi9EaHWllu9oLDRc0=; b=e4wEHUQLrWElBf XPdupFlK4zc0RG7LCa3DtTHWstDiLHy5cJ18l2HRwvCIzewTdnzs+o0jDw0z9uiJEUroJ8ahw78A+ cyhPHCCQH221ptYYPy6XGADOahzhbrrBJbb5TZ5nMGD5oYEirgJ30FF8XjUi+CedDTp+rvYXueelI pf2dTGV96ymiI8Yd6QqnhsBfaYWlsOh+Z0o70FAPWdKu/tS5UsIHn7no6xCYCmDIV2B4B4Sd8zl/I fcjGkV7jsAHGrR2VskaSfsuHuXDr5gnemq0tPAyZcAhhq6GW3CVr5yV7GnloTBLnaMqgdggPpn5ZA zfHS7OXdBQF7kTJY7ejA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqAnb-00ATSo-JP; Wed, 02 Nov 2022 10:16:43 +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 1oqAnY-00ATS4-AA; Wed, 02 Nov 2022 10:16:41 +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 1oqAnE-0002Os-TL; Wed, 02 Nov 2022 11:16:21 +0100 Date: Wed, 2 Nov 2022 10:16:16 +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-20221102_031640_368375_A7D46110 X-CRM114-Status: GOOD ( 26.60 ) 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 On Wed, Nov 02, 2022 at 02:26:17AM +0100, Andrew Lunn wrote: > On Wed, Nov 02, 2022 at 01:03:08AM +0000, Daniel Golle wrote: > > 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. > > debugfs is by definition unstable. It is not ABI. Anything using it is > expected to break in the near future when it changes its layout. It is > also totally option, you cannot expect it to be mounted. > > I hope you don't have any user space code using it. > > Maybe i should submit a patch which just for the fun of it rearranged > the order in debugfs and change the file name? Go ahead and have fun ;) The debugfs interface is not used for anything except for the human developer wanting to validate that PPE is working properly. It's literally for debugging, and nothing else. For productive use, you can access the counters by setting up an nftables rule with a counter. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel