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:	Sun, 26 Jun 2016 11:33:34 +0200
From:	Jiri Pirko <>
To:	Roopa Prabhu <>
Cc:	Anuradha Karuppiah <>,
	"" <>,
	"" <>,
	Nogah Frankel <>,
	Ido Schimmel <>,
	Elad Raz <>,
	Yotam Gigi <>,
	Or Gerlitz <>,
	Nikolay Aleksandrov <>,
	John Linville <>,
	Thomas Graf <>,
	Andy Gospodarek <>,
	Scott Feldman <>,,, Alexei Starovoitov <>,
	Eric Dumazet <>,
	"" <>,
	Florian Fainelli <>,
	David Ahern <>
Subject: Re: [patch net-next v5 0/4] return offloaded stats as default and
 expose original sw stats

Sat, Jun 25, 2016 at 05:50:59PM CEST, wrote:
>On Thu, Jun 23, 2016 at 8:40 AM, Jiri Pirko <> wrote:
>> Thu, Jun 23, 2016 at 05:11:26PM CEST, wrote:
>>>>>>> we can't separate CPU and HW stats there. In some cases (or ASICs) HW
>>>>>>> counters do
>>>>>>> not include CPU generated will have to add CPU
>>>>>>> generated pkt counters to the
>>>>>>> hw counters for such virtual device stats.
>>>>>> Can you please provide and example how that could happen?
>>>>>example is the bridge vlan stats I mention below. These are usually counted
>>>>>by attaching hw virtual counter resources. And CPU generated packets
>>>>>in some cases maybe setup to bypass the ASIC pipeline because the CPU
>>>>>has already made the required decisions. So, they may not be counted by
>>>>>by such hw virtual counters.
>>>> Bypass ASIC? How do the packets get on the wire?
>>>Bypass the "forwarding pipeline" in the ASIC that is. Obviously the
>>>ASIC ships the CPU generated packet out of the switch/front-panel
>>>port. Continuing Roopa's example of vlan netdev stats.... To get the
>>>HW stats counters are typically tied to the ingress and egress vlan hw
>>>entries. All the incoming packets are subject to the ingress vlan
>>>lookup irrespective of whether they get punted to the CPU or whether
>>>they are forwarded to another front panel port. In that case the
>>>ingress HW stats does represent all packets. However for CPU
>>>originated packets egress vlan lookups are bypassed in the ASIC (this
>>>is common forwarding option in most ASICs) and the packet shipped as
>>>is out of front-panel port specified by the CPU. Which means these
>>>packets will NOT be counted against the egress VLAN HW counter; hence
>>>the need for summation.
>> Driver will know about this, and will provide the stats accordignly to
>> the core. Who else than driver should resolve this.
>The point was/is that there should be only two categories:
>1) the base default stats: can contain 'only sw', 'only hw' or 'a
>summation of hw and sw' in some cases.
>The user does not care about the breakdown.
>2) everything else falls into the second category: driver provided
>breakdown of stats for easier debugging.
>This today is ethtool stats and we can have an equivalent nested
>attribute for this in the new stats api.
>Lets call it IFLA_STATS_LINK_DRIVER or you pick a name. Lets make it
>nested and extensible (like ethtool is) and
>driver can expose any kind of stats there.
>ie lets move the stats you are proposing to this category of stats.....
>instead of introducing a third category 'SW stats'.

What you are proposing is essentially what our patchset does. We expose
2 sets of stats. hw and pure sw. hw includes all, driver will take
care of it cause he knows what is going on in hw.

Btw mirroring random string stats into Netlink is not a good idea IMO.

Powered by blists - more mailing lists