From: Stephen Hemminger <stephen@networkplumber.org>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com, daniel@iogearbox.net
Subject: Re: [PATCH iproute2/master 00/11] bpf: pass ifindex for bpf offload
Date: Sun, 26 Nov 2017 11:59:44 -0800 [thread overview]
Message-ID: <20171126115944.4bf1f842@xeon-e3> (raw)
In-Reply-To: <20171124021208.13419-1-jakub.kicinski@netronome.com>
On Thu, 23 Nov 2017 18:11:57 -0800
Jakub Kicinski <jakub.kicinski@netronome.com> wrote:
> Hi!
>
> This series allows us to pass ifindex automatically when we
> set up TC cls_bpf or XDP offload. There is a fair bit of
> refactoring to separate the parse and load stages of lib/bpf.c.
> In case of TC the skip_sw flag may come after the program
> arguments (e.g. "bpf obj prog.o da skip_sw"), so we can't
> just load the program as we parse the arguments. Note that
> this impacts only loading of the program, all other supported
> methods of finding a program (pinned, bytecode, bytefile-file)
> are handled as previously, the load call will do nothing for
> them.
>
> To simplify the implementation f_bpf and m_bpf will no longer
> allow specifying programs multiple times. Device ifindex is
> also resolved before running filter-specific code.
>
>
> Jakub Kicinski (11):
> bpf: pass program type in struct bpf_cfg_in
> bpf: keep parsed program mode in struct bpf_cfg_in
> bpf: allocate opcode table in struct bpf_cfg_in
> bpf: split parse from program loading
> bpf: rename bpf_parse_common() to bpf_parse_and_load_common()
> bpf: expose bpf_parse_common() and bpf_load_common()
> bpf: allow loading programs for a specific ifindex
> {f,m}_bpf: don't allow specifying multiple bpf programs
> tc_filter: resolve device name before parsing filter
> f_bpf: communicate ifindex for eBPF offload
> iplink: communicate ifindex for xdp offload
>
> include/bpf_util.h | 25 +++++++-
> ip/iplink.c | 4 +-
> ip/iplink_xdp.c | 13 ++++-
> ip/iproute_lwtunnel.c | 3 +-
> ip/xdp.h | 4 +-
> lib/bpf.c | 155 ++++++++++++++++++++++++++++++--------------------
> tc/f_bpf.c | 18 +++++-
> tc/m_bpf.c | 6 +-
> tc/tc_filter.c | 50 ++++++++--------
> 9 files changed, 178 insertions(+), 100 deletions(-)
>
Looks good, applied. Thanks Jakub
next prev parent reply other threads:[~2017-11-26 19:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-24 2:11 [PATCH iproute2/master 00/11] bpf: pass ifindex for bpf offload Jakub Kicinski
2017-11-24 2:11 ` [PATCH iproute2/master 01/11] bpf: pass program type in struct bpf_cfg_in Jakub Kicinski
2017-11-24 2:11 ` [PATCH iproute2/master 02/11] bpf: keep parsed program mode " Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 03/11] bpf: allocate opcode table " Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 04/11] bpf: split parse from program loading Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 05/11] bpf: rename bpf_parse_common() to bpf_parse_and_load_common() Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 06/11] bpf: expose bpf_parse_common() and bpf_load_common() Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 07/11] bpf: allow loading programs for a specific ifindex Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 08/11] {f,m}_bpf: don't allow specifying multiple bpf programs Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 09/11] tc_filter: resolve device name before parsing filter Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 10/11] f_bpf: communicate ifindex for eBPF offload Jakub Kicinski
2017-11-24 2:12 ` [PATCH iproute2/master 11/11] iplink: communicate ifindex for xdp offload Jakub Kicinski
2017-11-26 19:59 ` Stephen Hemminger [this message]
2017-11-29 1:05 ` [iproute2 -net-next] build broken Daniel Borkmann
2017-11-29 2:15 ` Stephen Hemminger
2017-11-29 2:17 ` Stephen Hemminger
2017-11-29 9:09 ` Daniel Borkmann
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=20171126115944.4bf1f842@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=daniel@iogearbox.net \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.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).