lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y2JDcBovstxCHCTJ@makrotopia.org>
Date:   Wed, 2 Nov 2022 10:16:16 +0000
From:   Daniel Golle <daniel@...rotopia.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Felix Fietkau <nbd@....name>, John Crispin <john@...ozen.org>,
        Sean Wang <sean.wang@...iatek.com>,
        Mark Lee <Mark-MC.Lee@...iatek.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] net: ethernet: mediatek: ppe: add support for flow
 accounting

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 <daniel@...rotopia.org>
> > > 
> > > 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ