DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: dev@dpdk.org
Subject: Re: RFC - Tap io_uring PMD
Date: Mon, 11 Nov 2024 21:21:16 -0800	[thread overview]
Message-ID: <20241111212116.28090881@hermes.local> (raw)
In-Reply-To: <ac1b1cde-6218-4c27-b715-f47b40b873ae@redhat.com>

On Wed, 6 Nov 2024 08:46:55 +0100
Maxime Coquelin <maxime.coquelin@redhat.com> wrote:

> Hi Stephen,
> 
> On 10/30/24 22:56, Stephen Hemminger wrote:
> > The current tap device is slow both due to architectural choices and the
> > overhead of Linux system calls. I am exploring a how to fix that but some
> > of the choices require some tradeoffs. Which leads to some open questions:
> > 
> > 1. DPDK tap also support tunnel (TUN) mode where there is no Ethernet header
> >     only L3. Does anyone actually use this? It is different than what every other
> >     PMD expects.
> > 
> > 2. The fastest way to use kernel TAP device would be to use io_uring.
> >     But this was added in 5.1 kernel (2019). Rather than having conditional or
> >     dual mode in DPDK tap device, perhaps there should just be a new PMD tap_uring?
> > 
> > 3. Current TAP device provides hooks for several rte_flow types by playing
> >     games with kernel qdisc. Does anyone really use this? Propose just not doing
> >     this in new tap_uring.
> > 
> > 4. What other features of TAP device beyond basic send/receive make sense?
> >     It looks like new device could support better statistics.
> > 
> > 5. What about Rx interrupt support?
> > 
> > Probably the hardest part of using io_uring is figuring out how to collect
> > completions. The simplest way would be to handle all completions rx and tx
> > in the rx_burst function.
> >   
> 
> Why not just use Virtio-user PMD with Vhost-kernel backend [0]?
> Are there any missing features that io_uring can address?
> 
> Regards,
> Maxime
> 
> [0]: http://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html
> 

Yes, I looked at that but:
  - virtio user ends up with a busy kernel thread which is not acceptable
    in SOC environment where all resources are locked down. In the SOC I was working
    on DPDK was limited to 4 polling isolated CPU's and 1 sleeping main thread.
    The rest of the CPU resources were hard constrained by cgroups. The virtio user
    thread was a problem.

  - virtio user device is not persistent. If DPDK is being used a dataplane, need to
    be able to quickly restart and not disturb applications and routing in the kernel
    while the tap device is unavailable.  I.e having device present but in no carrier
    state is better than having to teach applications about hot plug or play around
    with multiple addresses on loopback device (which is what Cisco routers do).

      parent reply	other threads:[~2024-11-12  5:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 21:56 Stephen Hemminger
2024-10-31 10:27 ` Morten Brørup
2024-11-01  0:34   ` Stephen Hemminger
2024-11-02 22:28     ` Morten Brørup
2024-11-05 18:58       ` Stephen Hemminger
2024-11-05 23:22         ` Morten Brørup
2024-11-05 23:25           ` Stephen Hemminger
2024-11-05 23:54             ` Morten Brørup
2024-11-06  0:52               ` Igor Gutorov
2024-11-07 16:30                 ` Stephen Hemminger
2024-11-06 10:30           ` Konstantin Ananyev
2024-11-06  0:46 ` Varghese, Vipin
2024-11-06  7:46 ` Maxime Coquelin
2024-11-07 21:51   ` Morten Brørup
2024-11-12  5:21   ` Stephen Hemminger [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=20241111212116.28090881@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@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;
as well as URLs for NNTP newsgroup(s).