ue
> 3. truetrue false
>
> Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
Thanks
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> In the functions vring_unmap_extra_packed and vring_unmap_desc_packed,
> multiple checks are made whether unmap is performed and whether it is
> INDIRECT.
>
> These two functions are usually called in a loop, and we should put the
> check outsid
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> As discussed:
> http://lore.kernel.org/all/CACGkMEug-=C+VQhkMYSgUKMC==04m7-uem_yc21bggkkzh8...@mail.gmail.com
>
> When the vq is premapped mode, the driver manages the dma
> info is a good way.
>
> So this commit make the virtio core not to stor
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> In the functions vring_unmap_one_split and
> vring_unmap_one_split_indirect,
> multiple checks are made whether unmap is performed and whether it is
> INDIRECT.
>
> These two functions are usually called in a loop, and we should put the
> check
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> This commit structure the indirect desc table.
> Then we can get the desc num directly when doing unmap.
>
> And save the dma info to the struct, then the indirect
> will not use the dma fields of the desc_extra. The subsequent
> commits will ma
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> Just like find_vqs(), it is time to refactor the
> vring_new_virtqueue(). We pass the similar struct to
> vring_new_virtqueue.
>
Well, the vring_create_virtqueue() is converted with a structure.
We need to be consistent. And it seems better to
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> This commit structure the indirect desc table.
> Then we can get the desc num directly when doing unmap.
>
> And save the dma info to the struct, then the indirect
> will not use the dma fields of the desc_extra. The subsequent
> commits will ma
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> Now, we pass multi parameters to find_vqs. These parameters
> may work for transport or work for vring.
>
> And find_vqs has multi implements in many places:
>
> But every time,
> arch/um/drivers/virtio_uml.c
> drivers/platform/mellanox/mlxbf-
On Tue, Jan 30, 2024 at 7:43 PM Xuan Zhuo wrote:
>
> If the xsk is enabling, the xsk tx will share the send queue.
> But the xsk requires that the send queue use the premapped mode.
> So the send queue must support premapped mode.
>
> Signed-off-by: Xuan Zhuo
> ---
> drivers/net/virtio_net.c | 1
On Tue, Jan 30, 2024 at 7:43 PM Xuan Zhuo wrote:
>
> Export the premapped to drivers, then drivers can check
> the vq premapped mode after the find_vqs().
This looks odd, it's the charge of the driver to set premapped, so it
should know it?
Thanks
On Wed, Jan 31, 2024 at 6:01 PM Xuan Zhuo wrote:
>
> On Wed, 31 Jan 2024 17:12:10 +0800, Jason Wang wrote:
> > On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo
> > wrote:
> > >
> > > This commit structure the indirect desc table.
> > > Then we c
On Thu, Feb 1, 2024 at 11:28 AM Xuan Zhuo wrote:
>
> On Wed, 31 Jan 2024 17:12:47 +0800, Jason Wang wrote:
> > On Tue, Jan 30, 2024 at 7:43 PM Xuan Zhuo
> > wrote:
> > >
> > > If the xsk is enabling, the xsk tx will share the send queue.
> > > But
On Wed, Jan 31, 2024 at 5:43 PM Michael S. Tsirkin wrote:
>
> On Wed, Jan 31, 2024 at 05:12:22PM +0800, Jason Wang wrote:
> > I post a patch to store flags unconditionally at:
> >
> > https://lore.kernel.org/all/20220224122655-mutt-send-email-...@kernel.org/
>
> wha
On Thu, Feb 1, 2024 at 2:05 PM Xuan Zhuo wrote:
>
> On Wed, 31 Jan 2024 17:12:29 +0800, Jason Wang wrote:
> > On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo
> > wrote:
> > >
> > > As discussed:
> > > http://lore.kernel.org/all/CACGkMEug-=C+VQhkMYSg
On Thu, Feb 1, 2024 at 2:01 PM Xuan Zhuo wrote:
>
> On Thu, 1 Feb 2024 13:36:46 +0800, Jason Wang wrote:
> > On Thu, Feb 1, 2024 at 11:28 AM Xuan Zhuo
> > wrote:
> > >
> > > On Wed, 31 Jan 2024 17:12:47 +0800, Jason Wang
> > > wrote:
>
On Wed, Mar 6, 2024 at 6:01 PM Xuan Zhuo wrote:
>
> On Thu, 29 Feb 2024 04:34:20 -0500, "Michael S. Tsirkin"
> wrote:
> > On Thu, Feb 29, 2024 at 05:02:37PM +0800, Xuan Zhuo wrote:
> > > On Thu, 29 Feb 2024 03:21:14 -0500, "Michael S. Tsirkin"
> > > wrote:
> > > > On Thu, Feb 29, 2024 at 03:20
On Thu, Mar 7, 2024 at 4:15 PM Xuan Zhuo wrote:
>
> On Thu, 7 Mar 2024 13:28:27 +0800, Jason Wang wrote:
> > On Wed, Mar 6, 2024 at 6:01 PM Xuan Zhuo wrote:
> > >
> > > On Thu, 29 Feb 2024 04:34:20 -0500, "Michael S. Tsirkin"
> > > wrote:
>
On Tue, Mar 12, 2024 at 10:10 AM Xuan Zhuo wrote:
>
> Now, we pass multi parameters to find_vqs. These parameters
> may work for transport or work for vring.
>
> And find_vqs has multi implements in many places:
>
> arch/um/drivers/virtio_uml.c
> drivers/platform/mellanox/mlxbf-tmfifo.c
> drive
On Thu, Mar 14, 2024 at 2:00 PM Xuan Zhuo wrote:
>
> On Thu, 14 Mar 2024 11:12:24 +0800, Jason Wang wrote:
> > On Tue, Mar 12, 2024 at 10:10 AM Xuan Zhuo
> > wrote:
> > >
> > > Now, we pass multi parameters to find_vqs. These parameters
> >
On Fri, Mar 15, 2024 at 3:26 PM Xuan Zhuo wrote:
>
> On Fri, 15 Mar 2024 11:51:48 +0800, Jason Wang wrote:
> > On Thu, Mar 14, 2024 at 2:00 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 14 Mar 2024 11:12:24 +0800, Jason Wang
> > > wrote:
>
On Tue, Mar 19, 2024 at 2:58 PM Michael S. Tsirkin wrote:
>
> On Mon, Mar 18, 2024 at 01:59:52PM +0800, Xuan Zhuo wrote:
> > On Mon, 18 Mar 2024 12:18:23 +0800, Jason Wang wrote:
> > > On Fri, Mar 15, 2024 at 3:26 PM Xuan Zhuo
> > > wrote:
> > > >
On Wed, Mar 20, 2024 at 5:22 PM Jason Wang wrote:
>
> On Tue, Mar 19, 2024 at 2:58 PM Michael S. Tsirkin wrote:
> >
> > On Mon, Mar 18, 2024 at 01:59:52PM +0800, Xuan Zhuo wrote:
> > > On Mon, 18 Mar 2024 12:18:23 +0800, Jason Wang
> > > wrote:
> > >
On Wed, Mar 20, 2024 at 6:07 PM Xuan Zhuo wrote:
>
> On Wed, 20 Mar 2024 17:39:29 +0800, Xuan Zhuo
> wrote:
> > On Wed, 20 Mar 2024 17:22:50 +0800, Jason Wang wrote:
> > > On Tue, Mar 19, 2024 at 2:58 PM Michael S. Tsirkin
> > > wrote:
> > > >
>
On Wed, Mar 20, 2024 at 5:41 PM Xuan Zhuo wrote:
>
> On Wed, 20 Mar 2024 17:22:50 +0800, Jason Wang wrote:
> > On Tue, Mar 19, 2024 at 2:58 PM Michael S. Tsirkin wrote:
> > >
> > > On Mon, Mar 18, 2024 at 01:59:52PM +0800, Xuan Zhuo wrote:
> > > > On M
On Mon, Mar 25, 2024 at 5:44 PM Cornelia Huck wrote:
>
> On Mon, Mar 25 2024, Xuan Zhuo wrote:
>
> > On Fri, 22 Mar 2024 22:02:27 +0100, David Hildenbrand
> > wrote:
> >> On 22.03.24 20:16, Daniel Verkamp wrote:
> >> > On Thu, Mar 21, 2024 at 3:16 AM Xuan Zhuo
> >> > wrote:
> >> >>
> >> >> Cu
part of the codebase. In an upcoming commit, we plan to
> eliminate this dependency by removing the function entirely. Therefore,
> with this change, we are ensuring that the virtio_balloon no longer
> depends on the aforementioned function.
>
> Signed-off-by: Xuan Zhuo
With the above tweak.
Acked-by: Jason Wang
Thanks
On Tue, Mar 26, 2024 at 12:11 PM Jason Wang wrote:
>
> On Mon, Mar 25, 2024 at 5:44 PM Cornelia Huck wrote:
> >
> > On Mon, Mar 25 2024, Xuan Zhuo wrote:
> >
> > > On Fri, 22 Mar 2024 22:02:27 +0100, David Hildenbrand
> > > wrote:
> > >>
On Mon, Mar 25, 2024 at 5:04 PM Xuan Zhuo wrote:
>
> commit 6457f126c888 ("virtio: support reserved vqs") introduced this
> support. Multiqueue virtio-net use 2N as ctrl vq finally, so the logic
> doesn't apply. And not one uses this.
>
> On the other side, that makes some trouble for us to refact
d int nvqs,
> struct cpumask *masks;
> struct vdpa_callback cb;
> bool has_affinity = desc && ops->set_vq_affinity;
> - int i, err, queue_idx = 0;
> + int i, err;
>
> if (has_affinity) {
> masks = create_af
f-by: Xuan Zhuo
> Acked-by: Johannes Berg
> Reviewed-by: Ilpo Järvinen
Acked-by: Jason Wang
Thanks
On Wed, Mar 27, 2024 at 5:58 PM Xuan Zhuo wrote:
>
> Now, we pass multi parameters to vring_new_virtqueue. These parameters
> may from transport or from driver.
>
> vring_new_virtqueue is called by many places.
> Every time, we try to add a new parameter, that is difficult.
>
> If parameters from
Signed-off-by: Xuan Zhuo
> Reviewed-by: Ilpo Järvinen
> ---
Acked-by: Jason Wang
Thanks
ccw);
> + vqs[i] = virtio_ccw_setup_vq(vdev, i, ccw, cfg);
> if (IS_ERR(vqs[i])) {
> ret = PTR_ERR(vqs[i]);
> vqs[i] = NULL;
> diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
> index 82ee4a288728..7f0fdc3f51cb 100644
> --- a/drivers/virtio/virtio_mmio.c
> +++ b/drivers/virtio/virtio_mmio.c
> @@ -370,8 +370,7 @@ static void vm_synchronize_cbs(struct virtio_device *vdev)
> }
>
> static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned
> int index,
> - void (*callback)(struct virtqueue *vq),
> - const char *name, bool ctx)
> +struct virtio_vq_config *cfg)
> {
> struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
> bool (*notify)(struct virtqueue *vq);
> @@ -386,9 +385,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device
> *vdev, unsigned int in
> else
> notify = vm_notify;
>
> - if (!name)
> - return NULL;
Nit: This seems to belong to patch 2.
Acked-by: Jason Wang
Thanks
y: Xuan Zhuo
> Reviewed-by: Ilpo Järvinen
Acked-by: Jason Wang
Thanks
lement functionality
> > to allow vq indexes to be discontinuous. So the current behavior of the
> > virtio-balloon device is different for the spec. But this commit has no
> > functional changes.
> >
> > Signed-off-by: Xuan Zhuo
> > Acked-by: David Hildenbrand
ult is that driver is out of spec.
>
> Implement what the API was supposed to do
> in the 1st place. Compatibility with buggy hypervisors
> is handled inside virtio-balloon, which is the only driver
> making use of this facility, so far.
>
> Signed-off-by: Michael S. Tsirkin
Acked-by: Jason Wang
Thanks
在 2022/3/8 下午3:01, Xuan Zhuo 写道:
On Mon, 7 Mar 2022 17:17:51 -0500, "Michael S. Tsirkin" wrote:
On Thu, Feb 24, 2022 at 04:10:42PM +0800, Xuan Zhuo wrote:
Separate the logic of packed to create vring queue.
For the convenience of passing parameters, add a structure
vring_packed.
This featur
在 2022/3/8 下午8:34, Xuan Zhuo 写道:
The virtio spec already supports the virtio queue reset function. This patch set
is to add this function to the kernel. The relevant virtio spec information is
here:
https://github.com/oasis-tcs/virtio-spec/issues/124
Also regarding MMIO support for queue
submitted
this patch first.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
include/uapi/linux/virtio_pci.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h
index 3a86f36d7e3d..22bec9bd0dfc 100644
--- a/include/uapi
在 2022/3/8 下午8:34, Xuan Zhuo 写道:
Added VIRTIO_F_RING_RESET, it came from here
https://github.com/oasis-tcs/virtio-spec/issues/124
Nit: it's better to explain VIRTIO_F_RING_RESET a little bit here.
Other than this.
Acked-by: Jason Wang
Signed-off-by: Xuan Zhuo
---
include/uapi/
based on this.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_mmio.c | 2 ++
drivers/virtio/virtio_pci_legacy.c | 2 ++
drivers/virtio/virtio_pci_modern.c | 2 ++
drivers/virtio/virtio_ring.c | 14 ++
include/linux/virtio.h
在 2022/3/8 下午8:34, Xuan Zhuo 写道:
Separate the logic of split to create vring queue.
For the convenience of passing parameters, add a structure
vring_split.
This feature is required for subsequent virtuqueue reset vring.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 74 +++
在 2022/3/8 下午8:34, Xuan Zhuo 写道:
Split the logic of split assignment vq into three parts.
1. The assignment passed from the function parameter
2. The part that attaches vring to vq. -- __vring_virtqueue_attach_split()
3. The part that initializes vq to a fixed value --
__vring_virtqueue_ini
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
Introduce vring_free() to free the vring of vq.
Prevent double free by setting vq->reset.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 25 -
include/linux/virtio.h | 8
2 files changed, 28 insertions(+
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
virtio ring supports reset.
Queue reset is divided into several stages.
1. notify device queue reset
2. vring release
3. attach new vring
4. notify device queue re-enable
After the first step is completed, the vring reset operation can be
performed. If the new
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
Performing reset on a queue is divided into four steps:
1. reset_vq() - notify the device to reset the queue
2. virtqueue_detach_unused_buf() - recycle the buffer submitted
3. virtqueue_reset_vring()- reset the vring (may re-al
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
Add helper for virtio queue reset.
* virtio_reset_vq(): reset a queue individually
* virtio_enable_resetq(): enable a reset queue
Signed-off-by: Xuan Zhuo
---
include/linux/virtio_config.h | 40 +++
1 file changed, 40 inserti
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
This patch implements virtio pci support for QUEUE RESET.
Performing reset on a queue is divided into these steps:
1. virtio_reset_vq() - notify the device to reset the queue
2. virtqueue_detach_unused_buf() - recycle the buffer submitted
3.
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
find_vqs() adds a new parameter sizes to specify the size of each vq
vring.
0 means use the maximum size supported by the backend.
In the split scenario, the meaning of size is the largest size, because
it may be limited by memory, the virtio core will try a sm
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
Introduce helper virtio_find_vqs_ctx_size() to call find_vqs and specify
the maximum size of each vq ring.
Signed-off-by: Xuan Zhuo
---
include/linux/virtio_config.h | 12
1 file changed, 12 insertions(+)
diff --git a/include/linux/virtio_confi
: Jason Wang
---
drivers/net/virtio_net.c | 53 +++-
1 file changed, 31 insertions(+), 22 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 59b1ea82f5f0..409a8e180918 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
This patch implements the reset function of the rx, tx queues.
Based on this function, it is possible to modify the ring num of the
queue. And quickly recycle the buffer in the queue.
In the process of the queue disable, in theory, as long as virtio
supports qu
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
Use virtio_find_vqs_ctx_size() to specify the maximum ring size of tx,
rx at the same time.
| rx/tx ring size
---
speed == UNKNOWN or < 10G| 1024
speed < 40G | 4096
speed >= 40G
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
Support set_ringparam based on virtio queue reset.
The rx,tx_pending required to be passed must be power of 2.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 47
1 file changed, 47 insertions(+)
diff --git
在 2022/3/9 下午5:32, Xuan Zhuo 写道:
On Wed, 9 Mar 2022 16:54:10 +0800, Jason Wang wrote:
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
This patch implements virtio pci support for QUEUE RESET.
Performing reset on a queue is divided into these steps:
1. virtio_reset_vq() - notify the device
在 2022/3/10 下午12:46, Xuan Zhuo 写道:
On Wed, 9 Mar 2022 15:55:44 +0800, Jason Wang wrote:
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
virtio ring supports reset.
Queue reset is divided into several stages.
1. notify device queue reset
2. vring release
3. attach new vring
4. notify device queue re
在 2022/3/10 下午4:20, Xuan Zhuo 写道:
On Wed, 9 Mar 2022 16:54:10 +0800, Jason Wang wrote:
在 2022/3/8 下午8:35, Xuan Zhuo 写道:
This patch implements virtio pci support for QUEUE RESET.
Performing reset on a queue is divided into these steps:
1. virtio_reset_vq() - notify the
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Record the maximum queue num supported by the device.
virtio-net can display the maximum (supported by hardware) ring size in
ethtool -g eth0.
When the subsequent patch implements vring reset, it can judge whether
the ring size passed by the driver is legal ba
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Performing reset on a queue is divided into four steps:
1. transport: notify the device to reset the queue
2. vring: recycle the buffer submitted
3. vring: reset/resize the vring (may re-alloc)
4. transport: mmap vring to device, and enable the
On Tue, Apr 12, 2022 at 10:47 AM Jason Wang wrote:
>
>
> 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > Performing reset on a queue is divided into four steps:
> >
> > 1. transport: notify the device to reset the queue
> > 2. vring: recycle the buffer submitted
>
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Added documentation for virtqueue_detach_unused_buf, allowing it to be
called on queue reset.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
The parameter vq of vring_alloc_desc_extra() is useless. This patch
removes this parameter.
Subsequent patches will call this function to avoid passing useless
arguments.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Introduce vring_free() to free the vring of vq.
Subsequent patches will use vring_free() alone.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 18 +-
1 file changed, 13 insertions(+), 5 deletions
在 2022/4/6 上午11:43, 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_ring.c | 53
1 file changed, 36 insertions(+), 17 del
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Separate the logic of creating desc_state, desc_extra, and subsequent
patches will call it independently.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 53 ++--
1 file changed, 38 insertions(+), 15 deletions(-)
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Separate the logic of attach vring, subsequent patches will call it
separately.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 20 ++--
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Separate the logic of initializing vq, and subsequent patches will call
it separately.
The feature of this part is that it does not depend on the information
passed by the upper layer and can be called repeatedly.
Signed-off-by: Xuan Zhuo
---
drivers/virtio
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Introduce a function to initialize vq without allocating new ring,
desc_state, desc_extra.
Subsequent patches will call this function after reset vq to
reinitialize vq.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
virtio ring split 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 that the vring still points to the old vring.
In the case of an error, the
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Separate the logic of packed to create vring queue.
For the convenience of passing parameters, add a structure
vring_packed.
This feature is required for subsequent virtuqueue reset vring.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 70
在 2022/4/6 上午11:43, 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() implements resize based on the vq reset function. In
case of failure to allocate
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Add queue_reset in virtio_pci_common_cfg, and add related operation
functions.
For not breaks uABI, add a new struct virtio_pci_common_cfg_reset.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_pci_modern_dev.c | 36 ++
include/l
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Introduce vp_active_vq() to configure vring to backend after vq attach
vring. And configure vq vector if necessary.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_pci_modern.c | 46 ++
1 file changed, 28 insertions(+), 18 del
在 2022/4/6 上午11:43, 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 en
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
find_vqs() adds a new parameter sizes to specify the size of each vq
vring.
0 means use the maximum size supported by the backend.
Does this mean driver still need to prepare a array of 0 or it can
simply pass NULL to find_vqs()?
Thanks
In the split s
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Virtio PCI supports new parameter sizes of find_vqs().
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_pci_common.c | 18 ++
drivers/virtio/virtio_pci_common.h | 1 +
drivers/virtio/virtio_pci_legacy.c | 6
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Virtio MMIO support the new parameter sizes of find_vqs().
Signed-off-by: Xuan Zhuo
---
Acked-by: Jason Wang
drivers/virtio/virtio_mmio.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_mmio.c b
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Introduce helper virtio_find_vqs_ctx_size() to call find_vqs and specify
the maximum size of each vq ring.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
include/linux/virtio_config.h | 12
1 file changed, 12 insertions(+)
diff
>= 40G | 8192
Call virtnet_update_settings() once before calling init_vqs() to update
speed.
Signed-off-by: Xuan Zhuo
---
Acked-by: Jason Wang
drivers/net/virtio_net.c | 42
1 file changed, 38 insertions(+), 4 deletions(-)
diff --git
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Use virtqueue_get_vring_max_size() in virtnet_get_ringparam() to set
tx,rx_max_pending.
Signed-off-by: Xuan Zhuo
---
Acked-by: Jason Wang
drivers/net/virtio_net.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
This patch implements the resize function of the rx, tx queues.
Based on this function, it is possible to modify the ring num of the
queue.
There may be an exception during the resize process, the resize may
fail, or the vq can no longer be used. Either way, we
在 2022/4/6 上午11:43, Xuan Zhuo 写道:
Support set_ringparam based on virtio queue reset.
Users can use ethtool -G eth0 to modify the ring size of
virtio-net.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
(One thing that I see is that, when resize fails, the param reported via
On Wed, Apr 13, 2022 at 10:30 AM Xuan Zhuo wrote:
>
> On Tue, 12 Apr 2022 10:41:03 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > Record the maximum queue num supported by the device.
> > >
> > > virtio-net can display the
On Wed, Apr 13, 2022 at 11:23 AM Xuan Zhuo wrote:
>
> On Tue, 12 Apr 2022 15:07:58 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > This patch implements virtio pci support for QUEUE RESET.
> > >
> > > Performing
On Wed, Apr 13, 2022 at 11:26 AM Xuan Zhuo wrote:
>
> On Tue, 12 Apr 2022 14:28:24 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > Separate the logic of packed to create vring queue.
> > >
> > > For the conve
On Wed, Apr 13, 2022 at 4:47 PM Xuan Zhuo wrote:
>
> On Wed, 13 Apr 2022 16:00:18 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > This patch implements the resize function of the rx, tx queues.
> > > Based on this function, it is po
On Thu, Apr 14, 2022 at 2:25 PM Xuan Zhuo wrote:
>
> On Tue, 12 Apr 2022 14:58:19 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > Introduce vp_active_vq() to configure vring to backend after vq attach
> > > vring. And configure vq vec
On Fri, Apr 15, 2022 at 10:23 AM Xuan Zhuo wrote:
>
> On Thu, 14 Apr 2022 17:30:02 +0800, Jason Wang wrote:
> > On Wed, Apr 13, 2022 at 4:47 PM Xuan Zhuo
> > wrote:
> > >
> > > On Wed, 13 Apr 2022 16:00:18 +0800, Jason Wang
> > > wrote:
>
On Mon, Apr 18, 2022 at 11:24 AM Xuan Zhuo wrote:
>
> On Wed, 13 Apr 2022 16:00:18 +0800, Jason Wang wrote:
> >
> > 在 2022/4/6 上午11:43, Xuan Zhuo 写道:
> > > This patch implements the resize function of the rx, tx queues.
> > > Based on this function, it is po
在 2022/4/15 17:17, Xuan Zhuo 写道:
On Fri, 15 Apr 2022 13:53:54 +0800, Jason Wang wrote:
On Fri, Apr 15, 2022 at 10:23 AM Xuan Zhuo wrote:
On Thu, 14 Apr 2022 17:30:02 +0800, Jason Wang wrote:
On Wed, Apr 13, 2022 at 4:47 PM Xuan Zhuo wrote:
On Wed, 13 Apr 2022 16:00:18 +0800, Jason Wang
On Fri, Jun 10, 2022 at 11:12 PM Vincent Whitchurch
wrote:
>
> Call virtio_device_ready() to make this driver work after commit
> b4ec69d7e09 ("virtio: harden vring IRQ"), since the driver uses the
> virtqueues in the probe function. (The virtio core sets the device
> ready when probe returns.)
>
queue_notify_data, I submitted
> > this patch first.
> >
> > Signed-off-by: Xuan Zhuo
> > Acked-by: Jason Wang
> > ---
> > include/uapi/linux/virtio_pci.h | 7 +++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/include/uapi/linux/virtio_p
On Mon, Jun 27, 2022 at 2:39 PM Michael S. Tsirkin wrote:
>
> On Mon, Jun 27, 2022 at 10:30:42AM +0800, Jason Wang wrote:
> > On Fri, Jun 24, 2022 at 2:59 PM Michael S. Tsirkin wrote:
> > >
> > > On Fri, Jun 24, 2022 at 10:56:05AM +0800, Xuan Zhuo wrote:
> >
On Mon, Jun 27, 2022 at 3:58 PM Michael S. Tsirkin wrote:
>
> On Mon, Jun 27, 2022 at 03:45:30PM +0800, Jason Wang wrote:
> > On Mon, Jun 27, 2022 at 2:39 PM Michael S. Tsirkin wrote:
> > >
> > > On Mon, Jun 27, 2022 at 10:30:42AM +0800, Jason Wang wrote:
> >
On Mon, Jun 27, 2022 at 7:53 PM Michael S. Tsirkin wrote:
>
> On Mon, Jun 27, 2022 at 04:14:20PM +0800, Jason Wang wrote:
> > On Mon, Jun 27, 2022 at 3:58 PM Michael S. Tsirkin wrote:
> > >
> > > On Mon, Jun 27, 2022 at 03:45:30PM +0800, Jason Wang wrote:
> >
On Tue, Jun 28, 2022 at 1:46 PM Michael S. Tsirkin wrote:
>
> On Tue, Jun 28, 2022 at 11:50:37AM +0800, Jason Wang wrote:
> > On Mon, Jun 27, 2022 at 7:53 PM Michael S. Tsirkin wrote:
> > >
> > > On Mon, Jun 27, 2022 at 04:14:20PM +0800, Jason Wang wrote:
> >
On Tue, Jun 28, 2022 at 2:10 PM Michael S. Tsirkin wrote:
>
> On Tue, Jun 28, 2022 at 02:07:28PM +0800, Jason Wang wrote:
> > On Tue, Jun 28, 2022 at 1:46 PM Michael S. Tsirkin wrote:
> > >
> > > On Tue, Jun 28, 2022 at 11:50:37AM +0800, Jason Wang wrote:
> >
On Wed, Jun 29, 2022 at 2:57 PM Xuan Zhuo wrote:
>
> Record the maximum queue num supported by the device.
>
> virtio-net can display the maximum (supported by hardware) ring size in
> ethtool -g eth0.
>
> When the subsequent patch implements vring reset, it can judge whether
> the ring size passe
On Wed, Jun 29, 2022 at 2:57 PM Xuan Zhuo wrote:
>
> reset can be divided into the following four steps (example):
> 1. transport: notify the device to reset the queue
> 2. vring: recycle the buffer submitted
> 3. vring: reset/resize the vring (may re-alloc)
> 4. transport: mmap vring
by: Xuan Zhuo
Acked-by: Jason Wang
> ---
> drivers/virtio/virtio_ring.c | 116 ++-
> 1 file changed, 60 insertions(+), 56 deletions(-)
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index bb4e8ae09c9b..2806e033a651 1
1 - 100 of 156 matches
Mail list logo