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 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
在 2024/1/17 上午3:56, Simon Horman 写道:
On Tue, Jan 16, 2024 at 09:11:33PM +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 over
在 2024/1/17 上午3:49, Simon Horman 写道:
On Tue, Jan 16, 2024 at 09:11:32PM +0800, Heng Qi wrote:
Currently, when each time the driver attempts to update the coalescing
parameters for a vq, it needs to kick the device.
The following path is observed:
1. Driver kicks the device;
2. After the
在 2024/1/16 下午9:15, Michael S. Tsirkin 写道:
On Tue, Jan 16, 2024 at 09:11:31PM +0800, Heng Qi wrote:
When the dim worker is scheduled, if it fails to acquire the lock,
dim may not be able to return to the working state later.
For example, the following single queue scenario:
1. The dim wor
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 size allowed is 15 patches.
>
> Which does not mean you can split it up a
On Tue, Jan 16, 2024 at 09:11:33PM +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 th
On Tue, Jan 16, 2024 at 09:11:32PM +0800, Heng Qi wrote:
> Currently, when each time the driver attempts to update the coalescing
> parameters for a vq, it needs to kick the device.
> The following path is observed:
> 1. Driver kicks the device;
> 2. After the device receives the kick, CPU sche
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 post them all at the same
time, FWIW.
On Tue, Jan 16, 2024 at 09:11:31PM +0800, Heng Qi wrote:
> When the dim worker is scheduled, if it fails to acquire the lock,
> dim may not be able to return to the working state later.
>
> For example, the following single queue scenario:
> 1. The dim worker of rxq0 is scheduled, and the dim st
Currently, when each time the driver attempts to update the coalescing
parameters for a vq, it needs to kick the device.
The following path is observed:
1. Driver kicks the device;
2. After the device receives the kick, CPU scheduling occurs and DMA
multiple buffers multiple times;
3. Th
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 guest being busy
waiting for the command response result.
On a
When the dim worker is scheduled, if it fails to acquire the lock,
dim may not be able to return to the working state later.
For example, the following single queue scenario:
1. The dim worker of rxq0 is scheduled, and the dim status is
changed to DIM_APPLY_NEW_PROFILE;
2. The ethtool com
Patch 1 fixes an existing bug. Belongs to the net branch.
Patch 2 requires updating the virtio spec.
Patch 3 only attempts to modify the sending of dim cmd to an asynchronous way,
and does not affect the synchronization way of ethtool cmd.
Heng Qi (3):
virtio-net: fix possible dim status unrecov
On Tue, 2024-01-16 at 17:42 +0800, Xuan Zhuo wrote:
> This is the third part of virtio-net support AF_XDP zero copy.
>
> The whole patch set
> http://lore.kernel.org/all/20231229073108.57778-1-xuanz...@linux.alibaba.com
>
> ## AF_XDP
>
> XDP socket(AF_XDP) is an excellent bypass kernel
On Tue, 2024-01-16 at 14:28 +0800, Xuan Zhuo wrote:
> This is first part of virtio-net support AF_XDP zero copy.
For future submissions, unless explcitly requested otherwise, please
wait for a series being processed before posting the follow-ups.
Otherwise any change requested to earlier patches c
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 sends commands to the emulated hardware, normally the
> hardware needs time to response. Sometimes the time is very
> long. Thus, the following will
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 1006
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 a73559faadf
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/virtio/ma
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/virtio
The virtnet_xdp_handler() is re-used. But
1. We need to copy data to create skb for XDP_PASS.
2. We need to call xsk_buff_free() to release the buffer.
3. The handle for xdp_buff is difference.
If we pushed this logic into existing receive handle(merge and small),
we would have to maintain code s
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/vi
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,
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 changed
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_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/virtio_net.h
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
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/v
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 | 4 ++
drivers
__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_net.h | 72 +
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/main.c
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 +++-
This is the third part of virtio-net support AF_XDP zero copy.
The whole patch set
http://lore.kernel.org/all/20231229073108.57778-1-xuanz...@linux.alibaba.com
## AF_XDP
XDP socket(AF_XDP) is an excellent bypass kernel network framework. The zero
copy feature of xsk (XDP socket) needs to be supp
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 +
dri
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.
command: pktgen_sample01_simple.sh -i eth0 -s 16/1400 -d 10.0.0.123 -m
00:16:3e:12:e1:3e -n 0 -p 100
machine: ecs.ebmg6e.2
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 ++
i
37 matches
Mail list logo