Currently, virtio-net lacks a way to obtain the default coalesce
values of the device during the probe phase. That is, the device
may have default experience values, but the user uses "ethtool -c"
to query that the values are still 0.
Therefore, we reuse VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET to complet
From: Xuan Zhuo
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
Based on the description provided in the above specification, we have
enabled the virtio-net driver to support acquiring some response
information from the device via the CVQ (Co
Patch 1 from Xuan: the virtnet cvq supports to get
result from the device.
Patch 2 reuses the VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET cmd to
get init coalesce value.
Changelog
==
v1->v2:
- Update patch1's commit log.
Heng Qi (1):
virtio_net: get init coalesce value when probe
Xuan Zhuo (1)
These stats are commonly. Support reporting those via netdev-genl queue
stats.
name: rx-hw-drops
name: rx-hw-drop-overruns
name: rx-csum-unnecessary
name: rx-csum-none
name: rx-csum-bad
name: rx-hw-gro-packets
name: rx-hw-gro-bytes
name: rx-hw-gro-wire-packets
name: rx-hw-gro-wire-bytes
name: rx-h
To enhance functionality, we now support reporting statistics through
the netdev-generic netlink (netdev-genl) queue stats interface. However,
this does not extend to all statistics, so a new field, qstat_offset,
has been introduced. This field determines which statistics should be
reported via net
Now, we just show the stats of every queue.
But for the user, the total values of every stat may are valuable.
NIC statistics:
rx_packets: 373522
rx_bytes: 85919736
rx_drops: 0
rx_xdp_packets: 0
rx_xdp_tx: 0
rx_xdp_redirects: 0
rx_xdp_drops: 0
rx_kicks: 111
In the last commit, we introduced some helpers for device stats.
And the drivers stats are realized by the open code.
This commit make the helpers to support driver stats.
Then we can have the unify helper for device and driver stats.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/ne
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
make virtio-net support getting the stats from the device by ethtool -S
.
NIC statistics:
rx0_packets: 582951
rx0_bytes: 155307077
rx0_drops: 0
rx0_xdp_packets: 0
rx0_xdp
As the spec:
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
The virtio net supports to get device stats.
Please review.
Thanks.
v6:
1. remove 'maps'. check stats by if-else.
v5:
1. Fix some small problems in last version
2. Not report stat
The key size of ethtool -S is controlled by this macro.
ETH_GSTRING_LEN 32
That includes the \0 at the end. So the max length of the key name must
is 31. But the length of the prefix "rx_queue_0_" is 11. If the queue
num is larger than 10, the length of the prefix is 12. So the
key name max is 19
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
Based on the description provided in the above specification, we have
enabled the virtio-net driver to support acquiring some response
information from the device via the CVQ (Control Virtqueue).
The virtio-net device stats spec:
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
We introduce the relative feature and structures.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
include/uapi/linux/virtio_net.h | 143
在 2024/4/26 上午10:21, Jakub Kicinski 写道:
On Thu, 25 Apr 2024 20:58:54 +0800 Heng Qi wrote:
When the dim worker is scheduled, if it no longer needs to issue
commands, dim may not be able to return to the working state later.
For example, the following single queue scenario:
1. The dim worker
On Thu, 25 Apr 2024 20:58:54 +0800 Heng Qi wrote:
> When the dim worker is scheduled, if it no longer needs to issue
> commands, dim may not be able to return to the working state later.
>
> For example, the following single queue scenario:
> 1. The dim worker of rxq0 is scheduled, and the dim s
Currently, ctrlq processes commands in a synchronous manner,
which increases the delay of dim commands when configuring
multi-queue VMs, which in turn causes the CPU utilization to
increase and interferes with the performance of dim.
Therefore we asynchronously process ctlq's dim commands.
Signed
Ctrlq in polling mode may cause the virtual machine to hang and
occupy additional CPU resources. Enabling the irq for ctrlq
alleviates this problem and allows commands to be requested
concurrently.
This patch set is on top of
https://lore.kernel.org/all/20240423035746.699466-1-dani...@nvidia.com/
Control vq polling request results consume more CPU.
Especially when dim issues more control requests to the device,
it's beneficial to the guest to enable control vq's irq.
Suggested-by: Jason Wang
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 45 ++-
When the dim worker is scheduled, if it no longer needs to issue
commands, dim may not be able to return to the working state later.
For example, the following single queue scenario:
1. The dim worker of rxq0 is scheduled, and the dim status is
changed to DIM_APPLY_NEW_PROFILE;
2. dim is
On Wed, 24 Apr 2024 20:44:22 -0700, Jakub Kicinski wrote:
> On Tue, 23 Apr 2024 19:31:41 +0800 Xuan Zhuo wrote:
> > +static void virtnet_get_base_stats(struct net_device *dev,
> > + struct netdev_queue_stats_rx *rx,
> > + struct netdev_queu
19 matches
Mail list logo