This patch implement the logic of bind/unbind xsk pool to sq and rq.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 53
1 file changed, 53 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
ff-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 179 ---
1 file changed, 168 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d5b8567f77d0..57642bd83b7b 100644
--- a/drivers/net/virtio_
Since xsk's TX queue is consumed by TX NAPI, if sq is bound to xsk, then
we must stop tx napi from being disabled.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_ne
Now, we support AF_XDP(xsk). Add NETDEV_XDP_ACT_XSK_ZEROCOPY to
xdp_features.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 7db586770249
virtio-net rq submits premapped per-buffer by setting sg page to NULL;
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
If send queue sent some packets, we update the tx timeout
record to prevent the tx timeout.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index
To make the code readable, introduce vring_need_unmap_buffer() to
replace do_unmap.
use_dma_api premapped -> vring_need_unmap_buffer()
1. false falsefalse
2. truefalsetrue
3. truetrue false
Signed-off-by: Xuan Zhuo
Acked-by: Jason W
,
gfp_t gfp);
int virtqueue_add_outbuf_premapped(struct virtqueue *vq,
struct scatterlist *sg, unsigned int num,
void *data,
gfp_t gfp);
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
Suggested-by: Jason Wang
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 101 ++-
1 file changed, 53 insertions(+), 48 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index cfe70c40f630..fe
DP tx
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 90 +++-
1 file changed, 51 insertions(+), 39 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 183ad5e6bef0..539a43777f86 100644
--- a/driver
Tx-bps: 2837285936
But AF_XDP consumes more CPU for tx and rx napi(100% and 86%).
Please review.
Thanks.
Xuan Zhuo (13):
virtio_ring: introduce vring_need_unmap_buffer
virtio_ring: split: record extras for indirect buffers
virtio_ring: packed: recor
Now, this API is useless. remove it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 13 --
drivers/virtio/virtio_ring.c | 48
include/linux/virtio.h | 2 --
3 files changed, 63 deletions(-)
diff --git a
The subsequent commit needs to know whether every indirect buffer is
premapped or not. So we need to introduce an extra struct for every
indirect buffer to record this info.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 112
The subsequent commit needs to know whether every indirect buffer is
premapped or not. So we need to introduce an extra struct for every
indirect buffer to record this info.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 60
On Thu, 7 Nov 2024 16:54:54 +0800, Xuan Zhuo
wrote:
> The subsequent commit needs to know whether every indirect buffer is
> premapped or not. So we need to introduce an extra struct for every
> indirect buffer to record this info.
>
> Signed-off-by: Xuan Zhuo
Hi, Jason
Th
Suggested-by: Jason Wang
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 101 ++-
1 file changed, 53 insertions(+), 48 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index cfe70c40f630..fe
Now, this API is useless. remove it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 13 --
drivers/virtio/virtio_ring.c | 48
include/linux/virtio.h | 2 --
3 files changed, 63 deletions(-)
diff --git a
The subsequent commit needs to know whether every indirect buffer is
premapped or not. So we need to introduce an extra struct for every
indirect buffer to record this info.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 60 +---
1 file changed, 36
consumes more CPU for tx and rx napi(100% and 86%).
Please review.
Thanks.
Xuan Zhuo (13):
virtio_ring: introduce vring_need_unmap_buffer
virtio_ring: split: record extras for indirect buffers
virtio_ring: packed: record extras for indirect buffers
virtio_ring: perform premapped op
Now, we support AF_XDP(xsk). Add NETDEV_XDP_ACT_XSK_ZEROCOPY to
xdp_features.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 7cd6f1d74710
If send queue sent some packets, we update the tx timeout
record to prevent the tx timeout.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index
ff-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 179 ---
1 file changed, 168 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 3fc8e71cfba9..67d33cc913cc 100644
--- a/drivers/net/virtio_
Since xsk's TX queue is consumed by TX NAPI, if sq is bound to xsk, then
we must stop tx napi from being disabled.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_ne
This patch implement the logic of bind/unbind xsk pool to sq and rq.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 53
1 file changed, 53 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
virtio-net rq submits premapped per-buffer by setting sg page to NULL;
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 4b27ded8fc16
DP tx
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 90 +++-
1 file changed, 51 insertions(+), 39 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index e4ebf3ffbf02..079d4a213fda 100644
--- a/driver
,
gfp_t gfp);
int virtqueue_add_outbuf_premapped(struct virtqueue *vq,
struct scatterlist *sg, unsigned int num,
void *data,
gfp_t gfp);
Signed-off-by: Xuan Zhuo
---
drivers/virtio
To make the code readable, introduce vring_need_unmap_buffer() to
replace do_unmap.
use_dma_api premapped -> vring_need_unmap_buffer()
1. false falsefalse
2. truefalsetrue
3. truetrue false
Signed-off-by: Xuan Zhuo
Acked-by: Jason W
The subsequent commit needs to know whether every indirect buffer is
premapped or not. So we need to introduce an extra struct for every
indirect buffer to record this info.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 112 ---
1 file changed, 52
On Wed, 6 Nov 2024 02:38:40 -0500, "Michael S. Tsirkin" wrote:
> On Mon, Nov 04, 2024 at 06:46:41PM -0800, Jakub Kicinski wrote:
> > On Tue, 29 Oct 2024 16:46:11 +0800 Xuan Zhuo wrote:
> > > In the last linux version, we disabled this feature to fix the
> > >
On Wed, 6 Nov 2024 09:44:39 +0800, Jason Wang wrote:
> On Tue, Nov 5, 2024 at 2:53 PM Xuan Zhuo wrote:
> >
> > On Tue, 5 Nov 2024 11:42:09 +0800, Jason Wang wrote:
> > > On Wed, Oct 30, 2024 at 4:25 PM Xuan Zhuo
> > > wrote:
> > > >
> > &g
On Wed, 6 Nov 2024 09:56:55 +0800, Jason Wang wrote:
> On Tue, Nov 5, 2024 at 3:23 PM Xuan Zhuo wrote:
> >
> > On Tue, 5 Nov 2024 11:23:50 +0800, Jason Wang wrote:
> > > On Wed, Oct 30, 2024 at 4:25 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Tue, 5 Nov 2024 11:42:09 +0800, Jason Wang wrote:
> On Wed, Oct 30, 2024 at 4:25 PM Xuan Zhuo wrote:
> >
> > The subsequent commit needs to know whether every indirect buffer is
> > premapped or not. So we need to introduce an extra struct for every
> > indirect
On Tue, 5 Nov 2024 11:23:50 +0800, Jason Wang wrote:
> On Wed, Oct 30, 2024 at 4:25 PM Xuan Zhuo wrote:
> >
> > virtio-net rq submits premapped per-buffer by setting sg page to NULL;
> >
> > Signed-off-by: Xuan Zhuo
> > ---
> > drivers/net/virtio_net.c |
Now, we support AF_XDP(xsk). Add NETDEV_XDP_ACT_XSK_ZEROCOPY to
xdp_features.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 091e3ed0cafa
Suggested-by: Jason Wang
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 79 ++--
1 file changed, 40 insertions(+), 39 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 628e01af1c9a..a89295b79e66 100644
---
If send queue sent some packets, we update the tx timeout
record to prevent the tx timeout.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index
Now, this API is useless. remove it.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 48
include/linux/virtio.h | 2 --
2 files changed, 50 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index
ff-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 179 ---
1 file changed, 168 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index a5bad8a5f642..4d00d73d8088 100644
--- a/drivers/net/virtio_
Since xsk's TX queue is consumed by TX NAPI, if sq is bound to xsk, then
we must stop tx napi from being disabled.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_ne
To make the code readable, introduce vring_need_unmap_buffer() to
replace do_unmap.
use_dma_api premapped -> vring_need_unmap_buffer()
1. false falsefalse
2. truefalsetrue
3. truetrue false
Signed-off-by: Xuan Zhuo
Acked-by: Jason W
This patch implement the logic of bind/unbind xsk pool to sq and rq.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 53
1 file changed, 53 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
DP tx
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 90 +++-
1 file changed, 51 insertions(+), 39 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 09757fa408bd..37e86e0a1d8e 100644
--- a/driver
premapped,
gfp_t gfp);
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 48
include/linux/virtio.h | 13 ++
2 files changed, 61 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio
6333227 Tx-bps: 2837285936
But AF_XDP consumes more CPU for tx and rx napi(100% and 86%).
Please review.
Thanks.
Xuan Zhuo (13):
virtio_ring: introduce vring_need_unmap_buffer
virtio_ring: split: re
virtio-net rq submits premapped per-buffer by setting sg page to NULL;
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 792e9eadbfc3
The subsequent commit needs to know whether every indirect buffer is
premapped or not. So we need to introduce an extra struct for every
indirect buffer to record this info.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 60 +---
1 file changed, 36
The subsequent commit needs to know whether every indirect buffer is
premapped or not. So we need to introduce an extra struct for every
indirect buffer to record this info.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 112 ---
1 file changed, 52
Now, the premapped mode can be enabled unconditionally.
So we can remove the failover code for merge and small mode.
The virtnet_rq_xxx() helper would be only used if the mode is using pre
mapping. A check is added to prevent misusing of these API.
Tested-by: Darren Kenny
Signed-off-by: Xuan
Tested-by: Darren Kenny
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 7557808e8c1f..ea433e9650eb 100644
--- a/drivers/net/virtio_net.c
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d50c1940eb23..7557808e8c1f 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net
68004-1-xuanz...@linux.alibaba.com
Thanks.
[1]: http://lore.kernel.org/all/8b20cc28-45a9-4643-8e87-ba164a540...@oracle.com
Xuan Zhuo (4):
virtio-net: fix overflow inside virtnet_rq_alloc
virtio_net: big mode skip the unmap check
virtio_net: enable premapped mode for merge and small by default
quot;Si-Wei Liu"
Tested-by: Darren Kenny
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 792e9eadbfc3..d50c1940eb23 100644
--- a/drivers/net/virtio
On Fri, 18 Oct 2024 15:41:41 +0800, Jason Wang wrote:
> On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote:
> >
> > When the frag just got a page, then may lead to regression on VM.
> > Specially if the sysctl net.core.high_order_alloc_disable value is 1,
> > then the
On Fri, 18 Oct 2024 16:00:07 +0800, Jason Wang wrote:
> On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote:
> >
> > Currently, the virtio core will perform a dma operation for each
> > buffer. Although, the same page may be operated multiple times.
> >
> > In prema
On Fri, 18 Oct 2024 15:48:38 +0800, Jason Wang wrote:
> On Mon, Oct 14, 2024 at 11:12 AM Xuan Zhuo wrote:
> >
> > Now, if we want to judge the rx work mode, we have to use such codes:
> >
> > 1. merge mode: vi->mergeable_rx_bufs
> > 2. big mode: vi->big_
On Thu, 17 Oct 2024 15:42:59 +0200, Paolo Abeni wrote:
>
>
> On 10/14/24 05:12, Xuan Zhuo wrote:
> > When the frag just got a page, then may lead to regression on VM.
> > Specially if the sysctl net.core.high_order_alloc_disable value is 1,
> > then the frag alway
Now, the premapped mode can be enabled unconditionally.
So we can remove the failover code for merge and small mode.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 80 +---
1 file changed, 33 insertions(+), 47 deletions(-)
diff --git a/drivers/net
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index cd90e77881df..8cf24b7b58bd 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -6133,6
lso have this use case:
if (vi->mergeable_rx_bufs)
else if (vi->big_packets)
else
For this case, I think switch-case is the better choice.
So here I introduce vi->mode to record the virtio-net work mode.
That is helpful to judge the work mode and choose the branches.
Si
The virtio-net big mode did not enable premapped mode,
so we did not need to check the unmap. And the subsequent
commit will remove the failover code for failing enable
premapped for merge and small mode. So we need to remove
the checking do_dma code in the big mode path.
Signed-off-by: Xuan Zhuo
, we reduce the buffer len to fix
this problem.
Fixes: f9dac92ba908 ("virtio_ring: enable premapped mode whatever use_dma_api")
Reported-by: "Si-Wei Liu"
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
-ba164a540...@oracle.com
Xuan Zhuo (5):
virtio-net: fix overflow inside virtnet_rq_alloc
virtio_net: introduce vi->mode
virtio_net: big mode skip the unmap check
virtio_net: enable premapped mode for merge and small by default
virtio_net: rx remove premapped failover code
drivers/
On Wed, 9 Oct 2024 05:29:35 -0400, "Michael S. Tsirkin" wrote:
> On Fri, Sep 06, 2024 at 08:31:34PM +0800, Xuan Zhuo wrote:
> > Regression:
> > http://lore.kernel.org/all/8b20cc28-45a9-4643-8e87-ba164a540...@oracle.com
> >
> > I still think that the patch c
On Tue, 24 Sep 2024 15:35:08 +0800, Jason Wang wrote:
> On Tue, Sep 24, 2024 at 9:32 AM Xuan Zhuo wrote:
> >
> > The driver's tx napi is very important for XSK. It is responsible for
> > obtaining data from the XSK queue and sending it out.
> >
> > At the
On Tue, 24 Sep 2024 15:35:03 +0800, Jason Wang wrote:
> On Tue, Sep 24, 2024 at 9:32 AM Xuan Zhuo wrote:
> >
> > Because the af-xdp will introduce a new xmit type, so I refactor the
> > xmit type mechanism first.
> >
> > In general, pointers are aligned to 4 o
On Tue, 24 Sep 2024 15:35:05 +0800, Jason Wang wrote:
> On Tue, Sep 24, 2024 at 9:32 AM Xuan Zhuo wrote:
> >
> > This patch implement the logic of bind/unbind xsk pool to sq and rq.
> >
> > Signed-off-by: Xuan Zhuo
> > ---
&
Will fix for all commets in next version.
Thanks.
On Tue, 24 Sep 2024 15:34:57 +0800, Jason Wang wrote:
> On Tue, Sep 24, 2024 at 9:32 AM Xuan Zhuo wrote:
> >
> > The subsequent commit needs to know whether every indirect buffer is
> > premapped or not. So we need to intr
On Tue, 24 Sep 2024 15:35:01 +0800, Jason Wang wrote:
> On Tue, Sep 24, 2024 at 9:32 AM Xuan Zhuo wrote:
> >
> > The current configuration sets the virtqueue (vq) to premapped mode,
> > implying that all buffers submitted to this queue must be mapped ahead
> > of time
NULL, this
indicates that the driver has performed DMA mapping in advance, allowing
the Virtio core to directly utilize sg_dma_address(sg) without
conducting any internal DMA mapping. Additionally, DMA unmap operations
for this buffer will be bypassed.
Suggested-by: Jason Wang
Signed-off-by: Xuan
ff-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 176 ---
1 file changed, 166 insertions(+), 10 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 3ad4c6e3ef18..1a870f1df910 100644
--- a/drivers/net/virtio_net.c
+++ b/driver
Now, this API is useless. remove it.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 48
include/linux/virtio.h | 2 --
2 files changed, 50 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index
virtio-net rq submits premapped per-buffer by setting sg page to NULL;
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 6f4781ec2b36..630e5b21ad69
Now, we support AF_XDP(xsk). Add NETDEV_XDP_ACT_XSK_ZEROCOPY to
xdp_features.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index a1ef0277c550
If send queue sent some packets, we update the tx timeout
record to prevent the tx timeout.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index
The subsequent commit needs to know whether every indirect buffer is
premapped or not. So we need to introduce an extra struct for every
indirect buffer to record this info.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 67
1 file changed, 37
Since xsk's TX queue is consumed by TX NAPI, if sq is bound to xsk, then
we must stop tx napi from being disabled.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio_ne
The subsequent commit needs to know whether every indirect buffer is
premapped or not. So we need to introduce an extra struct for every
indirect buffer to record this info.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 126 +--
1 file changed, 61
CPU for tx and rx napi(100% and 86%).
Please review.
Thanks.
Xuan Zhuo (12):
virtio_ring: introduce vring_need_unmap_buffer
virtio_ring: split: record extras for indirect buffers
virtio_ring: packed: record extras for indirect buffers
virtio_ring: perform premapped operations based on
To make the code readable, introduce vring_need_unmap_buffer() to
replace do_unmap.
use_dma_api premapped -> vring_need_unmap_buffer()
1. false falsefalse
2. truefalsetrue
3. truetrue false
Signed-off-by: Xuan Zhuo
Acked-by: Jason W
This patch implement the logic of bind/unbind xsk pool to sq and rq.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 53
1 file changed, 53 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 41a5ea9b788d
And 2 bits is enough for
4 types:
00 for skb
01 for SKB_ORPHAN
10 for XDP
11 for af-xdp tx
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 90 +++-
1 file changed, 51 insertions(+), 39 deletions(-)
diff --git a/drivers/net/virtio_ne
On Wed, 11 Sep 2024 12:31:32 +0800, Jason Wang wrote:
> On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo wrote:
> >
> > The driver's tx napi is very important for XSK. It is responsible for
> > obtaining data from the XSK queue and sending it out.
> >
> > At the
On Wed, 11 Sep 2024 12:08:06 +0800, Jason Wang wrote:
> On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo wrote:
> >
> > This patch implement the logic of bind/unbind xsk pool to sq and rq.
> >
> > Signed-off-by: Xuan Zhuo
> > ---
&
On Wed, 11 Sep 2024 12:32:54 +0800, Jason Wang wrote:
> On Tue, Aug 20, 2024 at 3:34 PM Xuan Zhuo wrote:
> >
> > virtnet_free_old_xmit distinguishes three type ptr(skb, xdp frame, xsk
> > buffer) by the last bits of the pointer.
> >
> > Signed-off-by: Xuan Zhuo
On Wed, 11 Sep 2024 12:04:16 +0800, Jason Wang wrote:
> On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo wrote:
> >
> > Because the af-xdp will introduce a new xmit type, so I refactor the
> > xmit type mechanism first.
> >
> > We use the last two bits of the poi
On Thu, 12 Sep 2024 03:38:12 -0400, "Michael S. Tsirkin"
wrote:
> On Thu, Sep 12, 2024 at 02:55:38PM +0800, Xuan Zhuo wrote:
> > On Wed, 11 Sep 2024 07:28:36 -0400, "Michael S. Tsirkin"
> > wrote:
> > > As gcc luckily noted:
> > >
> >
On Wed, 11 Sep 2024 11:54:25 +0800, Jason Wang wrote:
> On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo wrote:
> >
> > The current configuration sets the virtqueue (vq) to premapped mode,
> > implying that all buffers submitted to this queue must be mapped ahead
> > of time
On Wed, 11 Sep 2024 11:46:30 +0800, Jason Wang wrote:
> On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo wrote:
> >
> > 1. this commit hardens dma unmap for indirect
>
> I think we need to explain why we need such hardening. For example
> indirect use stream mapping which is r
On Wed, 11 Sep 2024 07:28:36 -0400, "Michael S. Tsirkin"
wrote:
> As gcc luckily noted:
>
> On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote:
> > @@ -1617,23 +1617,24 @@ static void detach_buf_packed(struct
> > vring_virtqueue *vq,
> &g
On Wed, 11 Sep 2024 12:30:49 -0700, "Si-Wei Liu" wrote:
>
>
> On 9/11/2024 7:22 AM, Michael S. Tsirkin wrote:
> > Thanks a lot!
> > Could you retest Xuan Zhuo original patch
> Which one? I thought Darren already did so?
This one[1].
Now, we revert these pa
On Tue, 10 Sep 2024 14:18:37 +0800, Jason Wang wrote:
> On Mon, Sep 9, 2024 at 4:50 PM Xuan Zhuo wrote:
> >
> > On Mon, 9 Sep 2024 16:38:16 +0800, Jason Wang wrote:
> > > On Fri, Sep 6, 2024 at 5:32 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Mon, 9 Sep 2024 16:47:02 +0800, Jason Wang wrote:
> On Mon, Sep 9, 2024 at 11:16 AM Xuan Zhuo wrote:
> >
> > On Sun, 8 Sep 2024 15:40:32 -0400, "Michael S. Tsirkin"
> > wrote:
> > > On Tue, Aug 20, 2024 at 03:19:13PM +0800, Xuan Zhuo wrote:
> >
On Mon, 9 Sep 2024 16:38:16 +0800, Jason Wang wrote:
> On Fri, Sep 6, 2024 at 5:32 PM Xuan Zhuo wrote:
> >
> > On Fri, 6 Sep 2024 05:08:56 -0400, "Michael S. Tsirkin"
> > wrote:
> > > On Fri, Sep 06, 2024 at 04:53:38PM +0800, Xuan Zhuo wrote:
> > &
On Sun, 8 Sep 2024 15:40:32 -0400, "Michael S. Tsirkin" wrote:
> On Tue, Aug 20, 2024 at 03:19:13PM +0800, Xuan Zhuo wrote:
> > leads to regression on VM with the sysctl value of:
> >
> > - net.core.high_order_alloc_disable=1
> >
> > which could see
This reverts commit defd28aa5acb0fd7c15adc6bc40a8ac277d04dea.
Recover the code to disable premapped mode.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 85 +++-
1 file changed, 50 insertions(+), 35 deletions(-)
diff --git a/drivers/net
a_api")
Reported-by: "Si-Wei Liu"
Closes:
http://lore.kernel.org/all/8b20cc28-45a9-4643-8e87-ba164a540...@oracle.com
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 18 --
1 file changed, 18 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/ne
This reverts commit a377ae542d8d0a20a3173da3bbba72e045bea7a9.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 36a7781979b7..b68e64e8c7b6 100644
--- a/drivers
Darren can not reply in time, Michael you can try this
patch set.
Thanks.
Xuan Zhuo (3):
Revert "virtio_net: rx remove premapped failover code"
Revert "virtio_net: big mode skip the unmap check"
virtio_net: disable premapped mode by default
drivers/n
On Fri, 6 Sep 2024 05:44:27 -0400, "Michael S. Tsirkin" wrote:
> On Fri, Sep 06, 2024 at 05:25:36PM +0800, Xuan Zhuo wrote:
> > On Fri, 6 Sep 2024 05:08:56 -0400, "Michael S. Tsirkin"
> > wrote:
> > > On Fri, Sep 06, 2024 at 04:53:38PM +0800, Xuan Zhu
1 - 100 of 682 matches
Mail list logo