lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 18 Jan 2021 14:28:43 +0800 From: Jason Wang <jasowang@...hat.com> To: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, netdev@...r.kernel.org Cc: "Michael S. Tsirkin" <mst@...hat.com>, "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Björn Töpel <bjorn.topel@...el.com>, Magnus Karlsson <magnus.karlsson@...el.com>, Jonathan Lemon <jonathan.lemon@...il.com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>, Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>, KP Singh <kpsingh@...nel.org>, virtualization@...ts.linux-foundation.org, bpf@...r.kernel.org Subject: Re: [PATCH net-next v2 0/7] virtio-net support xdp socket zero copy xmit On 2021/1/16 上午10:59, Xuan Zhuo wrote: > XDP socket is an excellent by pass kernel network transmission framework. The > zero copy feature of xsk (XDP socket) needs to be supported by the driver. The > performance of zero copy is very good. mlx5 and intel ixgbe already support this > feature, This patch set allows virtio-net to support xsk's zerocopy xmit > feature. > > And xsk's zerocopy rx has made major changes to virtio-net, and I hope to submit > it after this patch set are received. > > Compared with other drivers, virtio-net does not directly obtain the dma > address, so I first obtain the xsk page, and then pass the page to virtio. > > When recycling the sent packets, we have to distinguish between skb and xdp. > Now we have to distinguish between skb, xdp, xsk. So the second patch solves > this problem first. > > The last four patches are used to support xsk zerocopy in virtio-net: > > 1. support xsk enable/disable > 2. realize the function of xsk packet sending > 3. implement xsk wakeup callback > 4. set xsk completed when packet sent done > > > ---------------- Performance Testing ------------ > > The udp package tool implemented by the interface of xsk vs sockperf(kernel udp) > for performance testing: > > xsk zero copy in virtio-net: > CPU PPS MSGSIZE > 28.7% 3833857 64 > 38.5% 3689491 512 > 38.9% 2787096 1456 Some questions on the results: 1) What's the setup on the vhost? 2) What's the setup of the mitigation in both host and guest? 3) Any analyze on the possible bottleneck via perf or other tools? Thanks > > xsk without zero copy in virtio-net: > CPU PPS MSGSIZE > 100% 1916747 64 > 100% 1775988 512 > 100% 1440054 1456 > > sockperf: > CPU PPS MSGSIZE > 100% 713274 64 > 100% 701024 512 > 100% 695832 1456 > > Xuan Zhuo (7): > xsk: support get page for drv > virtio-net, xsk: distinguish XDP_TX and XSK XMIT ctx > xsk, virtio-net: prepare for support xsk zerocopy xmit > virtio-net, xsk: support xsk enable/disable > virtio-net, xsk: realize the function of xsk packet sending > virtio-net, xsk: implement xsk wakeup callback > virtio-net, xsk: set xsk completed when packet sent done > > drivers/net/virtio_net.c | 559 +++++++++++++++++++++++++++++++++++++++----- > include/linux/netdevice.h | 1 + > include/net/xdp_sock_drv.h | 10 + > include/net/xsk_buff_pool.h | 1 + > net/xdp/xsk_buff_pool.c | 10 +- > 5 files changed, 523 insertions(+), 58 deletions(-) > > -- > 1.8.3.1 >
Powered by blists - more mailing lists