On Fri, Jul 05, 2024 at 03:37:24PM +0800, Xuan Zhuo wrote:
> v6:
> 1. start from supporting the rx zerocopy
>
> v5:
> 1. fix the comments of last version
>
> http://lore.kernel.org/all/2024064147.31320-1-xuanz...@linux.alibaba.com
> v4:
> 1. remove the commits that introdu
In the process:
1. We may need to copy data to create skb for XDP_PASS.
2. We may need to call xsk_buff_free() to release the buffer.
3. The handle for xdp_buff is difference from the buffer.
If we pushed this logic into existing receive handle(merge and small),
we would have to maintain code scat
This patch implement the logic of bind/unbind xsk pool to rq.
Signed-off-by: Xuan Zhuo
---
v7:
1. remove a container struct for xsk
2. update comments
3. add check between hdr_len and xsk headroom
drivers/net/virtio_net.c | 134 +++
1 file change
Support AF-XDP for merge mode.
Signed-off-by: Xuan Zhuo
---
v7:
1. include the handle for unused buffers
drivers/net/virtio_net.c | 144 +++
1 file changed, 144 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 64d8cd4
Implement the logic of filling rq with XSK buffers.
Signed-off-by: Xuan Zhuo
---
v7:
1. some small fixes
drivers/net/virtio_net.c | 70 +---
1 file changed, 66 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
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
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 24
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
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 77
1 file ch
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
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 62 +++---
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_net.c | 35 +--
1
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_net.c | 29 +
1 file cha
v6:
1. start from supporting the rx zerocopy
v5:
1. fix the comments of last version
http://lore.kernel.org/all/2024064147.31320-1-xuanz...@linux.alibaba.com
v4:
1. remove the commits that introduce the independent directory
2. remove the supporting for the rx merge mo
virtio net has VIRTIO_XDP_HEADROOM that is equal to
XDP_PACKET_HEADROOM to calculate the headroom for xdp.
But here we should use the macro XDP_PACKET_HEADROOM from bpf.h to
calculate the headroom for xdp. So here we remove the
VIRTIO_XDP_HEADROOM, and use the XDP_PACKET_HEADROOM to replace it.
S
12 matches
Mail list logo