Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3534199rwi; Tue, 1 Nov 2022 23:24:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6i2IwvxuFBfhYKQ3ejnkWqOvHv5wWBrvauH4voMjyVSN7JvSC2ArtsA+8JaXRMAUN6Ppr3 X-Received: by 2002:a17:907:1c10:b0:791:a716:5089 with SMTP id nc16-20020a1709071c1000b00791a7165089mr21977845ejc.672.1667370293931; Tue, 01 Nov 2022 23:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667370293; cv=none; d=google.com; s=arc-20160816; b=nLCdrF98F5DyWBjd8Mv54cqcNuoGzLIMB82uR4LiqYcB7PJOlVztcNKtnM0nfGiJiR Am18PQOgqxPiDXop2V4vdzx92bX8w9TUR6ZS+A1dMUFERrycPHLwXURzlcAOej90vdCL DE8gAxFg87Sl4VuOxYw+82RC3s6K4Yb3RvSJOEywSV46xRQKjNVYO9hy2I1lU/y+jv6C kGArtoRJ0QOaXiKbOLMbaH6CX1eMSaKgI4k0FinRdpDVtNUOUPmADBeMVRBtjyE2IMbr zrfykCLe1e9XfYgjbfsIvuyOm6FeL87WjhlCDRQXjjv1bQAsG3tmWWGUNTfui4uzKlzy HGFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=GHqgpi49F525hGNgrGw5jxJA5z8262KOfovIPeXSDkE=; b=ntrZWkJ9lGZjm1R4ghVfulZ7NF7HC2gsN71pRRBntEovBFG++j+Th13U8ZMhUh4i+e /h0BBNxy4WH6LBYOjaKonmv3K3SG6vOmn+/Yj2b+exm6rCWPTvKmAUulMs6Dvp3DYb9j S1RVjxdEdC1h7ZxQL8yaH7X7W3PGjugfUlpQJjfTl2iyz02gE+5AVk7Og+bPFKbomX8a CSne/+lhpN7fUqyNWGMJmCQd9XxnHgczPDf0MgjLJV0sxbZvzlLJlnSOY86pw0PWCU20 i+KbDwHHyS/riDCLwUFo6lgWP/1AGUyEBG0uu/d0A9FXwkiDazJ6I1qqi85I/4KfR/Vq HiCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=Pw+1ZCBB; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd9-20020a170907968900b0072a6c18f1fasi16767495ejc.639.2022.11.01.23.24.30; Tue, 01 Nov 2022 23:24:53 -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=fail header.i=@nbd.name header.s=20160729 header.b=Pw+1ZCBB; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229624AbiKBFtj (ORCPT + 97 others); Wed, 2 Nov 2022 01:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiKBFtg (ORCPT ); Wed, 2 Nov 2022 01:49:36 -0400 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E57E62D5; Tue, 1 Nov 2022 22:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:Subject:From :References:Cc:To:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GHqgpi49F525hGNgrGw5jxJA5z8262KOfovIPeXSDkE=; b=Pw+1ZCBBpSQGbjl9omMRX/HDUR PISJ5gZNcun2rUbxtx6gB/F8dAH3yS6U4VFO8xVZ1UdDVMP3HuAG24vDkQMDcXwb23pWdGHgLWIVz jkA/6RKt2AEhsyEI49a3q14XV+20onwacw8H7liW5/I+Lveccz09crjogPH4/BCTx110=; Received: from p200300daa71950003c313de20777bbcd.dip0.t-ipconnect.de ([2003:da:a719:5000:3c31:3de2:777:bbcd] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1oq6cl-00Gq2Q-Rs; Wed, 02 Nov 2022 06:49:15 +0100 Message-ID: <770dd173-41b8-80f7-7c78-40319734cfbf@nbd.name> Date: Wed, 2 Nov 2022 06:49:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Content-Language: en-US To: Andrew Lunn , Daniel Golle Cc: 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 References: From: Felix Fietkau Subject: Re: [PATCH v3] net: ethernet: mediatek: ppe: add support for flow accounting In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE 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 02.11.22 02:26, 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? I believe that OpenWrt is still the main user of the PPE offloading code, since most vendors of devices with these SoC still use different out-of-tree implementations. OpenWrt does not ship or contain any user space code that relies on these debugfs files. Whenever I'm debugging PPE related issues, I rely heavily on the debugfs API, so keeping it as complete as possible is important to me as well. Aside from that, exposing per-flow statistics (which is what this patch does) via ethtool -S API makes no sense to me at all. I'm not aware of any other offload capable driver that does this. - Felix