[PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Daniel Jurgens
Add a tx queue stop and wake counters, they are useful for debugging. $ ethtool -S ens5f2 | grep 'tx_stop\|tx_wake' ... tx_queue_1_tx_stop: 16726 tx_queue_1_tx_wake: 16726 ... tx_queue_8_tx_stop: 1500110 tx_queue_8_tx_wake: 1500110 Signed-of

Re: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Michael S. Tsirkin
On Tue, Jan 30, 2024 at 08:25:21AM -0600, Daniel Jurgens wrote: > Add a tx queue stop and wake counters, they are useful for debugging. > > $ ethtool -S ens5f2 | grep 'tx_stop\|tx_wake' > ... > tx_queue_1_tx_stop: 16726 > tx_queue_1_tx_wake: 16726 > ... > tx_que

Re: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Heng Qi
在 2024/1/30 下午10:25, Daniel Jurgens 写道: Add a tx queue stop and wake counters, they are useful for debugging. $ ethtool -S ens5f2 | grep 'tx_stop\|tx_wake' ... tx_queue_1_tx_stop: 16726 tx_queue_1_tx_wake: 16726 ... tx_queue_8_tx_stop: 1500110

RE: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Daniel Jurgens
> From: Michael S. Tsirkin > Sent: Tuesday, January 30, 2024 8:58 AM > > On Tue, Jan 30, 2024 at 08:25:21AM -0600, Daniel Jurgens wrote: > > Add a tx queue stop and wake counters, they are useful for debugging. > > > > $ ethtool -S ens5f2 | grep 'tx_stop\|tx_wake' > > ... > > tx_queue

Re: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Michael S. Tsirkin
On Tue, Jan 30, 2024 at 03:40:21PM +, Daniel Jurgens wrote: > > From: Michael S. Tsirkin > > Sent: Tuesday, January 30, 2024 8:58 AM > > > > On Tue, Jan 30, 2024 at 08:25:21AM -0600, Daniel Jurgens wrote: > > > Add a tx queue stop and wake counters, they are useful for debugging. > > > > > >

RE: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Daniel Jurgens
> From: Heng Qi > Sent: Tuesday, January 30, 2024 9:17 AM > 在 2024/1/30 下午10:25, Daniel Jurgens 写道: > > Add a tx queue stop and wake counters, they are useful for debugging. > > > > $ ethtool -S ens5f2 | grep 'tx_stop\|tx_wake' > > ... > > tx_queue_1_tx_stop: 16726 > > tx_queue_1_t

RE: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Daniel Jurgens
> From: Michael S. Tsirkin > Sent: Tuesday, January 30, 2024 9:42 AM > On Tue, Jan 30, 2024 at 03:40:21PM +, Daniel Jurgens wrote: > > > From: Michael S. Tsirkin > > > Sent: Tuesday, January 30, 2024 8:58 AM > > > > > > On Tue, Jan 30, 2024 at 08:25:21AM -0600, Daniel Jurgens wrote: > > > > A

Re: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Michael S. Tsirkin
On Tue, Jan 30, 2024 at 03:43:48PM +, Daniel Jurgens wrote: > > From: Heng Qi > > Sent: Tuesday, January 30, 2024 9:17 AM > > 在 2024/1/30 下午10:25, Daniel Jurgens 写道: > > > Add a tx queue stop and wake counters, they are useful for debugging. > > > > > > $ ethtool -S ens5f2 | grep 'tx_stop\|t

Re: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Michael S. Tsirkin
On Tue, Jan 30, 2024 at 03:50:29PM +, Daniel Jurgens wrote: > > From: Michael S. Tsirkin > > Sent: Tuesday, January 30, 2024 9:42 AM > > On Tue, Jan 30, 2024 at 03:40:21PM +, Daniel Jurgens wrote: > > > > From: Michael S. Tsirkin > > > > Sent: Tuesday, January 30, 2024 8:58 AM > > > > > >

RE: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Daniel Jurgens
> From: Michael S. Tsirkin > Sent: Tuesday, January 30, 2024 9:53 AM > On Tue, Jan 30, 2024 at 03:50:29PM +, Daniel Jurgens wrote: > > > From: Michael S. Tsirkin > > > Sent: Tuesday, January 30, 2024 9:42 AM On Tue, Jan 30, 2024 at > > > 03:40:21PM +, Daniel Jurgens wrote: > > > > > From:

[PATCH net-next v2 1/6] virtio_net: introduce device stats feature and structures

2024-01-30 Thread Xuan Zhuo
The virtio-net device stats spec: https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82 This commit introduces the relative feature and structures. Signed-off-by: Xuan Zhuo --- include/uapi/linux/virtio_net.h | 137 1 file cha

[PATCH net-next v2 0/6] virtio-net: support device stats

2024-01-30 Thread Xuan Zhuo
As the spec: https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82 The virtio net supports to get device stats. Please review. Thanks. v2: 1. fix the usage of the leXX_to_cpu() 2. add comment to the structure virtnet_stats_map v1: 1. fix some def

[PATCH net-next v2 2/6] virtio_net: virtnet_send_command supports command-specific-result

2024-01-30 Thread Xuan Zhuo
As the spec https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82 The virtnet cvq supports to get result from the device. This commit implement this. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 47 +++- 1 file c

[PATCH net-next v2 3/6] virtio_net: support device stats

2024-01-30 Thread Xuan Zhuo
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 . Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 362 ++- 1 file changed, 35

[PATCH net-next v2 4/6] virtio_net: stats map include driver stats

2024-01-30 Thread Xuan Zhuo
In the last commit, we use the stats map to manage the device stats. For the consistency, we let the stats map includes the driver stats. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 195 --- 1 file changed, 100 insertions(+), 95 deletions(-) diff

[PATCH net-next v2 5/6] virtio_net: add the total stats field

2024-01-30 Thread Xuan Zhuo
Now, we just show the stats of every queue. But for the user, the total values of every stat may are valuable. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 72 ++-- 1 file changed, 61 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio_

[PATCH net-next v2 6/6] virtio_net: rename stat tx_timeout to timeout

2024-01-30 Thread Xuan Zhuo
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 --- drivers/net/virtio_net.c | 8 1 file changed, 4 insertions(+

Re: [PATCH net-next] virtio_net: Add TX stop and wake counters

2024-01-30 Thread Jason Xing
On Wed, Jan 31, 2024 at 1:53 AM Daniel Jurgens wrote: > > > From: Michael S. Tsirkin > > Sent: Tuesday, January 30, 2024 9:53 AM > > On Tue, Jan 30, 2024 at 03:50:29PM +, Daniel Jurgens wrote: > > > > From: Michael S. Tsirkin > > > > Sent: Tuesday, January 30, 2024 9:42 AM On Tue, Jan 30, 20