Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3258863rwi; Tue, 1 Nov 2022 18:29:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5MPi7WeYZz2zUzdvJUlKt0TGcx2sD9/mg0Tx0DGQ3WT+3VDutnwl0mqEifdHTwVaR1oSmp X-Received: by 2002:a17:902:b215:b0:187:204d:15ca with SMTP id t21-20020a170902b21500b00187204d15camr13322503plr.86.1667352565622; Tue, 01 Nov 2022 18:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667352565; cv=none; d=google.com; s=arc-20160816; b=OZ+Z0DvtA4hYnPIRJLeRtZ2G5QjmPSj8mCokwBTgQPZ0GJ4dVliolLBEXcyMIbngW0 T1hHcTo31/MNLexgobKoi/lVnK3upQHgBiSuuWvILKVL+SMOzEl46PfrZ3U9g+oaIFbE 5gzIPvH6HIHSlZ03Gwh3EPmeyER9qPI6R5XHIIa1SBO4yknhGM5K9TyOSVpLmF5t+L7P zFL5aCQinB2YcKAfx5VB0WF1ZqqGqCI7wJLD1MPs6yVFIzG3+YafAh1/b/IaKt1225nQ ijrS8HSFaYER73VD7T1p0TMDGZgiZx6Yrz8wQJQHQogMlpOiZFUtkqxRNsZAXgyMaGiH EuQw== 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=Kdp42P57KUhdwUVNB13rc2UgHFANca4GpKsmrNXSS3E=; b=Fv7u5tGlOWJ8c/IutEJfr+JZ3VBsbTU9Wp397NbbcmLOfMPXxp+QNR7qewjFf0Hr8r kByjSJS7trwIxbfRo8JAvtokJYuONN0Yo9t/yhiF25sjiPcUyMHqHqVgRkU7tRmIdYki Y4ez7hBjiUW5ZwGYbcq9xytMNnVzUgkHxa4m/MsAqSreWRCGUDRefRxRu33AzLS49KrB YvscHlRc2FaCBqkHHqPCvFnwxMpOJpJaCQXeL/G2nM7aBCyk/Eona6vmlkwUdLQMf02y htcxJy9E6uV/q0CuIvVhPZZ/RvTizza4Tkft8Au3CFPprXdTicZ7nCVQjrTnlbRCxm6W mobQ== 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 x16-20020a170902ec9000b00176be2315dcsi3983885plg.260.2022.11.01.18.29.12; Tue, 01 Nov 2022 18:29:25 -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 S230019AbiKBBDa (ORCPT + 96 others); 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: 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 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