Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3290597rwi; Tue, 1 Nov 2022 19:02:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7wAHUFXTCGh7KEEYvA5MSVgtNvEMsVjH04OuVR5RPqZENeF39lrUb0T8dcrE1xcQA7gS8R X-Received: by 2002:a05:6402:5202:b0:461:b7e3:e6b7 with SMTP id s2-20020a056402520200b00461b7e3e6b7mr21924966edd.282.1667354559818; Tue, 01 Nov 2022 19:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667354559; cv=none; d=google.com; s=arc-20160816; b=YBrhrC33F13fQCh4rhvyVFbtL8nmvN102mHEGmi5F37SgPqdZezOs8ufBqqGBz8k/n sTo10jmIMlw+Lv8s6UV2j01ACcOKLtoq64XH/5t/dC9yrrMHEHtfyeSlrP9LaE2Nlxw0 6u8/XE3DLk4xj0C1ceKWf0wRgMjfEvQBhw2/pFcNjZUTjIMxn5i9YPeUux++zjWmVH3C IBwdBM5yr3i+IV00XZEkDwAoVQ3a7Q+n55VZcTrNUahgqPQVLyjm1OYhiUwSSe5kwIMp DBaP/9968q0gbr53YYcC6irjG4QWXx+Y09jrdnD96dCLoiUcu/hnndHEWd8cX+nZjRDm 7ecQ== 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:dkim-signature; bh=ByeRLxikMYM3ac/zYAwjbHrnz6wxVOIg1IVLvVaHMRU=; b=zWcaHiYjSOmjPqa39/h7/AZ8vEEmPjh5FpBnYKfKwY+LMnYFFaMKgKm7+ih+08Pf6h j+7agfTQoeQ8u7LiN82WuClfiewQhqdOpR+B+CbP8xnWkZPb8JnHgosWNgQpIM4Gq1fM //wUpQfrY6PTR/YkeEF1s261DqqpQoT7FpPUzWyyWplfTRFRl9LDNVgRWHpnYQSAhe0j gwoE/Yt91XHmNDfSJa8bKZorQ0MgxsD+buAx/mFIJD1pSf+fLO9A/FKq2LN8s2G1APms N7RXAOxgjVxPKbH0IUnK/lYYkBt9cw59uGdYeeRAn0Mh38P4kUHaow4yNcSvaT/70J9Q kKQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=VXXWehq9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b8-20020a17090630c800b0077ea290986fsi11250175ejb.584.2022.11.01.19.02.16; Tue, 01 Nov 2022 19:02:39 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=VXXWehq9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbiKBB1H (ORCPT + 96 others); Tue, 1 Nov 2022 21:27:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiKBB1D (ORCPT ); Tue, 1 Nov 2022 21:27:03 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FE691FCE4; Tue, 1 Nov 2022 18:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=ByeRLxikMYM3ac/zYAwjbHrnz6wxVOIg1IVLvVaHMRU=; b=VXXWehq9WzJBIX74BuCCaQ/2c3 qZ3Rzqevza6vojM2of3R/UGOD8gtT+DGPvDpHQ/BAPp754ld7gQqwkFYJj3UfGeA+uFDn0pF/b7Rk DnK9lNRCFD5SdpCxwkM1oxxf+YcLAWw5OBH+PzeuJYiz375yj2QHwVhWKV74VGn6TpKg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oq2WH-0019fw-Kb; Wed, 02 Nov 2022 02:26:17 +0100 Date: Wed, 2 Nov 2022 02:26:17 +0100 From: Andrew Lunn To: Daniel Golle 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 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? Andrew