[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171006153059.193688a5@xeon-e3>
Date: Fri, 6 Oct 2017 15:30:59 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: netdev@...r.kernel.org, mst@...hat.com, jasowang@...hat.com,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH RFC 1/3] tun: ethtool stats
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.
Powered by blists - more mailing lists