Re: [PATCH net-next 0/7] virtnet_net: prepare for af-xdp

2024-05-08 Thread Xuan Zhuo
On Wed, 8 May 2024 08:20:00 -0700, Jakub Kicinski wrote: > On Wed, 8 May 2024 09:53:08 +0100 Simon Horman wrote: > > On Wed, May 08, 2024 at 04:05:07PM +0800, Xuan Zhuo wrote: > > > This patch set prepares for supporting af-xdp zerocopy. > > > There is no feature change in this patch set. > > > I

Re: [PATCH net-next 0/7] virtnet_net: prepare for af-xdp

2024-05-08 Thread Jakub Kicinski
On Wed, 8 May 2024 09:53:08 +0100 Simon Horman wrote: > On Wed, May 08, 2024 at 04:05:07PM +0800, Xuan Zhuo wrote: > > This patch set prepares for supporting af-xdp zerocopy. > > There is no feature change in this patch set. > > I just want to reduce the patch num of the final patch set, > > so I s

Re: [PATCH net-next v2 3/3] test/vsock: add ioctl unsent bytes test

2024-05-08 Thread Stefano Garzarella
On Mon, Apr 08, 2024 at 03:37:49PM GMT, Luigi Leonardi wrote: This test that after a packet is delivered the number of unsent bytes is zero. Signed-off-by: Luigi Leonardi --- tools/testing/vsock/util.c | 6 +-- tools/testing/vsock/util.h | 3 ++ tools/testing/vsock/vsock_test.c | 85

Re: [PATCH net-next 0/7] virtnet_net: prepare for af-xdp

2024-05-08 Thread Simon Horman
On Wed, May 08, 2024 at 04:05:07PM +0800, Xuan Zhuo wrote: > This patch set prepares for supporting af-xdp zerocopy. > There is no feature change in this patch set. > I just want to reduce the patch num of the final patch set, > so I split the patch set. > > #1-#3 add independent directory for vir

Re: [PATCH net-next v2 1/3] vsock: add support for SIOCOUTQ ioctl for all vsock socket types.

2024-05-08 Thread Stefano Garzarella
On Mon, Apr 08, 2024 at 03:37:47PM GMT, Luigi Leonardi wrote: This add support for ioctl(s) for SOCK_STREAM SOCK_SEQPACKET and SOCK_DGRAM in AF_VSOCK. The only ioctl available is SIOCOUTQ/TIOCOUTQ, which returns the number of unsent bytes in the socket. This information is transport-specific and

[PATCH net-next 5/7] virtio_net: separate virtnet_tx_resize()

2024-05-08 Thread Xuan Zhuo
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/virtnet.h | 2 ++ drivers/net/virtio/virtnet

[PATCH net-next 6/7] virtio_net: separate receive_mergeable

2024-05-08 Thread Xuan Zhuo
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/virtnet.h | 4 ++ drivers/net/virtio/virtnet_main.c | 77 +++--

[PATCH net-next 7/7] virtio_net: separate receive_buf

2024-05-08 Thread Xuan Zhuo
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/virtnet_main.c | 56 ++- 1 file changed

[PATCH net-next 4/7] virtio_net: separate virtnet_rx_resize()

2024-05-08 Thread Xuan Zhuo
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/virtnet.h | 3 +++ drivers/net/virtio/virtnet_

[PATCH net-next 0/7] virtnet_net: prepare for af-xdp

2024-05-08 Thread Xuan Zhuo
This patch set prepares for supporting af-xdp zerocopy. There is no feature change in this patch set. I just want to reduce the patch num of the final patch set, so I split the patch set. #1-#3 add independent directory for virtio-net #4-#7 do some refactor, the sub-functions will be used by the s

[PATCH net-next 3/7] virtio_net: add prefix virtnet to all struct inside virtio_net.h

2024-05-08 Thread Xuan Zhuo
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/virtnet.h | 12 ++-- drivers/net/virtio/virtnet_main.c | 110 +++--- 2 files changed, 61

[PATCH net-next 2/7] virtio_net: move core structures to virtio_net.h

2024-05-08 Thread Xuan Zhuo
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/virtnet.h | 237 +++

[PATCH net-next 1/7] virtio_net: independent directory

2024-05-08 Thread Xuan Zhuo
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/Kc