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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR21MB13757F7D19C11EC175FD9F98CA0F0@MN2PR21MB1375.namprd21.prod.outlook.com>
Date:   Thu, 23 Jan 2020 17:14:06 +0000
From:   Haiyang Zhang <haiyangz@...rosoft.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     "sashal@...nel.org" <sashal@...nel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "olaf@...fle.de" <olaf@...fle.de>, vkuznets <vkuznets@...hat.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V3,net-next, 1/2] hv_netvsc: Add XDP support



> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Thursday, January 23, 2020 11:59 AM
> To: Haiyang Zhang <haiyangz@...rosoft.com>
> Cc: sashal@...nel.org; linux-hyperv@...r.kernel.org; netdev@...r.kernel.org;
> KY Srinivasan <kys@...rosoft.com>; Stephen Hemminger
> <sthemmin@...rosoft.com>; olaf@...fle.de; vkuznets
> <vkuznets@...hat.com>; davem@...emloft.net; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH V3,net-next, 1/2] hv_netvsc: Add XDP support
> 
> On Wed, 22 Jan 2020 09:23:33 -0800, Haiyang Zhang wrote:
> > This patch adds support of XDP in native mode for hv_netvsc driver,
> > and transparently sets the XDP program on the associated VF NIC as well.
> >
> > Setting / unsetting XDP program on synthetic NIC (netvsc) propagates
> > to VF NIC automatically. Setting / unsetting XDP program on VF NIC
> > directly is not recommended, also not propagated to synthetic NIC, and
> > may be overwritten by setting of synthetic NIC.
> >
> > The Azure/Hyper-V synthetic NIC receive buffer doesn't provide
> > headroom for XDP. We thought about re-use the RNDIS header space, but
> > it's too small. So we decided to copy the packets to a page buffer for
> > XDP. And, most of our VMs on Azure have Accelerated  Network (SRIOV)
> > enabled, so most of the packets run on VF NIC. The synthetic NIC is
> > considered as a fallback data-path. So the data copy on netvsc won't
> > impact performance significantly.
> >
> > XDP program cannot run with LRO (RSC) enabled, so you need to disable
> > LRO before running XDP:
> >         ethtool -K eth0 lro off
> >
> > XDP actions not yet supported:
> >         XDP_REDIRECT
> >
> > Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
> >
> > ---
> > Changes:
> > 	v3: Minor code and comment updates.
> >         v2: Added XDP_TX support. Addressed review comments.
> 
> How does the locking of the TX path work? You seem to be just calling the
> normal xmit method, but you don't hold the xmit queue lock, so the stack can
> start xmit concurrently, no?

The netvsc and vmbus can handle concurrent transmits, except the msd 
(Multi-Send Data) field which can only be used by one queue. 

I already added a new flag to netvsc_send(), so packets from XDP_TX won't use 
the msd.

Thanks,
- Haiyang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ