bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: brouer@redhat.com, "Björn Töpel" <bjorn.topel@gmail.com>,
	ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org,
	bpf@vger.kernel.org, "Björn Töpel" <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 1/2] bpf, xdp: make bpf_redirect_map() a map operation
Date: Fri, 26 Feb 2021 15:29:54 +0100	[thread overview]
Message-ID: <20210226152954.1dc8e19d@carbon> (raw)
In-Reply-To: <87sg5jys8r.fsf@toke.dk>

On Fri, 26 Feb 2021 12:37:40 +0100
Toke Høiland-Jørgensen <toke@redhat.com> wrote:

> Björn Töpel <bjorn.topel@gmail.com> writes:
> 
> > From: Björn Töpel <bjorn.topel@intel.com>
> >
> > Currently the bpf_redirect_map() implementation dispatches to the
> > correct map-lookup function via a switch-statement. To avoid the
> > dispatching, this change adds bpf_redirect_map() as a map
> > operation. Each map provides its bpf_redirect_map() version, and
> > correct function is automatically selected by the BPF verifier.
> >
> > A nice side-effect of the code movement is that the map lookup
> > functions are now local to the map implementation files, which removes
> > one additional function call.
> >
> > Signed-off-by: Björn Töpel <bjorn.topel@intel.com>  
> 
> Nice! I agree that this is a much nicer approach! :)

I agree :-)

Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer


  parent reply	other threads:[~2021-02-26 14:31 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 [this message]
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 ` [PATCH bpf-next v4 0/2] Optimize bpf_redirect_map()/xdp_do_redirect() Toke Høiland-Jørgensen
2021-02-26 11:38   ` 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=20210226152954.1dc8e19d@carbon \
    --to=brouer@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 \
    --cc=toke@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).