Netdev Archive on
help / color / mirror / Atom feed
From: Daniel Borkmann <>
To: Magnus Karlsson <>,,,,
Subject: Re: [PATCH bpf-next] samples/bpf: optimize l2fwd performance in xdpsock
Date: Mon, 31 Aug 2020 23:02:33 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 8/28/20 2:51 PM, Magnus Karlsson wrote:
> Optimize the throughput performance of the l2fwd sub-app in the
> xdpsock sample application by removing a duplicate syscall and
> increasing the size of the fill ring.
> The latter needs some further explanation. We recommend that you set
> the fill ring size >= HW RX ring size + AF_XDP RX ring size. Make sure
> you fill up the fill ring with buffers at regular intervals, and you
> will with this setting avoid allocation failures in the driver. These
> are usually quite expensive since drivers have not been written to
> assume that allocation failures are common. For regular sockets,
> kernel allocated memory is used that only runs out in OOM situations
> that should be rare.
> These two performance optimizations together lead to a 6% percent
> improvement for the l2fwd app on my machine.
> Signed-off-by: Magnus Karlsson <>

Applied, thanks!

      reply	other threads:[~2020-08-31 21:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 12:51 Magnus Karlsson
2020-08-31 21:02 ` Daniel Borkmann [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:

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

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH bpf-next] samples/bpf: optimize l2fwd performance in xdpsock' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).