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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1706089044-28932-1-git-send-email-wangyunjian@huawei.com>
Date: Wed, 24 Jan 2024 17:37:24 +0800
From: Yunjian Wang <wangyunjian@...wei.com>
To: <mst@...hat.com>, <willemdebruijn.kernel@...il.com>,
	<jasowang@...hat.com>, <kuba@...nel.org>, <davem@...emloft.net>,
	<magnus.karlsson@...el.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<kvm@...r.kernel.org>, <virtualization@...ts.linux.dev>,
	<xudingke@...wei.com>, Yunjian Wang <wangyunjian@...wei.com>
Subject: [PATCH net-next 0/2] tun: AF_XDP Rx zero-copy support

Now, some drivers support the zero-copy feature of AF_XDP sockets,
which can significantly reduce CPU utilization for XDP programs.

This patch set enables tun to also support the AF_XDP Rx zero-copy
feature, with the following changes:
1. The unnecessary 'dma_page' check has been removed when binding
the AF_XDP socket to the device, as it is not needed for the vNIC.
2. A check has been added when consuming the buffer in
vhost_net_buf_produce(), as the vq's rx_array may be empty after
AF_XDP Rx zero-copy is enabled.
3. The peek_len function is now used to consume a xsk->desc and
retrieve its length.
4. AF_XDP Rx zero-copy support has been added for tun.

This patchset is based on Linux 6.4.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.

With this patch applied, the system CPU usage for OVS' PMD has
decreased from 59.8% to 8.8% while forwarding 700000pps. 

Yunjian Wang (2):
  xsk: Remove non-zero 'dma_page' check in xp_assign_dev
  tun: AF_XDP Rx zero-copy support

 drivers/net/tun.c       | 165 +++++++++++++++++++++++++++++++++++++++-
 drivers/vhost/net.c     |  18 +++--
 net/xdp/xsk_buff_pool.c |   7 --
 3 files changed, 176 insertions(+), 14 deletions(-)

-- 
2.33.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ