All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: David Ahern <dsahern@gmail.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>
Cc: "xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>
Subject: Re: error loading xdp program on virtio nic
Date: Mon, 25 Nov 2019 10:48:19 +0800	[thread overview]
Message-ID: <8041b387-5cfb-7a57-fc01-9be6967d8658@redhat.com> (raw)
In-Reply-To: <8324a37e-5507-2ae6-53f6-949c842537e0@gmail.com>


On 2019/11/22 下午11:43, David Ahern wrote:
> On 11/21/19 11:09 PM, Jason Wang wrote:
>>> Doubling the number of queues for each tap device adds overhead to the
>>> hypervisor if you only want to allow XDP_DROP or XDP_DIRECT. Am I
>>> understanding that correctly?
>>
>> Yes, but there's almost impossible to know whether or not XDP_TX will be
>> used by the program. If we don't use per CPU TX queue, it must be
>> serialized through locks, not sure it's worth try that (not by default,
>> of course).
>>
> This restriction is going to prevent use of XDP in VMs in general cloud
> hosting environments. 2x vhost threads for vcpus is a non-starter.
>
> If one XDP feature has high resource needs, then we need to subdivide
> the capabilities to let some work and others fail. For example, a flag
> can be added to xdp_buff / xdp_md that indicates supported XDP features.
> If there are insufficient resources for XDP_TX, do not show support for
> it. If a program returns XDP_TX anyways, packets will be dropped.
>

Or we can just:
- If queues is sufficient, using per-cpu TX queue
- If not, synchronize through spinlocks (like what TAP did right now, 
since there's no easy way to have more queues on the fly)

Thanks

      parent reply	other threads:[~2019-11-25  2:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20 17:52 error loading xdp program on virtio nic David Ahern
2019-11-21  3:26 ` Jason Wang
2019-11-21  3:35   ` David Ahern
2019-11-21  3:54     ` Jason Wang
2019-11-21  4:05       ` David Ahern
2019-11-21  6:26         ` Jesper Dangaard Brouer
2019-11-21  7:02           ` Jason Wang
2019-11-21 15:49             ` David Ahern
2019-11-22  6:09               ` Jason Wang
2019-11-22 15:43                 ` David Ahern
2019-11-22 16:50                   ` Jakub Kicinski
2019-11-22 16:57                   ` Jesper Dangaard Brouer
2019-11-22 17:42                     ` David Ahern
2019-11-23 13:27                       ` Toke Høiland-Jørgensen
2019-11-23 13:27                         ` Toke Høiland-Jørgensen
2019-11-25  2:42                     ` Jason Wang
2019-11-25  2:48                   ` Jason Wang [this message]

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=8041b387-5cfb-7a57-fc01-9be6967d8658@redhat.com \
    --to=jasowang@redhat.com \
    --cc=brouer@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=xdp-newbies@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.