All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@google.com>,
	Amritha Nambiar <amritha.nambiar@intel.com>,
	Larysa Zaremba <larysa.zaremba@intel.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	virtualization@lists.linux.dev, bpf@vger.kernel.org
Subject: Re: [PATCH net-next v4 3/8] virtio_net: support device stats
Date: Thu, 14 Mar 2024 15:54:25 -0700	[thread overview]
Message-ID: <20240314155425.74b8c601@kernel.org> (raw)
In-Reply-To: <20240314085459.115933-4-xuanzhuo@linux.alibaba.com>

On Thu, 14 Mar 2024 16:54:54 +0800 Xuan Zhuo wrote:
> make virtio-net support getting the stats from the device by ethtool -S
> <eth0>.
> 
> Due to the numerous descriptors stats, an organization method is
> required. For this purpose, I have introduced the "virtnet_stats_map".
> Utilizing this array simplifies coding tasks such as generating field
> names, calculating buffer sizes for requests and responses, and parsing
> replies from the device. By iterating over the "virtnet_stats_map,"
> these operations become more streamlined and efficient.

Don't duplicate the stats which get reported via the netlink API in
ethtool. Similar story to the rtnl stats:

https://docs.kernel.org/next/networking/statistics.html#notes-for-driver-authors

  reply	other threads:[~2024-03-14 22:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  8:54 [PATCH net-next v4 0/8] virtio-net: support device stats Xuan Zhuo
2024-03-14  8:54 ` [PATCH net-next v4 1/8] virtio_net: introduce device stats feature and structures Xuan Zhuo
2024-03-14  8:54 ` [PATCH net-next v4 2/8] virtio_net: virtnet_send_command supports command-specific-result Xuan Zhuo
2024-03-14  8:54 ` [PATCH net-next v4 3/8] virtio_net: support device stats Xuan Zhuo
2024-03-14 22:54   ` Jakub Kicinski [this message]
2024-03-15  8:05     ` Xuan Zhuo
2024-03-19 17:15       ` Jakub Kicinski
2024-03-20  8:12         ` Xuan Zhuo
2024-03-14  8:54 ` [PATCH net-next v4 4/8] virtio_net: stats map include driver stats Xuan Zhuo
2024-03-14  8:54 ` [PATCH net-next v4 5/8] virtio_net: add the total stats field Xuan Zhuo
2024-03-14  8:54 ` [PATCH net-next v4 6/8] virtio_net: rename stat tx_timeout to timeout Xuan Zhuo
2024-03-14  8:54 ` [PATCH net-next v4 7/8] netdev: add queue stats Xuan Zhuo
2024-03-14 23:21   ` Jakub Kicinski
2024-03-15  8:11     ` Xuan Zhuo
2024-03-14  8:54 ` [PATCH net-next v4 8/8] virtio-net: support queue stat Xuan Zhuo
2024-03-14 22:56   ` Jakub Kicinski
2024-03-15  8:10     ` Xuan Zhuo
2024-03-14 10:47 ` [PATCH net-next v4 0/8] virtio-net: support device stats Paolo Abeni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240314155425.74b8c601@kernel.org \
    --to=kuba@kernel.org \
    --cc=amritha.nambiar@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=larysa.zaremba@intel.com \
    --cc=maciej.fijalkowski@intel.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@google.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.