Netdev List
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org, Daniel Borkmann <borkmann@iogearbox.net>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: songliubraving@fb.com, "Toke Høiland-Jørgensen" <toke@toke.dk>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>,
	ecree@solarflare.com, bpf@vger.kernel.org
Subject: [PATCH bpf-next V2 0/4] Bulk optimization for XDP cpumap redirect
Date: Fri, 12 Apr 2019 17:07:27 +0200	[thread overview]
Message-ID: <155508158877.23650.13330504000013024259.stgit@firesoul> (raw)

This patchset utilize a number of different kernel bulk APIs for optimizing
the performance for the XDP cpumap redirect feature.

Benchmark details are available here:
 https://github.com/xdp-project/xdp-project/blob/master/areas/cpumap/cpumap03-optimizations.org

Performance measurements can be considered micro benchmarks, as they measure
dropping packets at different stages in the network stack.
Summary based on above:

Baseline benchmarks
- baseline-redirect: UdpNoPorts: 3,180,074
- baseline-redirect: iptables-raw drop: 6,193,534

Patch1: bpf: cpumap use ptr_ring_consume_batched
- redirect: UdpNoPorts: 3,327,729
- redirect: iptables-raw drop: 6,321,540

Patch2: net: core: introduce build_skb_around
- redirect: UdpNoPorts: 3,221,303
- redirect: iptables-raw drop: 6,320,066

Patch3: bpf: cpumap do bulk allocation of SKBs
- redirect: UdpNoPorts: 3,290,563
- redirect: iptables-raw drop: 6,650,112

Patch4: bpf: cpumap memory prefetchw optimizations for struct page
- redirect: UdpNoPorts: 3,520,250
- redirect: iptables-raw drop: 7,649,604

In this V2 submission I have chosen drop the SKB-list patch using
netif_receive_skb_list() as it was not showing a performance improvement for
these micro benchmarks.

---

Jesper Dangaard Brouer (4):
      bpf: cpumap use ptr_ring_consume_batched
      net: core: introduce build_skb_around
      bpf: cpumap do bulk allocation of SKBs
      bpf: cpumap memory prefetchw optimizations for struct page


 include/linux/skbuff.h |    2 +
 kernel/bpf/cpumap.c    |   53 +++++++++++++++++++++++++-----------
 net/core/skbuff.c      |   71 +++++++++++++++++++++++++++++++++++-------------
 3 files changed, 91 insertions(+), 35 deletions(-)

--

             reply	other threads:[~2019-04-12 15:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 15:07 Jesper Dangaard Brouer [this message]
2019-04-12 15:07 ` [PATCH bpf-next V2 1/4] bpf: cpumap use ptr_ring_consume_batched Jesper Dangaard Brouer
2019-04-12 15:07 ` [PATCH bpf-next V2 2/4] net: core: introduce build_skb_around Jesper Dangaard Brouer
2019-04-12 17:59   ` Song Liu
2019-04-17  3:01   ` Alexei Starovoitov
2019-04-17  5:20     ` Eric Dumazet
2019-04-12 15:07 ` [PATCH bpf-next V2 3/4] bpf: cpumap do bulk allocation of SKBs Jesper Dangaard Brouer
2019-04-12 18:01   ` Song Liu
2019-04-12 15:07 ` [PATCH bpf-next V2 4/4] bpf: cpumap memory prefetchw optimizations for struct page Jesper Dangaard Brouer
2019-04-18  2:15 ` [PATCH bpf-next V2 0/4] Bulk optimization for XDP cpumap redirect Alexei Starovoitov

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=155508158877.23650.13330504000013024259.stgit@firesoul \
    --to=brouer@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=borkmann@iogearbox.net \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=toke@toke.dk \
    /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