Re: [PATCH net-next 04/13] virtio_ring: perform premapped operations based on per-buffer

2024-09-12 Thread Jason Wang
On Thu, Sep 12, 2024 at 3:43 PM Xuan Zhuo wrote: > > On Wed, 11 Sep 2024 11:54:25 +0800, Jason Wang wrote: > > On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo > > wrote: > > > > > > The current configuration sets the virtqueue (vq) to premapped mode, > > > implying that all buffers submitted to this

Re: [PATCH net-next 07/13] virtio_net: refactor the xmit type

2024-09-12 Thread Jason Wang
On Thu, Sep 12, 2024 at 3:54 PM Xuan Zhuo wrote: > > On Wed, 11 Sep 2024 12:04:16 +0800, Jason Wang wrote: > > On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo > > wrote: > > > > > > Because the af-xdp will introduce a new xmit type, so I refactor the > > > xmit type mechanism first. > > > > > > We us

Re: [PATCH net-next 10/13] virtio_net: xsk: tx: support xmit xsk buffer

2024-09-12 Thread Jason Wang
On Thu, Sep 12, 2024 at 4:50 PM Xuan Zhuo wrote: > > On Wed, 11 Sep 2024 12:31:32 +0800, Jason Wang wrote: > > On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo > > wrote: > > > > > > The driver's tx napi is very important for XSK. It is responsible for > > > obtaining data from the XSK queue and sendi

Re: [PATCH net-next 10/13] virtio_net: xsk: tx: support xmit xsk buffer

2024-09-12 Thread Xuan Zhuo
On Wed, 11 Sep 2024 12:31:32 +0800, Jason Wang wrote: > On Tue, Aug 20, 2024 at 3:33 PM 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: [PATCH net-next 08/13] virtio_net: xsk: bind/unbind xsk for tx

2024-09-12 Thread Xuan Zhuo
On Wed, 11 Sep 2024 12:08:06 +0800, Jason Wang wrote: > On Tue, Aug 20, 2024 at 3:33 PM 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 | 54 ++

Re: [PATCH net-next 11/13] virtio_net: xsk: tx: handle the transmitted xsk buffer

2024-09-12 Thread Xuan Zhuo
On Wed, 11 Sep 2024 12:32:54 +0800, Jason Wang wrote: > On Tue, Aug 20, 2024 at 3:34 PM Xuan Zhuo wrote: > > > > 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 > > I suggest squashing this into

Re: [PATCH net-next 07/13] virtio_net: refactor the xmit type

2024-09-12 Thread Xuan Zhuo
On Wed, 11 Sep 2024 12:04:16 +0800, Jason Wang wrote: > On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo wrote: > > > > Because the af-xdp will introduce a new xmit type, so I refactor the > > xmit type mechanism first. > > > > We use the last two bits of the pointer to distinguish the xmit type, > > so

Re: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-09-12 Thread Xuan Zhuo
On Thu, 12 Sep 2024 03:38:12 -0400, "Michael S. Tsirkin" wrote: > On Thu, Sep 12, 2024 at 02:55:38PM +0800, Xuan Zhuo wrote: > > On Wed, 11 Sep 2024 07:28:36 -0400, "Michael S. Tsirkin" > > wrote: > > > As gcc luckily noted: > > > > > > On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote:

Re: [PATCH net-next 04/13] virtio_ring: perform premapped operations based on per-buffer

2024-09-12 Thread Xuan Zhuo
On Wed, 11 Sep 2024 11:54:25 +0800, Jason Wang wrote: > On Tue, Aug 20, 2024 at 3:33 PM 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: [PATCH net-next 03/13] virtio_ring: packed: harden dma unmap for indirect

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 02:55:38PM +0800, Xuan Zhuo wrote: > On Wed, 11 Sep 2024 07:28:36 -0400, "Michael S. Tsirkin" > wrote: > > As gcc luckily noted: > > > > On Tue, Aug 20, 2024 at 03:33:20PM +0800, Xuan Zhuo wrote: > > > @@ -1617,23 +1617,24 @@ static void detach_buf_packed(struct > > > vri

Re: [PATCH net-next 02/13] virtio_ring: split: harden dma unmap for indirect

2024-09-12 Thread Xuan Zhuo
On Wed, 11 Sep 2024 11:46:30 +0800, Jason Wang wrote: > On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo wrote: > > > > 1. this commit hardens dma unmap for indirect > > I think we need to explain why we need such hardening. For example > indirect use stream mapping which is read-only from the device. S