XDP-Newbies Archive mirror
 help / color / mirror / Atom feed
From: Magnus Karlsson <magnus.karlsson@gmail.com>
To: Dan Siemon <dan@coverfire.com>
Cc: Xdp <xdp-newbies@vger.kernel.org>
Subject: Re: AF_XDP Rx and overload
Date: Mon, 3 May 2021 10:31:10 +0200	[thread overview]
Message-ID: <CAJ8uoz3vFize=OW6HhFvMMVabsdioywUSC09sTz4mSOmnjT-0Q@mail.gmail.com> (raw)
In-Reply-To: <0b0ebcc691f6dfeb560c2faf1e329e059cbecc2d.camel@coverfire.com>

On Fri, Apr 30, 2021 at 7:24 PM Dan Siemon <dan@coverfire.com> wrote:
>
> When an AF_XDP based application is overloaded, it is preferable for
> the application to:
> * Service the Rx ring as fast as it can and drop in the application if
> required?
> * Let the Rx ring fill up and let the NIC drop?

Let the NIC drop, since this is much faster. And always process Tx
first, if you have such a component. This alleviates buffering
problems and makes sure you get as much as possible out of the system
to the devices that want your packets. You generally want to get as
many packets through your whole processing pipeline, not trying to
receive as many packets as possible (and not getting them the whole
way through).

>
> This is mostly a performance/PPS question. Obviously the application
> loses the ability to directly count the drops if the NIC drops among
> other limitations.

You will not be able to keep up counting anyway :-). It is not
possible to count all drops in user-space (or the kernel). You would
need HW support for this. Just think of blasting 162 Mpps at one port
and trying to count the drops in the CPU. Would need a lot of cores
for just that.

> If it makes a difference, the use case is only i40e right now.
>

      reply	other threads:[~2021-05-03  8:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 17:24 AF_XDP Rx and overload Dan Siemon
2021-05-03  8:31 ` Magnus Karlsson [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='CAJ8uoz3vFize=OW6HhFvMMVabsdioywUSC09sTz4mSOmnjT-0Q@mail.gmail.com' \
    --to=magnus.karlsson@gmail.com \
    --cc=dan@coverfire.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).