address of the buffer from
the virtio core.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 33 +
include/linux/virtio.h | 1 +
2 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio
of the buffer from
the virtio core.
Because the BAD_RING is called (that may set vq->broken), so
the relative "const" of vq is removed.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 174 +--
include/linux/virtio.h | 16
2
This patch separates two sub-functions from virtnet_tx_resize():
* virtnet_tx_pause
* virtnet_tx_resume
Then the subsequent virtnet_tx_reset() can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 35
should
complete the work of detaching all the unused buffers.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c| 60 +++-
drivers/virtio/virtio_ring.c | 10 +++---
include/linux/virtio.h | 4 +--
3 files changed, 38 insertions(+), 36 deletions
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/main.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/m
__free_old_xmit
is_xdp_raw_buffer_queue
These two APIs are needed by the xsk part.
So this commit move theses to the header. And add prefix "virtnet_".
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 86 +++--
drivers/net/virtio/virtio_
This patch implement the logic of bind/unbind xsk pool to sq and rq.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/Makefile | 2 +-
drivers/net/virtio/main.c | 11 +-
drivers/net/virtio/virtio_net.h | 17 +++
drivers/net/virtio/xsk.c| 187
): |1707107.00 | 1562917.00 | 385667.00 | 373584.00
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 119
drivers/net/virtio/virtio_net.h | 10 ++-
2 files changed, 116 insertions(+), 13 deletions(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net
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 beginning, we need to trigger tx napi.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 22 ++---
drivers/net/virtio/virtio_net.h
xsk wakeup is used to trigger the logic for xsk xmit by xsk framework or
user.
Virtio-net does not support to actively generate an interruption, so it
tries to trigger tx NAPI on the local cpu.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 20 ++--
drivers/net
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
---
drivers/net/virtio/virtio_net.h | 30 ++
drivers/net/virtio/xsk.c| 33 ++---
drivers/net
virtnet_sq_free_unused_buf() check xsk buffer.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net/virtio/main.c
index 2c82418b0344..ab1970158d85 100644
scattered inside merge and small (and big).
So I think it is a good choice for us to put the xsk code into an
independent function.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 40 --
drivers/net/virtio/virtio_net.h | 8 ++
drivers/net/virtio/xsk.c| 217
receive the xsk buffer for small mode.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/xsk.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/drivers/net/virtio/xsk.c b/drivers/net/virtio/xsk.c
index 005bb5f66271..ee09e898a291 100644
--- a/drivers/net
This commit separates the function receive_mergeable(),
put the logic of appending frag to the skb as an independent function.
The subsequent commit will reuse it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 77 ---
1 file changed, 47 insertions
Since this will be called in other circumstances(freeze), we must check
whether it is xsk's buffer in this function. It cannot be judged outside
this function.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/net/v
This commit separates the function receive_buf(), then we wrap the logic
of handling the skb to an independent function virtnet_receive_done().
The subsequent commit will reuse it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 56 ++-
1 file
Implement the logic of filling rq with XSK buffers.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 9 +-
drivers/net/virtio/virtio_net.h | 2 ++
drivers/net/virtio/xsk.c| 51 -
drivers/net/virtio/xsk.h| 2 ++
4 files changed
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/xsk.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/virtio/xsk.c b/drivers/net/virtio/xsk.c
index
Now, we supported AF_XDP(xsk). Add NETDEV_XDP_ACT_XSK_ZEROCOPY to
xdp_features.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net/virtio/main.c
index cc0194c14c98..ec28f87f04a7
On Tue, 26 Dec 2023 15:30:57 +0800, Xuan Zhuo
wrote:
> As the spec:
>
> https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
>
> The virtio net supports to get device stats.
Hi Jason,
Any comments for this?
Thanks
>
> Please revie
Since free_old_xmit_skbs not only deals with skb, but also xdp frame and
subsequent added xsk, so change the name of this function to
free_old_xmit.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff
There are two completely similar and independent implementations. This
is inconvenient for the subsequent addition of new types. So extract a
function from this piece of code and call this function uniformly to
recover old xmit ptr.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net
Create a separate directory for virtio-net. AF_XDP support will be added
later, then a separate xsk.c file will be added, so we should create a
directory for virtio-net.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
MAINTAINERS | 2 +-
drivers/net/Kconfig
Move some core structures (send_queue, receive_queue, virtnet_info)
definitions and the relative structures definitions into the
virtio_net.h file.
That will be used by the other c code files.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 203
100% and 86%).
## maintain
I am currently a reviewer for virtio-net. I commit to maintain AF_XDP support in
virtio-net.
Please review.
Thanks.
Xuan Zhuo (5):
virtio_net: rename free_old_xmit_skbs to free_old_xmit
virtio_net: unify the code for recycling the xmit ptr
virtio_net: independen
We move some structures to the header file, but these structures do not
prefixed with virtnet. This patch adds virtnet for these.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 106
drivers/net/virtio/virtio_net.h | 12 ++--
2 files changed, 59
On Thu, 11 Jan 2024 16:34:09 +0800, Jason Wang wrote:
> On Fri, Dec 29, 2023 at 3:31 PM Xuan Zhuo wrote:
> >
> > introduce virtqueue_get_buf_ctx_dma() to collect the dma info when
> > get buf from virtio core for premapped mode.
> >
> > If the virtio queue is pr
ps: 2837285936
But AF_XDP consumes more CPU for tx and rx napi(100% and 86%).
## maintain
I am currently a reviewer for virtio-net. I commit to maintain AF_XDP support in
virtio-net.
Please review.
Thanks.
Xuan Zhuo (5):
virtio_ring: introduce virtqueue_get_buf_ctx_dma
of the buffer from
the virtio core.
Because the BAD_RING is called (that may set vq->broken), so
the relative "const" of vq is removed.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 174 +--
include/linux/virtio.h | 16
2
should
complete the work of detaching all the unused buffers.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c| 60 +++-
drivers/virtio/virtio_ring.c | 10 +++---
include/linux/virtio.h | 4 +--
3 files changed, 38 insertions(+), 36 deletions
address of the buffer from
the virtio core.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 33 +
include/linux/virtio.h | 1 +
2 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio
Introduce helper virtqueue_get_dma_premapped(), then the driver
can know whether dma unmap is needed.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 22 +-
drivers/net/virtio/virtio_net.h | 3 ---
drivers/virtio/virtio_ring.c| 22
): |1707107.00 | 1562917.00 | 385667.00 | 373584.00
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 119
drivers/net/virtio/virtio_net.h | 10 ++-
2 files changed, 116 insertions(+), 13 deletions(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net
This patch separates two sub-functions from virtnet_rx_resize():
* virtnet_rx_pause
* virtnet_rx_resume
Then the subsequent reset rx for xsk can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 29
add comments for some code
v1:
1. remove two virtio commits. Push this patchset to net-next
2. squash "virtio_net: virtnet_poll_tx support rescheduled" to xsk: support
tx
3. fix some warnings
Xuan Zhuo (17):
virtio_net: separate virtnet_rx_resize()
virtio_net: separate v
This patch separates two sub-functions from virtnet_tx_resize():
* virtnet_tx_pause
* virtnet_tx_resume
Then the subsequent virtnet_tx_reset() can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 35
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/main.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/m
__free_old_xmit
is_xdp_raw_buffer_queue
These two APIs are needed by the xsk part.
So this commit move theses to the header. And add prefix "virtnet_".
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 86 +++--
drivers/net/virtio/virtio_
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 beginning, we need to trigger tx napi.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 22 ++---
drivers/net/virtio/virtio_net.h
xsk wakeup is used to trigger the logic for xsk xmit by xsk framework or
user.
Virtio-net does not support to actively generate an interruption, so it
tries to trigger tx NAPI on the local cpu.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 20 ++--
drivers/net
This patch implement the logic of bind/unbind xsk pool to sq and rq.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/Makefile | 2 +-
drivers/net/virtio/main.c | 12 +-
drivers/net/virtio/virtio_net.h | 18 +++
drivers/net/virtio/xsk.c| 188
This commit separates the function receive_mergeable(),
put the logic of appending frag to the skb as an independent function.
The subsequent commit will reuse it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 77 -
drivers/net/virtio
virtnet_sq_free_unused_buf() check xsk buffer.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net/virtio/main.c
index cb0a1ea712de..e64d52e7d95b 100644
This commit separates the function receive_buf(), then we wrap the logic
of handling the skb to an independent function virtnet_receive_done().
The subsequent commit will reuse it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 56 ++-
1 file
Implement the logic of filling rq with XSK buffers.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 9 +-
drivers/net/virtio/virtio_net.h | 2 ++
drivers/net/virtio/xsk.c| 51 -
drivers/net/virtio/xsk.h| 2 ++
4 files changed
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
---
drivers/net/virtio/virtio_net.h | 30 ++
drivers/net/virtio/xsk.c| 33 ++---
drivers/net
scattered inside merge and small (and big).
So I think it is a good choice for us to put the xsk code into an
independent function.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 40 --
drivers/net/virtio/virtio_net.h | 4 +
drivers/net/virtio/xsk.c| 216
receive the xsk buffer for small mode.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/xsk.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/drivers/net/virtio/xsk.c b/drivers/net/virtio/xsk.c
index 6f4fa32b1184..a73559faadf6 100644
--- a/drivers/net
Since this will be called in other circumstances(freeze), we must check
whether it is xsk's buffer in this function. It cannot be judged outside
this function.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/net/v
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/xsk.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio/xsk.c b/drivers/net/virtio/xsk.c
index
Now, we supported AF_XDP(xsk). Add NETDEV_XDP_ACT_XSK_ZEROCOPY to
xdp_features.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net/virtio/main.c
index 81d390781a4f..176d549b0c80
On Tue, 16 Jan 2024 15:46:00 -0500, "Michael S. Tsirkin"
wrote:
> On Tue, Jan 16, 2024 at 07:07:05AM -0800, Jakub Kicinski wrote:
> > On Tue, 16 Jan 2024 13:37:30 +0100 Paolo Abeni wrote:
> > > For future submission it would be better if you split this series in
> > > smaller chunks: the maximum
On Tue, 16 Jan 2024 07:07:05 -0800, Jakub Kicinski wrote:
> On Tue, 16 Jan 2024 13:37:30 +0100 Paolo Abeni wrote:
> > For future submission it would be better if you split this series in
> > smaller chunks: the maximum size allowed is 15 patches.
>
> Which does not mean you can split it up and pos
On Thu, 18 Jan 2024 08:14:21 -0500, "Michael S. Tsirkin"
wrote:
> On Tue, Jan 16, 2024 at 01:04:49PM +0100, Paolo Abeni wrote:
> > On Mon, 2024-01-15 at 09:29 +0800, Zhu Yanjun wrote:
> > > From: Zhu Yanjun
> > >
> > > Some devices emulate the virtio_net hardwares. When virtio_net
> > > driver s
On Mon, 22 Jan 2024 11:14:30 +0800, Jason Wang wrote:
> On Mon, Jan 22, 2024 at 10:12 AM Zhu Yanjun wrote:
> >
> >
> > 在 2024/1/20 1:29, Andrew Lunn 写道:
> > >while (!virtqueue_get_buf(vi->cvq, &tmp) &&
> > > - !virtqueue_is_broken(vi->cvq))
> > > + !virtque
On Mon, 22 Jan 2024 12:18:51 +0800, Jason Wang wrote:
> On Tue, Jan 16, 2024 at 3:47 PM Xuan Zhuo wrote:
> >
> > On Thu, 11 Jan 2024 16:34:09 +0800, Jason Wang wrote:
> > > On Fri, Dec 29, 2023 at 3:31 PM Xuan Zhuo
> > > wrote:
> > > >
> > &
On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang wrote:
> On Mon, Jan 22, 2024 at 12:00 PM Xuan Zhuo wrote:
> >
> > On Mon, 22 Jan 2024 11:14:30 +0800, Jason Wang wrote:
> > > On Mon, Jan 22, 2024 at 10:12 AM Zhu Yanjun wrote:
> > > >
> > &g
On Mon, 22 Jan 2024 14:55:46 +0800, Jason Wang wrote:
> On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo wrote:
> >
> > On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang wrote:
> > > On Mon, Jan 22, 2024 at 12:00 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Mon, 22 Jan 2024 14:58:09 +0800, Jason Wang wrote:
> On Mon, Jan 22, 2024 at 2:55 PM Jason Wang wrote:
> >
> > On Mon, Jan 22, 2024 at 2:20 PM Xuan Zhuo
> > wrote:
> > >
> > > On Mon, 22 Jan 2024 12:16:27 +0800, Jason Wang
> > > wrote:
&g
On Tue, 16 Jan 2024 21:11:33 +0800, Heng Qi wrote:
> Accumulate multiple request commands to kick the device once,
> and obtain the processing results of the corresponding commands
> asynchronously. The batch command method is used to optimize the
> CPU overhead of the DIM worker caused by the gue
On Mon, 22 Jan 2024 15:19:12 +0800, Jason Wang wrote:
> On Mon, Jan 22, 2024 at 3:07 PM Xuan Zhuo wrote:
> >
> > On Mon, 22 Jan 2024 14:58:09 +0800, Jason Wang wrote:
> > > On Mon, Jan 22, 2024 at 2:55 PM Jason Wang wrote:
> > > >
> > >
On Tue, 16 Jan 2024 21:11:33 +0800, Heng Qi wrote:
> Accumulate multiple request commands to kick the device once,
> and obtain the processing results of the corresponding commands
> asynchronously. The batch command method is used to optimize the
> CPU overhead of the DIM worker caused by the gue
On Mon, 22 Jan 2024 15:57:08 +0800, Jason Wang wrote:
> On Mon, Jan 22, 2024 at 3:36 PM Xuan Zhuo wrote:
> >
> > On Mon, 22 Jan 2024 15:19:12 +0800, Jason Wang wrote:
> > > On Mon, Jan 22, 2024 at 3:07 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Mon, 22 Jan 2024 16:32:46 +0800, Jason Wang wrote:
> On Mon, Jan 22, 2024 at 4:04 PM Xuan Zhuo wrote:
> >
> > On Mon, 22 Jan 2024 15:57:08 +0800, Jason Wang wrote:
> > > On Mon, Jan 22, 2024 at 3:36 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Thu, 25 Jan 2024 11:39:28 +0800, Jason Wang wrote:
> On Tue, Jan 16, 2024 at 3:59 PM Xuan Zhuo wrote:
> >
> > This is the second part of virtio-net support AF_XDP zero copy.
> >
> > The whole patch set
> > http://lore.kernel.org/all/20231229073108.5
On Thu, 25 Jan 2024 13:42:05 +0800, Xuan Zhuo
wrote:
> On Thu, 25 Jan 2024 11:39:28 +0800, Jason Wang wrote:
> > On Tue, Jan 16, 2024 at 3:59 PM Xuan Zhuo
> > wrote:
> > >
> > > This is the second part of virtio-net support AF_XDP zero copy.
> >
On Thu, 25 Jan 2024 11:39:03 +0800, Jason Wang wrote:
> On Tue, Jan 16, 2024 at 3:59 PM Xuan Zhuo wrote:
> >
> > Introduce helper virtqueue_get_dma_premapped(), then the driver
> > can know whether dma unmap is needed.
> >
> > Signed-off-by: Xuan Zhuo
>
On Thu, 25 Jan 2024 11:39:20 +0800, Jason Wang wrote:
> On Tue, Jan 16, 2024 at 3:59 PM Xuan Zhuo wrote:
> >
> > If the xsk is enabling, the xsk tx will share the send queue.
>
> Any reason for this? Technically, virtio-net can work as other NIC
> like 256 queues. There
On Thu, 25 Jan 2024 14:14:58 +0800, Jason Wang wrote:
> On Thu, Jan 25, 2024 at 1:52 PM Xuan Zhuo wrote:
> >
> > On Thu, 25 Jan 2024 13:42:05 +0800, Xuan Zhuo
> > wrote:
> > > On Thu, 25 Jan 2024 11:39:28 +0800, Jason Wang
> > > wrote:
> >
On Mon, 29 Jan 2024 11:06:35 +0800, Jason Wang wrote:
> On Thu, Jan 25, 2024 at 2:24 PM Xuan Zhuo wrote:
> >
> > On Thu, 25 Jan 2024 11:39:20 +0800, Jason Wang wrote:
> > > On Tue, Jan 16, 2024 at 3:59 PM Xuan Zhuo
> > > wrote:
> > > >
> > &g
On Mon, 29 Jan 2024 11:07:50 +0800, Jason Wang wrote:
> On Thu, Jan 25, 2024 at 1:58 PM Xuan Zhuo wrote:
> >
> > On Thu, 25 Jan 2024 11:39:03 +0800, Jason Wang wrote:
> > > On Tue, Jan 16, 2024 at 3:59 PM Xuan Zhuo
> > > wrote:
> > > >
> &g
On Mon, 29 Jan 2024 11:14:43 +0800, Jason Wang wrote:
> On Thu, Jan 25, 2024 at 2:33 PM Xuan Zhuo wrote:
> >
> > On Thu, 25 Jan 2024 14:14:58 +0800, Jason Wang wrote:
> > > On Thu, Jan 25, 2024 at 1:52 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Mon, 29 Jan 2024 11:37:56 +0800, Xuan Zhuo
wrote:
> On Mon, 29 Jan 2024 11:14:43 +0800, Jason Wang wrote:
> > On Thu, Jan 25, 2024 at 2:33 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 25 Jan 2024 14:14:58 +0800, Jason Wang
> > > wrote:
> &g
On Tue, 30 Jan 2024 10:51:37 +0800, Jason Wang wrote:
> On Mon, Jan 29, 2024 at 2:28 PM Xuan Zhuo wrote:
> >
> > On Mon, 29 Jan 2024 11:37:56 +0800, Xuan Zhuo
> > wrote:
> > > On Mon, 29 Jan 2024 11:14:43 +0800, Jason Wang
> > > wrote:
> >
On Tue, 30 Jan 2024 10:54:25 +0800, Jason Wang wrote:
> On Mon, Jan 29, 2024 at 11:33 AM Xuan Zhuo wrote:
> >
> > On Mon, 29 Jan 2024 11:07:50 +0800, Jason Wang wrote:
> > > On Thu, Jan 25, 2024 at 1:58 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Tue, 30 Jan 2024 10:56:25 +0800, Jason Wang wrote:
> On Mon, Jan 29, 2024 at 11:28 AM Xuan Zhuo wrote:
> >
> > On Mon, 29 Jan 2024 11:06:35 +0800, Jason Wang wrote:
> > > On Thu, Jan 25, 2024 at 2:24 PM Xuan Zhuo
> > > wrote:
> > > >
> >
On Tue, 30 Jan 2024 11:20:10 +0800, Jason Wang wrote:
> On Tue, Jan 16, 2024 at 1:56 PM Xuan Zhuo wrote:
> >
> > On Tue, 26 Dec 2023 15:30:57 +0800, Xuan Zhuo
> > wrote:
> > > As the spec:
> > >
> > > https://github.com/oasis-tcs/virtio-spec
On Tue, 30 Jan 2024 11:15:07 +0800, Xuan Zhuo
wrote:
> On Tue, 30 Jan 2024 10:56:25 +0800, Jason Wang wrote:
> > On Mon, Jan 29, 2024 at 11:28 AM Xuan Zhuo
> > wrote:
> > >
> > > On Mon, 29 Jan 2024 11:06:35 +0800, Jason Wang
> > > wrote:
> &g
The virtio-net device stats spec:
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
This commit introduces the relative feature and structures.
Signed-off-by: Xuan Zhuo
---
include/uapi/linux/virtio_net.h | 137
1 file
definitions of the marco and the struct
Xuan Zhuo (6):
virtio_net: introduce device stats feature and structures
virtio_net: virtnet_send_command supports command-specific-result
virtio_net: support device stats
virtio_net: stats map include driver stats
virtio_net: add the total stats
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
The virtnet cvq supports to get result from the device.
This commit implement this.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 47 +++-
1 file
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
make virtio-net support getting the stats from the device by ethtool -S
.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 362 ++-
1 file changed
In the last commit, we use the stats map to manage the device stats.
For the consistency, we let the stats map includes the driver stats.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 195 ---
1 file changed, 100 insertions(+), 95 deletions
Now, we just show the stats of every queue.
But for the user, the total values of every stat may are valuable.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 72 ++--
1 file changed, 61 insertions(+), 11 deletions(-)
diff --git a/drivers/net
Now, we have this:
tx_queue_0_tx_timeouts
This is used to record the tx schedule timeout.
But this has two "tx". I think the below is enough.
tx_queue_0_timeouts
So I rename this field.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 8
1 file changed, 4
On Thu, 22 Feb 2024 14:45:08 -0500, "Michael S. Tsirkin"
wrote:
> On Tue, Jan 16, 2024 at 03:59:19PM +0800, Xuan Zhuo wrote:
> > This is the second part of virtio-net support AF_XDP zero copy.
>
> My understanding is, there's going to be another version o
virtnet_stats_map
v1:
1. fix some definitions of the marco and the struct
Xuan Zhuo (6):
virtio_net: introduce device stats feature and structures
virtio_net: virtnet_send_command supports command-specific-result
virtio_net: support device stats
virtio_net: stats map include driver stats
The virtio-net device stats spec:
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
This commit introduces the relative feature and structures.
Signed-off-by: Xuan Zhuo
---
include/uapi/linux/virtio_net.h | 137
1 file
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
make virtio-net support getting the stats from the device by ethtool -S
.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 362 ++-
1 file changed
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
The virtnet cvq supports to get result from the device.
This commit implement this.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 47 +++-
1 file
In the last commit, we use the stats map to manage the device stats.
For the consistency, we let the stats map includes the driver stats.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 195 ---
1 file changed, 100 insertions(+), 95 deletions
Now, we just show the stats of every queue.
But for the user, the total values of every stat may are valuable.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 72 ++--
1 file changed, 61 insertions(+), 11 deletions(-)
diff --git a/drivers/net
Now, we have this:
tx_queue_0_tx_timeouts
This is used to record the tx schedule timeout.
But this has two "tx". I think the below is enough.
tx_queue_0_timeouts
So I rename this field.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 8
1 file changed, 4
On Tue, 27 Feb 2024 06:54:24 -0800, Jakub Kicinski wrote:
> On Tue, 27 Feb 2024 16:03:02 +0800 Xuan Zhuo wrote:
> > Now, we just show the stats of every queue.
> >
> > But for the user, the total values of every stat may are valuable.
>
> Please wait for this
On Thu, 7 Mar 2024 08:50:21 -0800, Jakub Kicinski wrote:
> CC: Willem and some driver folks for more input, context: extending
> https://lore.kernel.org/all/20240306195509.1502746-1-k...@kernel.org/
> to cover virtio stats.
>
> On Tue, 27 Feb 2024 16:03:00 +0800 Xuan Zhuo wrote:
&g
1. rename transport_vq_config to vq_transport_config
2. virtio-net set dma meta number to (ring-size + 1)(MAX_SKB_FRGAS +2)
3. introduce virtqueue_dma_map_sg_attrs
4. separate vring_create_virtqueue to an independent commit
Xuan Zhuo (10):
virtio_ring: introduce vring_need_unmap_buffer
v
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
vq->premapped is not needed to check
4. the vq->indirect is not needed to check
5. the state->indir_desc must not be null
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 79 +---
1 file changed, 38 insertions(+), 41 deletions(-)
diff --git
must record the dma info.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 66 +---
1 file changed, 38 insertions(+), 28 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 0dfbd17e5a87..22a588bba166 100644
--- a
101 - 200 of 682 matches
Mail list logo