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 8/8] virtio-net: support queue stat
Date: Thu, 14 Mar 2024 15:56:16 -0700	[thread overview]
Message-ID: <20240314155616.107de7c3@kernel.org> (raw)
In-Reply-To: <20240314085459.115933-9-xuanzhuo@linux.alibaba.com>

On Thu, 14 Mar 2024 16:54:59 +0800 Xuan Zhuo wrote:
> +static void virtnet_get_base_stats(struct net_device *dev,
> +				   struct netdev_queue_stats_rx *rx,
> +				   struct netdev_queue_stats_tx *tx)
> +{
> +	/* The queue stats of the virtio-net will not be reset. So here we
> +	 * return 0.
> +	 */
> +	memset(rx, 0, sizeof(*rx));
> +	memset(tx, 0, sizeof(*tx));
> +}

/**
 * struct netdev_stat_ops - netdev ops for fine grained stats
 * @get_queue_stats_rx:	get stats for a given Rx queue
 * @get_queue_stats_tx:	get stats for a given Tx queue
 * @get_base_stats:	get base stats (not belonging to any live instance)
 *
 * Query stats for a given object. The values of the statistics are undefined
 * on entry (specifically they are *not* zero-initialized). Drivers should
 * assign values only to the statistics they collect. Statistics which are not
 * collected must be left undefined.                  ^^^^^^^^^^^^^^^^^^^^^^^^
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  reply	other threads:[~2024-03-14 22:56 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
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 [this message]
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=20240314155616.107de7c3@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.