* [PATCH net-next v2 0/3] tun: AF_XDP Tx zero-copy support
@ 2024-02-28 11:04 Yunjian Wang
2024-02-28 12:36 ` Jiri Pirko
2024-02-28 18:31 ` Michael S. Tsirkin
0 siblings, 2 replies; 3+ messages in thread
From: Yunjian Wang @ 2024-02-28 11:04 UTC (permalink / raw)
To: mst, willemdebruijn.kernel, jasowang, kuba, bjorn,
magnus.karlsson, maciej.fijalkowski, jonathan.lemon, davem
Cc: bpf, netdev, linux-kernel, kvm, virtualization, xudingke,
liwei395, Yunjian Wang
Hi all:
Now, some drivers support the zero-copy feature of AF_XDP sockets,
which can significantly reduce CPU utilization for XDP programs.
This patch set allows TUN to also support the AF_XDP Tx zero-copy
feature. It is based on Linux 6.8.0+(openEuler 23.09) and has
successfully passed Netperf and Netserver stress testing with
multiple streams between VM A and VM B, using AF_XDP and OVS.
The performance testing was performed on a Intel E5-2620 2.40GHz
machine. Traffic were generated/send through TUN(testpmd txonly
with AF_XDP) to VM (testpmd rxonly in guest).
+------+---------+---------+---------+
| | copy |zero-copy| speedup |
+------+---------+---------+---------+
| UDP | Mpps | Mpps | % |
| 64 | 2.5 | 4.0 | 60% |
| 512 | 2.1 | 3.6 | 71% |
| 1024 | 1.9 | 3.3 | 73% |
+------+---------+---------+---------+
Yunjian Wang (3):
xsk: Remove non-zero 'dma_page' check in xp_assign_dev
vhost_net: Call peek_len when using xdp
tun: AF_XDP Tx zero-copy support
drivers/net/tun.c | 177 ++++++++++++++++++++++++++++++++++++++--
drivers/vhost/net.c | 21 +++--
include/linux/if_tun.h | 32 ++++++++
net/xdp/xsk_buff_pool.c | 7 --
4 files changed, 220 insertions(+), 17 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2 0/3] tun: AF_XDP Tx zero-copy support
2024-02-28 11:04 [PATCH net-next v2 0/3] tun: AF_XDP Tx zero-copy support Yunjian Wang
@ 2024-02-28 12:36 ` Jiri Pirko
2024-02-28 18:31 ` Michael S. Tsirkin
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2024-02-28 12:36 UTC (permalink / raw)
To: Yunjian Wang
Cc: mst, willemdebruijn.kernel, jasowang, kuba, bjorn,
magnus.karlsson, maciej.fijalkowski, jonathan.lemon, davem, bpf,
netdev, linux-kernel, kvm, virtualization, xudingke, liwei395
Wed, Feb 28, 2024 at 12:04:41PM CET, wangyunjian@huawei.com wrote:
>Hi all:
>
>Now, some drivers support the zero-copy feature of AF_XDP sockets,
>which can significantly reduce CPU utilization for XDP programs.
>
>This patch set allows TUN to also support the AF_XDP Tx zero-copy
>feature. It is based on Linux 6.8.0+(openEuler 23.09) and has
>successfully passed Netperf and Netserver stress testing with
>multiple streams between VM A and VM B, using AF_XDP and OVS.
>
>The performance testing was performed on a Intel E5-2620 2.40GHz
>machine. Traffic were generated/send through TUN(testpmd txonly
>with AF_XDP) to VM (testpmd rxonly in guest).
>
>+------+---------+---------+---------+
>| | copy |zero-copy| speedup |
>+------+---------+---------+---------+
>| UDP | Mpps | Mpps | % |
>| 64 | 2.5 | 4.0 | 60% |
>| 512 | 2.1 | 3.6 | 71% |
>| 1024 | 1.9 | 3.3 | 73% |
>+------+---------+---------+---------+
>
>Yunjian Wang (3):
> xsk: Remove non-zero 'dma_page' check in xp_assign_dev
> vhost_net: Call peek_len when using xdp
> tun: AF_XDP Tx zero-copy support
Threading of the patchset seems to be broken. Did you by any chance send
this with "--nothread" git-send-email option?
pw seems to cope fine with this though.
>
> drivers/net/tun.c | 177 ++++++++++++++++++++++++++++++++++++++--
> drivers/vhost/net.c | 21 +++--
> include/linux/if_tun.h | 32 ++++++++
> net/xdp/xsk_buff_pool.c | 7 --
> 4 files changed, 220 insertions(+), 17 deletions(-)
>
>--
>2.41.0
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2 0/3] tun: AF_XDP Tx zero-copy support
2024-02-28 11:04 [PATCH net-next v2 0/3] tun: AF_XDP Tx zero-copy support Yunjian Wang
2024-02-28 12:36 ` Jiri Pirko
@ 2024-02-28 18:31 ` Michael S. Tsirkin
1 sibling, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2024-02-28 18:31 UTC (permalink / raw)
To: Yunjian Wang
Cc: willemdebruijn.kernel, jasowang, kuba, bjorn, magnus.karlsson,
maciej.fijalkowski, jonathan.lemon, davem, bpf, netdev,
linux-kernel, kvm, virtualization, xudingke, liwei395
On Wed, Feb 28, 2024 at 07:04:41PM +0800, Yunjian Wang wrote:
> Hi all:
>
> Now, some drivers support the zero-copy feature of AF_XDP sockets,
> which can significantly reduce CPU utilization for XDP programs.
>
> This patch set allows TUN to also support the AF_XDP Tx zero-copy
> feature. It is based on Linux 6.8.0+(openEuler 23.09) and has
> successfully passed Netperf and Netserver stress testing with
> multiple streams between VM A and VM B, using AF_XDP and OVS.
>
> The performance testing was performed on a Intel E5-2620 2.40GHz
> machine. Traffic were generated/send through TUN(testpmd txonly
> with AF_XDP) to VM (testpmd rxonly in guest).
>
> +------+---------+---------+---------+
> | | copy |zero-copy| speedup |
> +------+---------+---------+---------+
> | UDP | Mpps | Mpps | % |
> | 64 | 2.5 | 4.0 | 60% |
> | 512 | 2.1 | 3.6 | 71% |
> | 1024 | 1.9 | 3.3 | 73% |
> +------+---------+---------+---------+
>
> Yunjian Wang (3):
> xsk: Remove non-zero 'dma_page' check in xp_assign_dev
> vhost_net: Call peek_len when using xdp
> tun: AF_XDP Tx zero-copy support
threading broken pls repost.
vhost bits look ok though:
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> drivers/net/tun.c | 177 ++++++++++++++++++++++++++++++++++++++--
> drivers/vhost/net.c | 21 +++--
> include/linux/if_tun.h | 32 ++++++++
> net/xdp/xsk_buff_pool.c | 7 --
> 4 files changed, 220 insertions(+), 17 deletions(-)
>
> --
> 2.41.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-28 18:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 11:04 [PATCH net-next v2 0/3] tun: AF_XDP Tx zero-copy support Yunjian Wang
2024-02-28 12:36 ` Jiri Pirko
2024-02-28 18:31 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).