public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: sashal@kernel.org, linux-hyperv@vger.kernel.org,
	netdev@vger.kernel.org, kys@microsoft.com,
	sthemmin@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com,
	davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3,net-next, 1/2] hv_netvsc: Add XDP support
Date: Thu, 23 Jan 2020 08:59:06 -0800	[thread overview]
Message-ID: <20200123085906.20608707@cakuba> (raw)
In-Reply-To: <1579713814-36061-2-git-send-email-haiyangz@microsoft.com>

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@microsoft.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?

  parent reply	other threads:[~2020-01-23 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 17:23 [PATCH V3,net-next, 0/2] hv_netvsc: Add XDP support Haiyang Zhang
2020-01-22 17:23 ` [PATCH V3,net-next, 1/2] " Haiyang Zhang
2020-01-22 19:51   ` Jesper Dangaard Brouer
2020-01-22 20:29     ` Haiyang Zhang
2020-01-23 16:59   ` Jakub Kicinski [this message]
2020-01-23 17:14     ` Haiyang Zhang
2020-01-23 17:30       ` Jakub Kicinski
2020-01-23 17:44         ` Haiyang Zhang
2020-01-22 17:23 ` [PATCH V3,net-next, 2/2] hv_netvsc: Update document for " Haiyang Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200123085906.20608707@cakuba \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox