Re: [PATCH v11 21/40] virtio_ring: packed: introduce virtqueue_resize_packed()

2022-07-03 Thread Jason Wang
在 2022/7/4 10:13, Xuan Zhuo 写道: On Fri, 1 Jul 2022 17:27:48 +0800, Jason Wang wrote: 在 2022/6/29 14:56, Xuan Zhuo 写道: virtio ring packed supports resize. Only after the new vring is successfully allocated based on the new num, we will release the old vring. In any case, an error is returned,

Re: [PATCH v11 08/40] virtio_ring: split: extract the logic of alloc queue

2022-07-03 Thread Jason Wang
在 2022/7/1 16:45, Xuan Zhuo 写道: On Fri, 1 Jul 2022 16:26:25 +0800, Jason Wang wrote: 在 2022/6/29 14:56, Xuan Zhuo 写道: Separate the logic of split to create vring queue. This feature is required for subsequent virtuqueue reset vring. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_rin

Re: [PATCH v11 25/40] virtio: allow to unbreak/break virtqueue individually

2022-07-03 Thread Jason Wang
在 2022/7/1 17:36, Jason Wang 写道: 在 2022/7/1 14:31, Michael S. Tsirkin 写道: On Wed, Jun 29, 2022 at 02:56:41PM +0800, Xuan Zhuo wrote: This patch allows the new introduced __virtqueue_break()/__virtqueue_unbreak() to break/unbreak the virtqueue. Signed-off-by: Xuan Zhuo I wonder how this int

Re: [PATCH v11 39/40] virtio_net: support tx queue resize

2022-07-03 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: This patch implements the resize function of the tx queues. Based on this function, it is possible to modify the ring num of the queue. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 48 1 file changed, 48 in

Re: [PATCH v11 38/40] virtio_net: support rx queue resize

2022-07-03 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: This patch implements the resize function of the rx queues. Based on this function, it is possible to modify the ring num of the queue. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 22 ++ 1 file changed, 22 insertions(+) diff

Re: [PATCH v11 30/40] virtio_pci: support VIRTIO_F_RING_RESET

2022-07-03 Thread Jason Wang
在 2022/6/29 14:56, Xuan Zhuo 写道: This patch implements virtio pci support for QUEUE RESET. Performing reset on a queue is divided into these steps: 1. notify the device to reset the queue 2. recycle the buffer submitted 3. reset the vring (may re-alloc) 4. mmap vring to device, and ena

Re: [PATCH v11 23/40] virtio_pci: move struct virtio_pci_common_cfg to virtio_pci_modern.h

2022-07-03 Thread Xuan Zhuo
On Fri, 1 Jul 2022 17:33:00 +0800, Jason Wang wrote: > > 在 2022/6/29 14:56, Xuan Zhuo 写道: > > In order to facilitate the expansion of virtio_pci_common_cfg in the > > future, move it from uapi to virtio_pci_modern.h. In this way, we can > > freely expand virtio_pci_common_cfg in the future. > > >

Re: [PATCH v11 22/40] virtio_ring: introduce virtqueue_resize()

2022-07-03 Thread Xuan Zhuo
On Fri, 1 Jul 2022 17:31:34 +0800, Jason Wang wrote: > > 在 2022/6/29 14:56, Xuan Zhuo 写道: > > Introduce virtqueue_resize() to implement the resize of vring. > > Based on these, the driver can dynamically adjust the size of the vring. > > For example: ethtool -G. > > > > virtqueue_resize() implemen

Re: [PATCH v11 21/40] virtio_ring: packed: introduce virtqueue_resize_packed()

2022-07-03 Thread Xuan Zhuo
On Fri, 1 Jul 2022 17:27:48 +0800, Jason Wang wrote: > > 在 2022/6/29 14:56, Xuan Zhuo 写道: > > virtio ring packed supports resize. > > > > Only after the new vring is successfully allocated based on the new num, > > we will release the old vring. In any case, an error is returned, > > indicating th

Re: [PATCH v11 09/40] virtio_ring: split: extract the logic of alloc state and extra

2022-07-03 Thread Xuan Zhuo
On Fri, 1 Jul 2022 16:55:05 +0800, Jason Wang wrote: > > 在 2022/6/29 14:56, Xuan Zhuo 写道: > > Separate the logic of creating desc_state, desc_extra, and subsequent > > patches will call it independently. > > > > Since only the structure vring is passed into __vring_new_virtqueue(), > > when creati