On Wed, 24 Apr 2024 11:50:44 +0800, Jason Wang wrote:
> On Wed, Apr 24, 2024 at 10:58 AM Xuan Zhuo wrote:
> >
> > On Wed, 24 Apr 2024 10:45:49 +0800, Jason Wang wrote:
> > > On Wed, Apr 24, 2024 at 10:42 AM Xuan Zhuo
> > > wrote:
> > > >
> > > > On Wed, 24 Apr 2024 10:34:56 +0800, Jason Wang
On Tue, Apr 23, 2024 at 7:32 PM Xuan Zhuo wrote:
>
> Now, we have this:
>
> tx_queue_0_tx_timeouts
>
> This is used to record the tx schedule timeout.
> But this has two "tx". I think the below is enough.
>
> tx_queue_0_timeouts
>
> So I rename this field.
>
> Signed-off-by: Xuan Zhuo
> R
On Tue, Apr 23, 2024 at 7:32 PM Xuan Zhuo wrote:
>
> 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_
On Tue, Apr 23, 2024 at 7:32 PM Xuan Zhuo wrote:
>
> 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.
>
>
On Wed, Apr 24, 2024 at 10:58 AM Xuan Zhuo wrote:
>
> On Wed, 24 Apr 2024 10:45:49 +0800, Jason Wang wrote:
> > On Wed, Apr 24, 2024 at 10:42 AM Xuan Zhuo
> > wrote:
> > >
> > > On Wed, 24 Apr 2024 10:34:56 +0800, Jason Wang
> > > wrote:
> > > > On Wed, Apr 24, 2024 at 9:10 AM Xuan Zhuo
> >
On Tue, Apr 23, 2024 at 7:31 PM Xuan Zhuo wrote:
>
> 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_byt
On Wed, 24 Apr 2024 10:45:49 +0800, Jason Wang wrote:
> On Wed, Apr 24, 2024 at 10:42 AM Xuan Zhuo wrote:
> >
> > On Wed, 24 Apr 2024 10:34:56 +0800, Jason Wang wrote:
> > > On Wed, Apr 24, 2024 at 9:10 AM Xuan Zhuo
> > > wrote:
> > > >
> > > > On Wed, 24 Apr 2024 08:43:21 +0800, Jason Wang
On Wed, Apr 24, 2024 at 10:42 AM Xuan Zhuo wrote:
>
> On Wed, 24 Apr 2024 10:34:56 +0800, Jason Wang wrote:
> > On Wed, Apr 24, 2024 at 9:10 AM Xuan Zhuo
> > wrote:
> > >
> > > On Wed, 24 Apr 2024 08:43:21 +0800, Jason Wang
> > > wrote:
> > > > On Tue, Apr 23, 2024 at 8:38 PM Xuan Zhuo
> >
On Wed, 24 Apr 2024 10:34:56 +0800, Jason Wang wrote:
> On Wed, Apr 24, 2024 at 9:10 AM Xuan Zhuo wrote:
> >
> > On Wed, 24 Apr 2024 08:43:21 +0800, Jason Wang wrote:
> > > On Tue, Apr 23, 2024 at 8:38 PM Xuan Zhuo
> > > wrote:
> > > >
> > > > On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang
>
On Wed, Apr 24, 2024 at 9:10 AM Xuan Zhuo wrote:
>
> On Wed, 24 Apr 2024 08:43:21 +0800, Jason Wang wrote:
> > On Tue, Apr 23, 2024 at 8:38 PM Xuan Zhuo
> > wrote:
> > >
> > > On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang
> > > wrote:
> > > > On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo
> > >
On Wed, 24 Apr 2024 08:43:21 +0800, Jason Wang wrote:
> On Tue, Apr 23, 2024 at 8:38 PM Xuan Zhuo wrote:
> >
> > On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang wrote:
> > > On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo
> > > wrote:
> > > >
> > > > In big mode, pre-mapping DMA is beneficial because
On Tue, Apr 23, 2024 at 8:38 PM Xuan Zhuo wrote:
>
> On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang wrote:
> > On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo
> > wrote:
> > >
> > > In big mode, pre-mapping DMA is beneficial because if the pages are not
> > > used, we can reuse them without needing t
On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang wrote:
> On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo wrote:
> >
> > In big mode, pre-mapping DMA is beneficial because if the pages are not
> > used, we can reuse them without needing to unmap and remap.
> >
> > We require space to store the DMA addres
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
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
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 have this:
tx_queue_0_tx_timeouts
This is used to record the tx schedule timeout.
But this has two "tx". I think the below is enough.
tx_queue_0_timeouts
So I rename this field.
Signed-off-by: Xuan Zhuo
Reviewed-by: Jiri Pirko
---
drivers/net/virtio_net.c | 8
1 fil
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
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
---
drivers/net/virtio_net.c | 157 +
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
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
Please ignore, I messed-up. Will send v6 tomorrow. Sigh.
在 2024/4/23 下午6:17, Jiri Pirko 写道:
Tue, Apr 23, 2024 at 10:42:25AM CEST, hen...@linux.alibaba.com wrote:
From: Xuan Zhuo
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
The virtnet cvq supports to get result from the device.
Is this a
Mon, Apr 22, 2024 at 08:47:39PM CEST, benjamin.poir...@gmail.com wrote:
>On 2024-04-22 17:32 +0200, Jiri Pirko wrote:
>> From: Jiri Pirko
>>
>> Add a helper to be used to check if the netdevice is backed by specified
>> driver.
>>
>> Signed-off-by: Jiri Pirko
>> Reviewed-by: Petr Machata
>> --
From: Jiri Pirko
Introduce initial tests for virtio_net driver. Focus on feature testing
leveraging previously introduced debugfs feature filtering
infrastructure. Add very basic ping and F_MAC feature tests.
To run this, do:
$ make -C tools/testing/selftests/ TARGETS=drivers/net/virtio_net/ run
From: Jiri Pirko
The existing setup_wait*() helper family check the status of the
interface to be up. Introduce wait_for_dev() to wait for the netdevice
to appear, for example after test script does manual device bind.
Signed-off-by: Jiri Pirko
Reviewed-by: Petr Machata
---
v3->v4:
- removed "
From: Jiri Pirko
Add a helper to be used to check if the netdevice is backed by specified
driver.
Signed-off-by: Jiri Pirko
Reviewed-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/tools/te
From: Jiri Pirko
Allow driver tests to work without specifying the netdevice names.
Introduce a possibility to search for available netdevices according to
set driver name. Allow test to specify the name by setting
NETIF_FIND_DRIVER variable.
Note that user overrides this either by passing netde
From: Jiri Pirko
Currently there is no way for user to set what features the driver
should obey or not, it is hard wired in the code.
In order to be able to debug the device behavior in case some feature is
disabled, introduce a debugfs infrastructure with couple of files
allowing user to see wh
From: Jiri Pirko
This patchset aims at introducing very basic initial infrastructure
for virtio_net testing, namely it focuses on virtio feature testing.
The first patch adds support for debugfs for virtio devices, allowing
user to filter features to pretend to be driver that is not capable
of t
Tue, Apr 23, 2024 at 10:42:25AM CEST, hen...@linux.alibaba.com wrote:
>From: Xuan Zhuo
>
>As the spec
>https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
>
>The virtnet cvq supports to get result from the device.
Is this a statement about current status, cau
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
The virtnet cvq supports to get result from the device.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 24 +---
1 file changed, 17 insertions(+),
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.
Heng Qi (1):
virtio_net: get init coalesce value when probe
Xuan Zhuo (1):
virtio_net: virtnet_send_command supports command-specific
35 matches
Mail list logo