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, 6 Oct 2017 18:37:01 -0400
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     Network Development <netdev@...r.kernel.org>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH RFC 1/3] tun: ethtool stats

On Fri, Oct 6, 2017 at 6:30 PM, Stephen Hemminger
<stephen@...workplumber.org> wrote:
> On Fri,  6 Oct 2017 18:25:14 -0400
> Willem de Bruijn <willemdebruijn.kernel@...il.com> wrote:
>
>> From: Willem de Bruijn <willemb@...gle.com>
>>
>> Support ethtool -S on tun devices. This interface allows exporting
>> device-specific stats not present in rtnl stats.
>>
>> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
>> ---
>>  drivers/net/tun.c | 38 ++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 38 insertions(+)
>>
>> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
>> index 57e4c31fa84a..df6ef9670d05 100644
>> --- a/drivers/net/tun.c
>> +++ b/drivers/net/tun.c
>> @@ -194,6 +194,15 @@ struct tun_flow_entry {
>>
>>  #define TUN_NUM_FLOW_ENTRIES 1024
>>
>> +static const struct {
>> +     const char string[ETH_GSTRING_LEN];
>> +} tun_ethtool_stats_keys[] = {
>> +     { "rx_packets" },
>> +     { "tx_packets" },
>> +     { "rx_bytes" },
>> +     { "tx_bytes" }
>
> It looks like you are just exporting the statistics taht are already
> through normal path. The purpose of ethtool stats is to provide
> statistics unique to the device, not to repeat what is available throug
> ip, ifconfig, etc.

A follow-up patch adds non-standard statistics.

I included these common ones, because the new zerocopy counters
are only interesting in relation to tx_packets.

It also seems customary among existing network drivers to include
at least these base counters in the ethtool output.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ