On Wed, 8 Mar 2023 14:59:36 +0800, Yunsheng Lin wrote:
> On 2023/3/8 10:49, Xuan Zhuo wrote:
> > If the queue of xdp xmit is not an independent queue, then when the xdp
> > xmit used all the desc, the xmit from the __dev_queue_xmit() may encounter
> > the following error.
> >
> > net ens4: Unexpec
On Tue, Mar 07, 2023 at 05:57:05AM +0200, Feng Liu wrote:
> @@ -2827,8 +2827,7 @@ bool virtqueue_is_broken(struct virtqueue *_vq)
> }
> EXPORT_SYMBOL_GPL(virtqueue_is_broken);
>
> -/*
> - * This should prevent the device from being used, allowing drivers to
> +/ This should prevent the device f
On Wed, Mar 08, 2023 at 01:52:43PM +0800, Jason Wang wrote:
> On Tue, Mar 7, 2023 at 11:57 AM Feng Liu wrote:
> >
> > is_power_of_2() already performs the zero check. Hence avoid duplicate
> > check. While at it, move the query of size check also adjacent to where
> > its used for the disabled vq.
On Wed, Mar 08, 2023 at 10:49:33AM +0800, Xuan Zhuo wrote:
> The purpose of this is to facilitate the subsequent addition of new
> functions without introducing a separate declaration.
>
> Signed-off-by: Xuan Zhuo
Acked-by: Michael S. Tsirkin
this one isn't for stable naturally, stable can use
The subsequent reset function will reuse these logic.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 58
1 file changed, 39 insertions(+), 19 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index a705485fea4
Update the document of virtqueue_add_* series API, allowing the callers to
use sg->dma_address to pass the dma address to Virtio Core.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 16
1 file changed, 16 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/dr
virtio core only supports virtual addresses, dma is completed in virtio
core.
In some scenarios (such as the AF_XDP), the memory is allocated
and DMA is completed in advance, so it is necessary for us to support
passing the DMA address to virtio core.
Drives can use sg->dma_address to pass the ma
Added virtqueue_dma_dev() to get DMA device for virtio. Then the
caller can do dma operation in advance. The purpose is to keep memory
mapped across multiple add/get buf operations.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio.c | 6 ++
drivers/virtio/virtio
Modify the "useless" to a more accurate "unused".
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index f63637c288a0..a705485fea47 10064
virtio core only supports virtual addresses, dma is completed in virtio
core.
In some scenarios (such as the AF_XDP), the memory is allocated
and DMA is completed in advance, so it is necessary for us to support
passing the DMA address to virtio core.
Drives can use sg->dma_address to pass the ma
virtio core only supports virtual addresses, dma is completed in virtio
core.
In some scenarios (such as the AF_XDP), the memory is allocated
and DMA is completed in advance, so it is necessary for us to support
passing the DMA address to virtio core.
Drives can use sg->dma_address to pass the ma
Introduce virtqueue_reset() to release all buffer inside vq.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 33 +
include/linux/virtio.h | 2 ++
2 files changed, 35 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virti
DMA-related logic is separated from the virtqueue_add_split() to
one new function. DMA address will be saved as sg->dma_address, then
virtqueue_add_split() will use it directly. Unmap operation will be
simpler.
The purpose of this is to facilitate subsequent support to receive
dma address mapped b
virtio core only supports virtual addresses, dma is completed in virtio
core.
In some scenarios (such as the AF_XDP), the memory is allocated
and DMA is completed in advance, so it is necessary for us to support
passing the DMA address to virtio core.
Drives can use sg->dma_address to pass the ma
DMA-related logic is separated from the virtqueue_add_packed(). DMA
address will be saved as sg->dma_address, then virtqueue_add_packed()
will use it directly. Unmap operation will be simpler.
The purpose of this is to facilitate subsequent support to receive
dma address mapped by drivers.
Signed
DMA-related logic is separated from the virtqueue_add_indirect_packed().
DMA address will be saved as sg->dma_address, then
virtqueue_add_indirect_packed() will use it directly. Unmap operation
will be simpler.
The purpose of this is to facilitate subsequent support to receive
dma address mapped
XDP socket(AF_XDP) is an excellent bypass kernel network framework. The zero
copy feature of xsk (XDP socket) needs to be supported by the driver. The
performance of zero copy is very good.
ENV: Qemu with vhost.
vhost cpu | Guest APP CPU |Guest Softirq CPU | PPS
---
On Tue, Mar 7, 2023 at 11:57 AM Feng Liu wrote:
>
> Add const to make the read-only pointer parameters clear, similar to
> many existing functions.
>
> Signed-off-by: Feng Liu
> Reviewed-by: Jiri Pirko
> Reviewed-by: Parav Pandit
> Reviewed-by: Gavin Li
> Reviewed-by: Bodong Wang
> ---
> dri
On Tue, Mar 7, 2023 at 11:57 AM Feng Liu wrote:
>
> According to kernel coding style [1], defining inline functions is not
> necessary and beneficial for simple functions. Hence clean up the code
> by removing the inline keyword.
>
> It is verified with GCC 12.2.0, the generated code with/without
On Tue, Mar 7, 2023 at 11:57 AM Feng Liu wrote:
>
> is_power_of_2() already performs the zero check. Hence avoid duplicate
> check. While at it, move the query of size check also adjacent to where
> its used for the disabled vq.
>
> Signed-off-by: Feng Liu
> Reviewed-by: Jiri Pirko
> Reviewed-by
On Wed, Mar 8, 2023 at 10:49 AM Xuan Zhuo wrote:
>
> If the queue of xdp xmit is not an independent queue, then when the xdp
> xmit used all the desc, the xmit from the __dev_queue_xmit() may encounter
> the following error.
>
> net ens4: Unexpected TXQ (0) queue failure: -28
>
> This patch adds a
On Wed, Mar 8, 2023 at 10:49 AM Xuan Zhuo wrote:
>
> Separate the logic of checking whether sq is full. The subsequent patch
> will reuse this func.
>
> Signed-off-by: Xuan Zhuo
> Reviewed-by: Alexander Duyck
> Acked-by: Michael S. Tsirkin
Acked-by: Jason Wang
Thanks
> ---
> drivers/net/vi
On Wed, Mar 8, 2023 at 10:49 AM Xuan Zhuo wrote:
>
> The purpose of this is to facilitate the subsequent addition of new
> functions without introducing a separate declaration.
>
> Signed-off-by: Xuan Zhuo
Not sure such reordering is suitable for -stable.
Thanks
> ---
> drivers/net/virtio_net
On Wed, Mar 8, 2023 at 1:34 AM FUJITA Tomonori wrote:
>
> C versions of virtio-console, virtio-rng, and virtio-net exists. Both
> C and Rust versions in mainline?
>
> Are there guidelines on pushing a Rust driver in mainline?
Although the website is not finished yet, please see
https://rust-for-l
The purpose of this is to facilitate the subsequent addition of new
functions without introducing a separate declaration.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 92
1 file changed, 46 insertions(+), 46 deletions(-)
diff --git a/drivers/n
If the queue of xdp xmit is not an independent queue, then when the xdp
xmit used all the desc, the xmit from the __dev_queue_xmit() may encounter
the following error.
net ens4: Unexpected TXQ (0) queue failure: -28
This patch adds a check whether sq is full in xdp xmit.
Fixes: 56434a01b12e ("vi
If the queue of xdp xmit is not an independent queue, then when the xdp
xmit used all the desc, the xmit from the __dev_queue_xmit() may encounter
the following error.
net ens4: Unexpected TXQ (0) queue failure: -28
This patch adds a check whether sq is full in XDP Xmit.
Thanks.
v1:
1. rena
Separate the logic of checking whether sq is full. The subsequent patch
will reuse this func.
Signed-off-by: Xuan Zhuo
Reviewed-by: Alexander Duyck
Acked-by: Michael S. Tsirkin
---
drivers/net/virtio_net.c | 60
1 file changed, 36 insertions(+), 24 dele
On Tue, Mar 07, 2023 at 08:43:33PM +0100, Peter-Jan Gootzen wrote:
> On 22-02-2023 15:32, Stefan Hajnoczi wrote:
> > On Wed, Feb 08, 2023 at 05:29:25PM +0100, Peter-Jan Gootzen wrote:
> > > On 08/02/2023 11:43, Stefan Hajnoczi wrote:
> > > > On Wed, Feb 08, 2023 at 09:33:33AM +0100, Peter-Jan Gootz
On 2023-03-07 04:14, David Edmondson wrote:
> External email: Use caution opening links or attachments
>
>
> Feng Liu via Virtualization
> writes:
>
>> Add const to make the read-only pointer parameters clear, similar to
>> many existing functions.
>
> In many of the modified functions the loc
On 22-02-2023 15:32, Stefan Hajnoczi wrote:
On Wed, Feb 08, 2023 at 05:29:25PM +0100, Peter-Jan Gootzen wrote:
On 08/02/2023 11:43, Stefan Hajnoczi wrote:
On Wed, Feb 08, 2023 at 09:33:33AM +0100, Peter-Jan Gootzen wrote:
On 07/02/2023 22:57, Vivek Goyal wrote:
On Tue, Feb 07, 2023 at 04:32
On Tue, Mar 7, 2023 at 2:04 PM Daniel Almeida
wrote:
>
> Feel free to point me to the best practices around Rust patch
> submission, as the C stuff like checkpatch etc probably does not apply
> yet. I did take care to run clippy though.
Yeah, some nits below as if you had run a script like that :
On Tue, Mar 07, 2023 at 10:53:41AM +0100, Paolo Abeni wrote:
> Hi,
> On Tue, 2023-03-07 at 09:49 +0800, Xuan Zhuo wrote:
> > On Mon, 6 Mar 2023 12:58:22 -0500, "Michael S. Tsirkin"
> > wrote:
> > > On Mon, Mar 06, 2023 at 12:15:33PM +0800, Xuan Zhuo wrote:
> > > > If the queue of xdp xmit is not
This patch adds virtIO support to the rust crate. This includes the
capability to create a virtIO driver (through the module_virtio_driver
macro and the respective Driver trait) as well as initial virtqueue
support.
A sample virtIO module is included for conveninence.
Signed-off-by: Daniel Almeid
On Tue, 07 Mar 2023 10:53:41 +0100, Paolo Abeni wrote:
> Hi,
> On Tue, 2023-03-07 at 09:49 +0800, Xuan Zhuo wrote:
> > On Mon, 6 Mar 2023 12:58:22 -0500, "Michael S. Tsirkin"
> > wrote:
> > > On Mon, Mar 06, 2023 at 12:15:33PM +0800, Xuan Zhuo wrote:
> > > > If the queue of xdp xmit is not an in
Hi
Am 05.03.23 um 23:10 schrieb Dmitry Osipenko:
Export drm_gem_un/pin() functions. They will be used by VirtIO-GPU driver
for pinning of an active framebuffer, preventing it from swapping out by
memory shrinker.
Please see my reply to [10/11] on why this patch should not be used.
Best regard
Hi
Am 05.03.23 um 23:10 schrieb Dmitry Osipenko:
[...]
*bo_ptr = bo;
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 4c09e313bebc..3f21512ff153 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane
Hi,
On Tue, 2023-03-07 at 09:49 +0800, Xuan Zhuo wrote:
> On Mon, 6 Mar 2023 12:58:22 -0500, "Michael S. Tsirkin"
> wrote:
> > On Mon, Mar 06, 2023 at 12:15:33PM +0800, Xuan Zhuo wrote:
> > > If the queue of xdp xmit is not an independent queue, then when the xdp
> > > xmit used all the desc, the
On Fri, Mar 03, 2023 at 03:38:57PM +0100, Eugenio Perez Martin wrote:
On Thu, Mar 2, 2023 at 12:35 PM Stefano Garzarella wrote:
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.
Signed-off-by: Stef
Feng Liu via Virtualization
writes:
> Add const to make the read-only pointer parameters clear, similar to
> many existing functions.
In many of the modified functions the local variable that is a cast of
the argument could also be const. Is there a reason not to do both at
the same time?
> Sig
Feng Liu via Virtualization
writes:
> According to kernel coding style [1], defining inline functions is not
> necessary and beneficial for simple functions. Hence clean up the code
> by removing the inline keyword.
>
> It is verified with GCC 12.2.0, the generated code with/without inline
> is s
Feng Liu via Virtualization
writes:
> is_power_of_2() already performs the zero check. Hence avoid duplicate
> check. While at it, move the query of size check also adjacent to where
> its used for the disabled vq.
>
> Signed-off-by: Feng Liu
> Reviewed-by: Jiri Pirko
> Reviewed-by: Parav Pandi
On Mon, Mar 6, 2023 at 12:15 PM Xuan Zhuo wrote:
>
> Separate the logic of checking whether sq is full. The subsequent patch
> will reuse this func.
>
> Signed-off-by: Xuan Zhuo
> ---
> drivers/net/virtio_net.c | 59
> 1 file changed, 35 insertions(+), 24
43 matches
Mail list logo