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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 27 Jun 2022 23:02:38 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Oleksij Rempel <o.rempel@...gutronix.de>,
        Woojung Huh <woojung.huh@...rochip.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, kernel@...gutronix.de,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Lukas Wunner <lukas@...ner.de>, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net-next v1 2/3] net: dsa: ar9331: add support for pause
 stats

On Mon, Jun 27, 2022 at 09:15:21AM -0700, Jakub Kicinski wrote:
> On Sun, 26 Jun 2022 19:10:08 +0200 Oleksij Rempel wrote:
> > > Is there an authoritative source who is able to tell whether rtnl_link_stats64 ::
> > > rx_packets and tx_packets should count PAUSE frames or not?  
> > 
> > Yes, it will be interesting to know how to proceed with it.
> 
> I'm curious as well, AFAIK most drivers do not count pause to ifc stats.

How do you know? Just because they manually bump stats->tx_bytes and
stats->tx_packets during ndo_start_xmit?

That would be a good assumption, but what if a network driver populates
struct rtnl_link_stats64 entirely based on counters reported by hardware,
including {rx,tx}_{packets,bytes}?

Personally I can't really find a reason why not count pause frames if
you can. And in the same note, why go to the extra lengths of hiding
them as Oleksij does. For example, the ocelot/felix switches do count
PAUSE frames as packets/bytes, both on rx and tx.

> > For example KSZ switch do count pause frame Bytes together will other
> > frames. At same time, atheros switch do not count pause frame bytes
> > at all.
> > 
> > To make things worse, i can manually send pause frame of any size, so
> > it will not be accounted by HW. What ever decision we will made, i
> > will need to calculate typical pause frame size and hope it will fit
> > for 90% of cases.
> 
> :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ