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:	Fri, 13 May 2016 08:06:41 +0200
From:	Jiri Pirko <jiri@...nulli.us>
To:	Florian Fainelli <f.fainelli@...il.com>
Cc:	Roopa Prabhu <roopa@...ulusnetworks.com>,
	netdev <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>, nogahf@...lanox.com,
	Ido Schimmel <idosch@...lanox.com>,
	Elad Raz <eladr@...lanox.com>,
	Yotam Gigi <yotamg@...lanox.com>,
	ogerlitz <ogerlitz@...lanox.com>,
	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>,
	John Linville <linville@...driver.com>, tgraf <tgraf@...g.ch>,
	Andy Gospodarek <gospo@...ulusnetworks.com>,
	Scott Feldman <sfeldma@...il.com>,
	Sabrina Dubroca <sd@...asysnail.net>,
	Eran Ben Elisha <eranbe@...lanox.com>,
	Alexei Starovoitov <ast@...mgrid.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: Re: [patch net-next 1/4] netdevice: add SW statistics ndo

Fri, May 13, 2016 at 12:23:13AM CEST, f.fainelli@...il.com wrote:
>2016-05-12 14:10 GMT-07:00 Roopa Prabhu <roopa@...ulusnetworks.com>:
>> On 5/12/16, 4:48 AM, Jiri Pirko wrote:
>>> From: Nogah Frankel <nogahf@...lanox.com>
>>>
>>> Till now we had a ndo statistics function that returned SW statistics.
>>> We want to change the "basic" statistics to return HW statistics if
>>> available.
>>> In this case we need to expose a new ndo to return the SW statistics.
>>> Add a new ndo declaration to get SW statistics
>>> Add a function that gets SW statistics if a competible ndo exist
>>>
>>> Signed-off-by: Nogah Frankel <nogahf@...lanox.com>
>>> Reviewed-by: Ido Schimmel <idosch@...lanox.com>
>>> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
>>> ---
>>>
>> To me netdev stats is  combined 'SW + HW' stats for that netdev.
>> ndo_get_stats64 callback into the drivers does the magic of adding HW stats
>> to SW (netdev) stats and returning (see enic_get_stats). HW stats is available for netdevs
>> that are offloaded or are backed by hardware. SW stats is the stats that the driver maintains
>> (logical or physical). HW stats is queried and added to the SW stats.
>> In fact, we represent all our offloaded netdev stats following this model.
>> This fits well for logical devices like vlan/bond/vxlan which are hardware offloaded too.
>
>Agreed, if you take a look at what the DSA slave network devices do in
>net/dsa/slave.c they basically overload the switch-mainainted
>statistics with some per-port net_device software stats. We would
>probably want to do the same thing

net/dsa/slave.c does not define ndo_get_stats*. I don't follow.


>
>>
>> There is HW extended stats which today are represented by ethtool
>> and I had an example of a new nested attribute like IFLA_STATS_LINK_HW_EXTENDED
>> to provide ethtool like extensible stats. If people want pure hardware stats, they
>> get it via this. In which case I am not seeing the point in adding a new ndo and a new
>> stats attribute just for this. If you are looking for pure hardware stats, any reason we cant
>> just use the IFLA_STATS_LINK_HW_EXTENDED and add ethtool like hw stats ?.
>> This will be one place to look for all hardware stats and will be extensible too.
>
>Agreed, worste case, you format your statistics such that they reflect
>they come from the HW (e.g: hw_TxOctets...)
>-- 
>Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ