Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-13 Thread Bui Quang Minh
On 6/11/25 03:37, Jakub Kicinski wrote: On Tue, 10 Jun 2025 22:18:32 +0700 Bui Quang Minh wrote: Furthermore, we are in the zerocopy so we cannot linearize by allocating a large enough buffer to cover the whole frame then copy the frame data to it. That's not zerocopy anymore. Also, XDP socket z

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-12 Thread Xuan Zhuo
On Tue, 3 Jun 2025 22:06:13 +0700, Bui Quang Minh wrote: > In virtio-net, we have not yet supported multi-buffer XDP packet in > zerocopy mode when there is a binding XDP program. However, in that > case, when receiving multi-buffer XDP packet, we skip the XDP program > and return XDP_PASS. As a

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-10 Thread Jakub Kicinski
On Tue, 10 Jun 2025 22:18:32 +0700 Bui Quang Minh wrote: > >> Furthermore, we are in the zerocopy so we cannot linearize by > >> allocating a large enough buffer to cover the whole frame then copy the > >> frame data to it. That's not zerocopy anymore. Also, XDP socket zerocopy > >> receive has ass

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-10 Thread Bui Quang Minh
On 6/9/25 23:58, Jakub Kicinski wrote: On Fri, 6 Jun 2025 22:48:53 +0700 Bui Quang Minh wrote: But currently, if a multi-buffer packet arrives, it will not go through XDP program so it doesn't increase the stats but still goes to network stack. So I think it's not a correct behavior. Sounds fai

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-09 Thread Jakub Kicinski
On Fri, 6 Jun 2025 22:48:53 +0700 Bui Quang Minh wrote: > >> But currently, if a multi-buffer packet arrives, it will not go through > >> XDP program so it doesn't increase the stats but still goes to network > >> stack. So I think it's not a correct behavior. > > Sounds fair, but at a glance the

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-06 Thread Bui Quang Minh
On 6/5/25 21:48, Jakub Kicinski wrote: On Thu, 5 Jun 2025 21:33:26 +0700 Bui Quang Minh wrote: On 6/5/25 18:03, Paolo Abeni wrote: On 6/3/25 5:06 PM, Bui Quang Minh wrote: In virtio-net, we have not yet supported multi-buffer XDP packet in zerocopy mode when there is a binding XDP program. How

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-05 Thread Jakub Kicinski
On Thu, 5 Jun 2025 21:33:26 +0700 Bui Quang Minh wrote: > On 6/5/25 18:03, Paolo Abeni wrote: > > On 6/3/25 5:06 PM, Bui Quang Minh wrote: > >> In virtio-net, we have not yet supported multi-buffer XDP packet in > >> zerocopy mode when there is a binding XDP program. However, in that > >> case, w

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-05 Thread Bui Quang Minh
On 6/5/25 18:03, Paolo Abeni wrote: On 6/3/25 5:06 PM, Bui Quang Minh wrote: In virtio-net, we have not yet supported multi-buffer XDP packet in zerocopy mode when there is a binding XDP program. However, in that case, when receiving multi-buffer XDP packet, we skip the XDP program and return XD

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-05 Thread Bui Quang Minh
On 6/4/25 23:55, Zvi Effron wrote: On Tue, Jun 3, 2025 at 8:09 AM Bui Quang Minh wrote: In virtio-net, we have not yet supported multi-buffer XDP packet in zerocopy mode when there is a binding XDP program. However, in that case, when receiving multi-buffer XDP packet, we skip the XDP program a

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-05 Thread Paolo Abeni
On 6/3/25 5:06 PM, Bui Quang Minh wrote: > In virtio-net, we have not yet supported multi-buffer XDP packet in > zerocopy mode when there is a binding XDP program. However, in that > case, when receiving multi-buffer XDP packet, we skip the XDP program > and return XDP_PASS. As a result, the packet

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-04 Thread Jason Wang
On Wed, Jun 4, 2025 at 10:17 PM Bui Quang Minh wrote: > > On 6/4/25 07:37, Jason Wang wrote: > > On Tue, Jun 3, 2025 at 11:07 PM Bui Quang Minh > > wrote: > >> In virtio-net, we have not yet supported multi-buffer XDP packet in > >> zerocopy mode when there is a binding XDP program. However, in

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-04 Thread Zvi Effron
On Tue, Jun 3, 2025 at 8:09 AM Bui Quang Minh wrote: > > In virtio-net, we have not yet supported multi-buffer XDP packet in > zerocopy mode when there is a binding XDP program. However, in that > case, when receiving multi-buffer XDP packet, we skip the XDP program > and return XDP_PASS. As a res

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-04 Thread Bui Quang Minh
On 6/4/25 07:37, Jason Wang wrote: On Tue, Jun 3, 2025 at 11:07 PM Bui Quang Minh wrote: In virtio-net, we have not yet supported multi-buffer XDP packet in zerocopy mode when there is a binding XDP program. However, in that case, when receiving multi-buffer XDP packet, we skip the XDP program

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-03 Thread Jason Wang
On Tue, Jun 3, 2025 at 11:07 PM Bui Quang Minh wrote: > > In virtio-net, we have not yet supported multi-buffer XDP packet in > zerocopy mode when there is a binding XDP program. However, in that > case, when receiving multi-buffer XDP packet, we skip the XDP program > and return XDP_PASS. As a re

[PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-03 Thread Bui Quang Minh
In virtio-net, we have not yet supported multi-buffer XDP packet in zerocopy mode when there is a binding XDP program. However, in that case, when receiving multi-buffer XDP packet, we skip the XDP program and return XDP_PASS. As a result, the packet is passed to normal network stack which is an in