[virtio-dev] [PATCH v7] virtio-net: support device stats

2022-01-04 Thread Xuan Zhuo
-by: Xuan Zhuo --- v7: 1. add rx_reset, tx_reset 2. add device normative and dirver normative 3. add comments for *_packets, *_bytres v6: 1. correct the names and descriptions of some stats items v5: 1. add VIRTIO_NET_CTRL_STATS_GET_CTRL_VQ 2. more item for virtio_net_ctrl_reply_stats_queue_pair

[virtio-dev] [PATCH v6] virtio-net: support device stats

2021-12-23 Thread Xuan Zhuo
-by: Xuan Zhuo --- v6: 1. correct the names and descriptions of some stats items v5: 1. add VIRTIO_NET_CTRL_STATS_GET_CTRL_VQ 2. more item for virtio_net_ctrl_reply_stats_queue_pair v4: 1. remove dev_stats_num, {rx|tx}_stats_num 2. Use two commands to get the stats of queue pair and dev

[virtio-dev] [PATCH v5] virtio-net: support device stats

2021-12-15 Thread Xuan Zhuo
-by: Xuan Zhuo --- v5: 1. add VIRTIO_NET_CTRL_STATS_GET_CTRL_VQ 2. more item for virtio_net_ctrl_reply_stats_queue_pair v4: 1. remove dev_stats_num, {rx|tx}_stats_num 2. Use two commands to get the stats of queue pair and dev respectively v3 changes: 1. add dev_version 2. use queue_pair_index

Re: [virtio-dev] [PATCH v7 0/3] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-12-14 Thread Xuan Zhuo
On Mon, 6 Dec 2021 12:00:26 +0800, Jason Wang wrote: > On Mon, Dec 6, 2021 at 11:06 AM Xuan Zhuo wrote: > > > > On Mon, 8 Nov 2021 14:22:40 +0800, Xuan Zhuo > > wrote: > > > Hi All: > > > > > > This is a new version to support VIRTIO_F_RING_RES

Re: [virtio-dev] [PATCH v4] virtio-net: support device stats

2021-12-08 Thread Xuan Zhuo
On Mon, 6 Dec 2021 12:12:02 +0800, Jason Wang wrote: > On Mon, Dec 6, 2021 at 11:07 AM Xuan Zhuo wrote: > > > > On Tue, 28 Sep 2021 17:13:40 +0800, Xuan Zhuo > > wrote: > > > > Hi, everybody, is there anything else I need to do with this patch? When > >

Re: [virtio-dev] [PATCH v4] virtio-net: support device stats

2021-12-05 Thread Xuan Zhuo
On Tue, 28 Sep 2021 17:13:40 +0800, Xuan Zhuo wrote: Hi, everybody, is there anything else I need to do with this patch? When will this patch be merged into, so that I can carry out follow-up work. Thanks. > This patch allows the driver to obtain some statistics from the dev

Re: [virtio-dev] [PATCH v7 0/3] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-12-05 Thread Xuan Zhuo
On Mon, 8 Nov 2021 14:22:40 +0800, Xuan Zhuo wrote: > Hi All: > > This is a new version to support VIRTIO_F_RING_RESET. The feautre > extends the basic facility to allow the driver to reset a virtqueue. > This main motivation is to support the reset function of the queue of the &

Re: [virtio-dev] [PATCH v7 2/3] virtio: pci support virtqueue reset

2021-11-09 Thread Xuan Zhuo
On Tue, 9 Nov 2021 08:33:39 -0500, Michael S. Tsirkin wrote: > On Mon, Nov 08, 2021 at 02:22:42PM +0800, Xuan Zhuo wrote: > > PCI support virtqueue reset. > > > > virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. > > The driver use

[virtio-dev] [PATCH v7 3/3] virtio: mmio support virtqueue reset

2021-11-07 Thread Xuan Zhuo
mmio support virtqueue reset. MMIO Device Register Layout "QueueReady" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 33 - 1 file changed, 32 insertions(+), 1 deletion(-)

[virtio-dev] [PATCH v7 2/3] virtio: pci support virtqueue reset

2021-11-07 Thread Xuan Zhuo
PCI support virtqueue reset. virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 32 1 file changed, 32 insertions(+) diff --git a/con

[virtio-dev] [PATCH v7 1/3] virtio: introduce virtqueue reset as basic facility

2021-11-07 Thread Xuan Zhuo
for AF_XDP, we need to disable a queue to release all the original buffers when AF_XDP setup. And quickly release all the AF_XDP buffers that have been placed in the queue when AF_XDP exits. Signed-off-by: Xuan Zhuo --- content.tex | 46 ++ 1 file

[virtio-dev] [PATCH v7 0/3] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-11-07 Thread Xuan Zhuo
support this. Xuan Zhuo (3): virtio: introduce virtqueue reset as basic facility virtio: pci support virtqueue reset virtio: mmio support virtqueue reset content.tex | 111 +++- 1 file changed, 110 insertions(+), 1 deletion(-) -- 2.31.0

[virtio-dev] [PATCH v6 3/3] virtio: mmio support virtqueue reset

2021-10-14 Thread Xuan Zhuo
mmio support virtqueue reset. MMIO Device Register Layout "QueueReady" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 33 - 1 file changed, 32 insertions(+), 1 deletion(-)

[virtio-dev] [PATCH v6 2/3] virtio: pci support virtqueue reset

2021-10-14 Thread Xuan Zhuo
PCI support virtqueue reset. virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 32 1 file changed, 32 insertions(+) diff --git a/con

[virtio-dev] [PATCH v6 1/3] virtio: introduce virtqueue reset as basic facility

2021-10-14 Thread Xuan Zhuo
for AF_XDP, we need to disable a queue to release all the original buffers when AF_XDP setup. And quickly release all the AF_XDP buffers that have been placed in the queue when AF_XDP exits. Signed-off-by: Xuan Zhuo --- content.tex | 46 ++ 1 file

[virtio-dev] [PATCH v6 0/3] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-10-14 Thread Xuan Zhuo
default values after queue reset. v5: It is defined in the transports that the device can modify the default value after reset, and the driver can use a different configuration to re-enable the device. v4: Cornelia Huck helped me more. Thanks. MMIO support this. Thanks Xuan Zhuo (3

[virtio-dev] Re: [PATCH v5 2/3] virtio: pci support virtqueue reset

2021-10-13 Thread Xuan Zhuo
On Wed, 13 Oct 2021 14:05:14 +0800, Jason Wang wrote: > On Fri, Oct 1, 2021 at 1:50 AM Xuan Zhuo wrote: > > > > PCI support virtqueue reset. > > > > virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. > > The driver uses this to sele

[virtio-dev] [PATCH v5 2/3] virtio: pci support virtqueue reset

2021-09-30 Thread Xuan Zhuo
PCI support virtqueue reset. virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 32 1 file changed, 32 insertions(+) diff --git a/con

[virtio-dev] [PATCH v5 3/3] virtio: mmio support virtqueue reset

2021-09-30 Thread Xuan Zhuo
mmio support virtqueue reset. MMIO Device Register Layout "QueueReady" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 33 - 1 file changed, 32 insertions(+), 1 deletion(-)

[virtio-dev] [PATCH v5 1/3] virtio: introduce virtqueue reset as basic facility

2021-09-30 Thread Xuan Zhuo
for AF_XDP, we need to disable a queue to release all the original buffers when AF_XDP setup. And quickly release all the AF_XDP buffers that have been placed in the queue when AF_XDP exits. Signed-off-by: Xuan Zhuo --- content.tex | 46 ++ 1 file

[virtio-dev] [PATCH v5 0/3] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-09-30 Thread Xuan Zhuo
that the device can modify the default value after reset, and the driver can use a different configuration to re-enable the device. v4: Cornelia Huck helped me more. Thanks. MMIO support this. Thanks Xuan Zhuo (3): virtio: introduce virtqueue reset as basic facility virtio: pci support

[virtio-dev] Re: [PATCH v3] virtio-net: support device stats

2021-09-28 Thread Xuan Zhuo
On Wed, 29 Sep 2021 11:24:50 +0800, Jason Wang wrote: > On Wed, Sep 29, 2021 at 11:14 AM Xuan Zhuo wrote: > > > > On Wed, 29 Sep 2021 11:07:21 +0800, Jason Wang wrote: > > > On Wed, Sep 29, 2021 at 10:34 AM Xuan Zhuo > > > wrote: > > > > > >

[virtio-dev] Re: [PATCH v3] virtio-net: support device stats

2021-09-28 Thread Xuan Zhuo
On Wed, 29 Sep 2021 11:07:21 +0800, Jason Wang wrote: > On Wed, Sep 29, 2021 at 10:34 AM Xuan Zhuo wrote: > > > > On Wed, 29 Sep 2021 10:07:52 +0800, Jason Wang wrote: > > > On Tue, Sep 28, 2021 at 11:48 AM Xuan Zhuo > > > wrote: > > > > > >

[virtio-dev] Re: [PATCH v4 2/3] virtio: pci support virtqueue reset

2021-09-28 Thread Xuan Zhuo
On Tue, 28 Sep 2021 12:20:46 +0200, Cornelia Huck wrote: > On Tue, Sep 28 2021, Xuan Zhuo wrote: > > > PCI support virtqueue reset. > > > > virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. > > The driver uses this to selectively rese

[virtio-dev] Re: [PATCH v3] virtio-net: support device stats

2021-09-28 Thread Xuan Zhuo
On Wed, 29 Sep 2021 10:07:52 +0800, Jason Wang wrote: > On Tue, Sep 28, 2021 at 11:48 AM Xuan Zhuo wrote: > > > > On Tue, 28 Sep 2021 11:25:40 +0800, Jason Wang wrote: > > > On Mon, Sep 27, 2021 at 2:54 PM Xuan Zhuo > > > wrote: > > > > > >

[virtio-dev] Re: [PATCH v4 1/3] virtio: introduce virtqueue reset as basic facility

2021-09-28 Thread Xuan Zhuo
On Tue, 28 Sep 2021 12:06:01 +0200, Cornelia Huck wrote: > On Tue, Sep 28 2021, Xuan Zhuo wrote: > > > This patch allows the driver to reset a queue individually. > > > > This is very common on general network equipment. By disabling a queue, > > you can quickl

[virtio-dev] [PATCH v4] virtio-net: support device stats

2021-09-28 Thread Xuan Zhuo
-by: Xuan Zhuo --- v4: 1. remove dev_stats_num, {rx|tx}_stats_num 2. Use two commands to get the stats of queue pair and dev respectively v3 changes: 1. add dev_version 2. use queue_pair_index replace rx_num, tx_num 3. Explain the processing when the device and driver support different numbers

[virtio-dev] [PATCH v4 3/3] virtio: mmio support virtqueue reset

2021-09-28 Thread Xuan Zhuo
mmio support virtqueue reset. MMIO Device Register Layout "QueueReady" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 29 - 1 file changed, 28 insertions(+), 1 deletion(-)

[virtio-dev] [PATCH v4 2/3] virtio: pci support virtqueue reset

2021-09-28 Thread Xuan Zhuo
PCI support virtqueue reset. virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 28 1 file changed, 28 insertions(+) diff --git a/con

[virtio-dev] [PATCH v4 1/3] virtio: introduce virtqueue reset as basic facility

2021-09-28 Thread Xuan Zhuo
for AF_XDP, we need to disable a queue to release all the original buffers when AF_XDP setup. And quickly release all the AF_XDP buffers that have been placed in the queue when AF_XDP exits. Signed-off-by: Xuan Zhuo --- content.tex | 45 + 1 file changed

[virtio-dev] [PATCH v4 0/3] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-09-28 Thread Xuan Zhuo
. MMIO support this. Thanks Xuan Zhuo (3): virtio: introduce virtqueue reset as basic facility virtio: pci support virtqueue reset virtio: mmio support virtqueue reset content.tex | 102 +++- 1 file changed, 101 insertions(+), 1 deletion

Re: [virtio-dev] [PATCH v3 2/2] virtio: pci support virtqueue reset

2021-09-28 Thread Xuan Zhuo
On Mon, 27 Sep 2021 16:51:43 +0200, Cornelia Huck wrote: > On Mon, Sep 27 2021, Xuan Zhuo wrote: > > > PCI support virtqueue reset. > > > > virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. > > The driver uses this to selectively rese

[virtio-dev] Re: [PATCH v3] virtio-net: support device stats

2021-09-27 Thread Xuan Zhuo
On Tue, 28 Sep 2021 11:25:40 +0800, Jason Wang wrote: > On Mon, Sep 27, 2021 at 2:54 PM Xuan Zhuo wrote: > > > > On Mon, 27 Sep 2021 11:50:35 +0800, Jason Wang wrote: > > > On Thu, Sep 16, 2021 at 5:33 PM Xuan Zhuo > > > wrote: > > > > > &

[virtio-dev] Re: [PATCH v3 1/2] virtio: introduce virtqueue reset as basic facility

2021-09-27 Thread Xuan Zhuo
On Tue, 28 Sep 2021 11:01:55 +0800, Jason Wang wrote: > On Mon, Sep 27, 2021 at 8:32 PM Xuan Zhuo wrote: > > > > This patch allows the driver to reset a queue individually. > > > > This is very common on general network equipment. By disabling a queue, > > y

Re: [virtio-dev] [PATCH v3 1/2] virtio: introduce virtqueue reset as basic facility

2021-09-27 Thread Xuan Zhuo
On Mon, 27 Sep 2021 16:37:28 +0200, Cornelia Huck wrote: > On Mon, Sep 27 2021, Xuan Zhuo wrote: > > > This patch allows the driver to reset a queue individually. > > > > This is very common on general network equipment. By disabling a queue, > > you can quickl

[virtio-dev] [PATCH v3 1/2] virtio: introduce virtqueue reset as basic facility

2021-09-27 Thread Xuan Zhuo
for AF_XDP, we need to disable a queue to release all the original buffers when AF_XDP setup. And quickly release all the AF_XDP buffers that have been placed in the queue when AF_XDP exits. Signed-off-by: Xuan Zhuo --- content.tex | 41 + 1 file changed, 41

[virtio-dev] [PATCH v3 2/2] virtio: pci support virtqueue reset

2021-09-27 Thread Xuan Zhuo
PCI support virtqueue reset. virtio_pci_common_cfg add "queue_reset" to support virtqueue reset. The driver uses this to selectively reset the queue. Signed-off-by: Xuan Zhuo --- content.tex | 21 + 1 file changed, 21 insertions(+) diff --git a/content.tex b/c

[virtio-dev] [PATCH v3 0/2] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-09-27 Thread Xuan Zhuo
Hi All: This is a new version to support VIRTIO_F_RING_RESET. The feautre extends the basic facility to allow the driver to reset a virtqueue. This main motivation is to support the reset function of the queue of the network device. Please review. Thanks Xuan Zhuo (2): virtio: introduce

[virtio-dev] Re: [PATCH v3] virtio-net: support device stats

2021-09-27 Thread Xuan Zhuo
On Mon, 27 Sep 2021 11:50:35 +0800, Jason Wang wrote: > On Thu, Sep 16, 2021 at 5:33 PM Xuan Zhuo wrote: > > > > This patch allows the driver to obtain some statistics from the device. > > > > In the back-end implementation, we can count a lot of such informa

[virtio-dev] [PATCH v3] virtio-net: support device stats

2021-09-16 Thread Xuan Zhuo
-by: Xuan Zhuo --- v3 changes: 1. add dev_version 2. use queue_pair_index replace rx_num, tx_num 3. Explain the processing when the device and driver support different numbers of stats content.tex | 115 1 file changed, 115 insertions(+) diff

[virtio-dev] [PATCH] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-09-16 Thread Xuan Zhuo
for AF_XDP, we need to disable a queue to release all the original buffers when AF_XDP setup. And quickly release all the AF_XDP buffers that have been placed in the queue when AF_XDP exits. Signed-off-by: Xuan Zhuo --- content.tex | 32 +--- 1 file changed, 29

Re: [virtio-dev] [PATCH v2] virtio-net: support device stats

2021-09-02 Thread Xuan Zhuo
On Thu, 2 Sep 2021 15:39:44 +0800, Jason Wang wrote: > > 在 2021/8/27 下午2:58, Xuan Zhuo 写道: > > On Fri, 27 Aug 2021 11:45:55 +0800, Jason Wang wrote: > >> 在 2021/8/27 上午11:22, Xuan Zhuo 写道: > >>> On Thu, 26 Aug 2021 12:22:25 +0800, Jason Wang > >>> w

Re: [virtio-dev] [PATCH v2] virtio-net: support device stats

2021-08-27 Thread Xuan Zhuo
On Fri, 27 Aug 2021 11:45:55 +0800, Jason Wang wrote: > > 在 2021/8/27 上午11:22, Xuan Zhuo 写道: > > On Thu, 26 Aug 2021 12:22:25 +0800, Jason Wang wrote: > >> 在 2021/8/23 下午4:27, Xuan Zhuo 写道: > >>> This patch allows the driver to obtain some statistics from the de

Re: [virtio-dev] [PATCH] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-08-26 Thread Xuan Zhuo
On Fri, 27 Aug 2021 11:41:11 +0800, Jason Wang wrote: > > 在 2021/8/27 上午11:18, Xuan Zhuo 写道: > > On Thu, 26 Aug 2021 12:32:34 +0800, Jason Wang wrote: > >> 在 2021/8/23 下午4:28, Xuan Zhuo 写道: > >>> cc jasow...@redhat.com > >>> > >>> On

Re: [virtio-dev] [PATCH v2] virtio-net: support device stats

2021-08-26 Thread Xuan Zhuo
On Thu, 26 Aug 2021 12:22:25 +0800, Jason Wang wrote: > > 在 2021/8/23 下午4:27, Xuan Zhuo 写道: > > This patch allows the driver to obtain some statistics from the device. > > > > In the back-end implementation, we can count a lot of such information, > > which can be

Re: [virtio-dev] [PATCH] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-08-26 Thread Xuan Zhuo
On Thu, 26 Aug 2021 12:32:34 +0800, Jason Wang wrote: > > 在 2021/8/23 下午4:28, Xuan Zhuo 写道: > > cc jasow...@redhat.com > > > > On Fri, 13 Aug 2021 10:31:05 +0800, Xuan Zhuo > > wrote: > >> This patch allows the driver to reset a queue individually. &

[virtio-dev] [PATCH v2] virtio-net: support device stats

2021-08-23 Thread Xuan Zhuo
-by: Xuan Zhuo --- v2: All keys define by this patch. Not defined by each backend. content.tex | 117 1 file changed, 117 insertions(+) diff --git a/content.tex b/content.tex index 70a9765..b9fd10a 100644 --- a/content.tex +++ b/content.tex

[virtio-dev] Re: [PATCH] virtio-net: support device stats

2021-08-18 Thread Xuan Zhuo
On Wed, 18 Aug 2021 12:41:38 +0800, Jason Wang wrote: > On Tue, Aug 17, 2021 at 11:37 AM Xuan Zhuo wrote: > > > > This patch allows the driver to obtain some statistics from the device, > > such as: > > > > 1. queue_N_rx_drops: Rx packets not passed to the driver

[virtio-dev] [PATCH] virtio-net: support device stats

2021-08-16 Thread Xuan Zhuo
display it to the user through ethtool. There is no fixed keys, all keys are defined by the backend itself. Finally it can be directly displayed to the user. Signed-off-by: Xuan Zhuo --- content.tex | 99 + 1 file changed, 99 insertions

[virtio-dev] [PATCH] virtio: introduce VIRTIO_F_RING_RESET for reset queue

2021-08-12 Thread Xuan Zhuo
VIRTIO_F_RING_RESET is negotiated. Signed-off-by: Xuan Zhuo --- content.tex | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/content.tex b/content.tex index 7cec1c3..70a9765 100644 --- a/content.tex +++ b/content.tex @@ -1001,7 +1001,13 @@ \subsubsection{Common configuration

<    1   2