Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3807740rwi; Wed, 2 Nov 2022 03:28:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7qXAlX77/BYZRekZzdyF7klqrUQD2SKntmKtzSbDGKK5wHjIOdafkmZ66VNkLN1I2u1JgI X-Received: by 2002:a17:907:7f8e:b0:7aa:7598:126d with SMTP id qk14-20020a1709077f8e00b007aa7598126dmr23439748ejc.289.1667384892900; Wed, 02 Nov 2022 03:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667384892; cv=none; d=google.com; s=arc-20160816; b=mI2nEJZ1bBJSte2Er5J+QVnJzMeyeSamsYuc4IwcIITNN4FgrfSA6fBWs7YMBMz7po irWbY5uo1fEyZClkjGaejGHSm2qEOZ2+d/V5xVEKaWAyyXxd8tmjm/8Xvp9t2lp7AXjj 2fPY/Lz8caLDC1utTAvz67doJnNFIAariZNv1mZNj1T3OLq+qwv4KsgAVsBWaoNLUs6l Gx/dZBkD2AqUl3TYV8EUQxP+oSvb0bKgb/Pla1IA/aC90IAhXAnQYn9dj6tgDIH0TXAR Tg0tgzqrCVJGEOtc03521HL2/nzKIRE61qE4n8PdiAOeknpmuyw+qxYeqIcpQMvv7lGH LKrw== 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; bh=CmE62GcMonPmMd9spbHg/5bl23c/MNVw2vFohUZ4uq4=; b=nldWapTDC7tqzBJvdRwIb4e64GdG1Oyv4ReOZ3IjubFDxHB6zshCZyn1my0QPDLqal aJ+QwOSF5nCKMU4wJB6hvxSbUGZCdhIlW2fLfiP5rVNNWOpjmXHms3BrlNFtuHVKs2L5 Nhii66sZY0a8XiM0234S1SwzcoQ02XHwMFDJ2E13tas/PGGEWC525Zwv/qthaMr5mSzZ mPlOaZSmzaS0shoMENQ1uRArLeDhnll6ASVVVB96HEfRX1Gcn2NpQ262JBsEJj+fjx9L j4HitUj4UeiM98adTwVBaPeZFLf8YSmDGOF7BUx0p4/dRQdtxLe/wvKkV4CkVMbYO9cA Xqeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i27-20020a0564020f1b00b004520b01a355si14757586eda.52.2022.11.02.03.27.49; Wed, 02 Nov 2022 03:28:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbiKBKQn (ORCPT + 98 others); Wed, 2 Nov 2022 06:16:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiKBKQl (ORCPT ); Wed, 2 Nov 2022 06:16:41 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A24FE24952; Wed, 2 Nov 2022 03:16:40 -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 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.