Re: [RFC net-next v1 10/12] virtio_net: xsk: tx: support xmit xsk buffer

2024-09-24 Thread Xuan Zhuo
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 beginning, we need to trigger tx napi. >

Re: [RFC net-next v1 07/12] virtio_net: refactor the xmit type

2024-09-24 Thread Xuan Zhuo
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 or 8 bytes. > > I think this needs som

Re: [RFC net-next v1 08/12] virtio_net: xsk: bind/unbind xsk for tx

2024-09-24 Thread Xuan Zhuo
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 > > --- > > drivers/net/virtio_net.c | 53 ++

Re: [RFC net-next v1 02/12] virtio_ring: split: record extras for indirect buffers

2024-09-24 Thread 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 introduce an extra struct f

Re: [RFC net-next v1 04/12] virtio_ring: perform premapped operations based on per-buffer

2024-09-24 Thread Xuan Zhuo
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. This presents a challenge f

Re: [RFC net-next v1 10/12] virtio_net: xsk: tx: support xmit xsk buffer

2024-09-24 Thread Jason Wang
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 beginning, we need to trigger tx napi. > > virtnet_free_old_xmit distinguishes three type ptr(skb, xdp frame

Re: [RFC net-next v1 04/12] virtio_ring: perform premapped operations based on per-buffer

2024-09-24 Thread Jason Wang
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. This presents a challenge for the virtnet send queue (sq): the > virtnet driver would be req

Re: [RFC net-next v1 08/12] virtio_net: xsk: bind/unbind xsk for tx

2024-09-24 Thread Jason Wang
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 > --- > drivers/net/virtio_net.c | 53 > 1 file changed, 53 insertions(+) > > diff --git a/drivers/net/v

Re: [RFC net-next v1 07/12] virtio_net: refactor the xmit type

2024-09-24 Thread Jason Wang
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 or 8 bytes. I think this needs some clarification, the alignment seems to depend on the lowest common mu

Re: [RFC net-next v1 02/12] virtio_ring: split: record extras for indirect buffers

2024-09-24 Thread Jason Wang
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 introduce an extra struct for every > indirect buffer to record this info. > > Signed-off-by: Xuan Zhuo > --- > drivers/virtio/virtio_ring.c