All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: David Ahern <dsahern@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	David Ahern <dahern@digitalocean.com>,
	Jason Wang <jasowang@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH RFC net-next] virtio_net: Relax queue requirement for using XDP
Date: Tue, 25 Feb 2020 17:37:48 -0800	[thread overview]
Message-ID: <20200225173748.7429cd8c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20200226005744.1623-1-dsahern@kernel.org>

On Tue, 25 Feb 2020 17:57:44 -0700 David Ahern wrote:
> From: David Ahern <dahern@digitalocean.com>
> 
> virtio_net currently requires extra queues to install an XDP program,
> with the rule being twice as many queues as vcpus. From a host
> perspective this means the VM needs to have 2*vcpus vhost threads
> for each guest NIC for which XDP is to be allowed. For example, a
> 16 vcpu VM with 2 tap devices needs 64 vhost threads.
> 
> The extra queues are only needed in case an XDP program wants to
> return XDP_TX. XDP_PASS, XDP_DROP and XDP_REDIRECT do not need
> additional queues. Relax the queue requirement and allow XDP
> functionality based on resources. If an XDP program is loaded and
> there are insufficient queues, then return a warning to the user
> and if a program returns XDP_TX just drop the packet. This allows
> the use of the rest of the XDP functionality to work without
> putting an unreasonable burden on the host.
> 
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: David Ahern <dahern@digitalocean.com>

The plan^W hope in my head was that Magnus will expose more info about
NIC queues. Then we can introduce a "manual queue setup" mode for XDP,
where users is responsible for making sure that the cores they care
about have TX/REDIRECT queues (with or without an XDP program attached).
Right now the XDP queues are entirely invisible.

That's just FWIW, in absence of actual code - regardless if it's an
obvious or pointless idea - it may not have much weight in this
discussion..

  reply	other threads:[~2020-02-26  1:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  0:57 [PATCH RFC net-next] virtio_net: Relax queue requirement for using XDP David Ahern
2020-02-26  1:37 ` Jakub Kicinski [this message]
2020-02-26  3:00 ` Jason Wang
2020-02-26  3:24   ` David Ahern
2020-02-26  3:29     ` Jason Wang
2020-02-26  3:34       ` David Ahern
2020-02-26  3:52         ` Jason Wang
2020-02-26  4:35           ` David Ahern
2020-02-26  5:51             ` Jason Wang
2020-02-26  8:19     ` Toke Høiland-Jørgensen
2020-02-26  8:23       ` Michael S. Tsirkin
2020-02-26  8:34         ` Toke Høiland-Jørgensen
2020-02-26  8:42           ` Michael S. Tsirkin
2020-02-26  9:02             ` Toke Høiland-Jørgensen
2020-02-26  9:32               ` Michael S. Tsirkin
2020-02-26 15:58           ` David Ahern
2020-02-26 16:21             ` Toke Høiland-Jørgensen
2020-02-26 17:08             ` Michael S. Tsirkin
2020-02-26 21:31               ` Toke Høiland-Jørgensen
2020-02-27  3:27           ` David Ahern
2020-02-27 10:19             ` Toke Høiland-Jørgensen
2020-02-27 10:41               ` Magnus Karlsson
2020-09-28  3:13                 ` David Ahern
2020-09-28 14:25                   ` Magnus Karlsson
2020-09-29  2:44                     ` David Ahern
2020-02-26  6:48   ` Michael S. Tsirkin
2020-02-26  7:28     ` Jason Wang
2020-02-26  8:21       ` Michael S. Tsirkin
2020-02-26  6:43 ` Michael S. Tsirkin

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=20200225173748.7429cd8c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=dahern@digitalocean.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.