bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: "Björn Töpel" <bjorn.topel@gmail.com>,
	ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org,
	bpf@vger.kernel.org
Cc: "Björn Töpel" <bjorn.topel@gmail.com>,
	bjorn.topel@intel.com, maciej.fijalkowski@intel.com,
	hawk@kernel.org, magnus.karlsson@intel.com,
	john.fastabend@gmail.com, kuba@kernel.org, davem@davemloft.net
Subject: Re: [PATCH bpf-next v4 0/2] Optimize bpf_redirect_map()/xdp_do_redirect()
Date: Fri, 26 Feb 2021 12:35:07 +0100	[thread overview]
Message-ID: <87v9afysd0.fsf@toke.dk> (raw)
In-Reply-To: <20210226112322.144927-1-bjorn.topel@gmail.com>

Björn Töpel <bjorn.topel@gmail.com> writes:

> Hi XDP-folks,
>
> This two patch series contain two optimizations for the
> bpf_redirect_map() helper and the xdp_do_redirect() function.
>
> The bpf_redirect_map() optimization is about avoiding the map lookup
> dispatching. Instead of having a switch-statement and selecting the
> correct lookup function, we let bpf_redirect_map() be a map operation,
> where each map has its own bpf_redirect_map() implementation. This way
> the run-time lookup is avoided.
>
> The xdp_do_redirect() patch restructures the code, so that the map
> pointer indirection can be avoided.
>
> Performance-wise I got 3% improvement for XSKMAP
> (sample:xdpsock/rx-drop), and 4% (sample:xdp_redirect_map) on my
> machine.
>
> More details in each commit.
>
> @Jesper/Toke I dropped your Acked-by: on the first patch, since there
> were major restucturing. Please have another look! Thanks!

Will do! Did you update the performance numbers above after that change?

-Toke


  parent reply	other threads:[~2021-02-26 11:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 11:23 [PATCH bpf-next v4 0/2] Optimize bpf_redirect_map()/xdp_do_redirect() Björn Töpel
2021-02-26 11:23 ` [PATCH bpf-next v4 1/2] bpf, xdp: make bpf_redirect_map() a map operation Björn Töpel
2021-02-26 11:37   ` Toke Høiland-Jørgensen
2021-02-26 11:40     ` Björn Töpel
2021-02-26 12:04       ` Björn Töpel
2021-02-26 12:26         ` Toke Høiland-Jørgensen
2021-02-26 14:28           ` Jesper Dangaard Brouer
2021-02-26 14:27       ` Jesper Dangaard Brouer
2021-02-26 14:29     ` Jesper Dangaard Brouer
2021-02-26 15:23   ` kernel test robot
2021-02-26 21:48   ` Daniel Borkmann
2021-02-27  9:04     ` Björn Töpel
2021-02-27 10:22       ` Daniel Borkmann
2021-02-26 11:23 ` [PATCH bpf-next v4 2/2] bpf, xdp: restructure redirect actions Björn Töpel
2021-02-26 11:35 ` Toke Høiland-Jørgensen [this message]
2021-02-26 11:38   ` [PATCH bpf-next v4 0/2] Optimize bpf_redirect_map()/xdp_do_redirect() Björn Töpel
2021-02-26 11:43     ` Toke Høiland-Jørgensen

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=87v9afysd0.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@gmail.com \
    --cc=bjorn.topel@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@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 NNTP newsgroup(s).