netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org, martin.lau@kernel.org,
	razor@blackwall.org, ast@kernel.org, andrii@kernel.org,
	john.fastabend@gmail.com, Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH bpf-next 0/8] Add bpf programmable device
Date: Tue, 26 Sep 2023 07:59:05 +0200	[thread overview]
Message-ID: <20230926055913.9859-1-daniel@iogearbox.net> (raw)

This work adds a BPF programmable device which can operate in L3 or L2
mode where the BPF program is part of the xmit routine. It's program
management is done via bpf_mprog and it comes with BPF link support.
For details see patch 1 and following. Thanks!

Daniel Borkmann (8):
  meta, bpf: Add bpf programmable meta device
  meta, bpf: Add bpf link support for meta device
  tools: Sync if_link uapi header
  libbpf: Add link-based API for meta
  bpftool: Implement link show support for meta
  bpftool: Extend net dump with meta progs
  selftests/bpf: Add netlink helper library
  selftests/bpf: Add selftests for meta

 MAINTAINERS                                   |   9 +
 drivers/net/Kconfig                           |   9 +
 drivers/net/Makefile                          |   1 +
 drivers/net/meta.c                            | 943 ++++++++++++++++++
 include/linux/netdevice.h                     |   2 +
 include/net/meta.h                            |  38 +
 include/uapi/linux/bpf.h                      |  13 +
 include/uapi/linux/if_link.h                  |  25 +
 kernel/bpf/syscall.c                          |  30 +-
 .../bpf/bpftool/Documentation/bpftool-net.rst |   8 +-
 tools/bpf/bpftool/link.c                      |   7 +
 tools/bpf/bpftool/net.c                       |   7 +-
 tools/include/uapi/linux/bpf.h                |  13 +
 tools/include/uapi/linux/if_link.h            | 142 +++
 tools/lib/bpf/bpf.c                           |  16 +
 tools/lib/bpf/bpf.h                           |   5 +
 tools/lib/bpf/libbpf.c                        |  61 +-
 tools/lib/bpf/libbpf.h                        |  15 +
 tools/lib/bpf/libbpf.map                      |   1 +
 tools/testing/selftests/bpf/Makefile          |  19 +-
 tools/testing/selftests/bpf/config            |   1 +
 tools/testing/selftests/bpf/netlink_helpers.c | 358 +++++++
 tools/testing/selftests/bpf/netlink_helpers.h |  46 +
 .../selftests/bpf/prog_tests/tc_helpers.h     |   4 +
 .../selftests/bpf/prog_tests/tc_meta.c        | 650 ++++++++++++
 .../selftests/bpf/progs/test_tc_link.c        |  13 +
 26 files changed, 2415 insertions(+), 21 deletions(-)
 create mode 100644 drivers/net/meta.c
 create mode 100644 include/net/meta.h
 create mode 100644 tools/testing/selftests/bpf/netlink_helpers.c
 create mode 100644 tools/testing/selftests/bpf/netlink_helpers.h
 create mode 100644 tools/testing/selftests/bpf/prog_tests/tc_meta.c

-- 
2.34.1


             reply	other threads:[~2023-09-26  5:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26  5:59 Daniel Borkmann [this message]
2023-09-26  5:59 ` [PATCH bpf-next 1/8] meta, bpf: Add bpf programmable meta device Daniel Borkmann
2023-09-26 21:26   ` Stanislav Fomichev
2023-09-28  9:16   ` Toke Høiland-Jørgensen
2023-09-28 12:01     ` Willem de Bruijn
2023-09-28 21:14     ` Daniel Borkmann
2023-09-29 19:25       ` Alexei Starovoitov
2023-10-13 11:26   ` Florian Kauer
2023-09-26  5:59 ` [PATCH bpf-next 2/8] meta, bpf: Add bpf link support for " Daniel Borkmann
2023-09-28  0:12   ` Andrii Nakryiko
2023-09-26  5:59 ` [PATCH bpf-next 3/8] tools: Sync if_link uapi header Daniel Borkmann
2023-09-26  5:59 ` [PATCH bpf-next 4/8] libbpf: Add link-based API for meta Daniel Borkmann
2023-09-26 11:19   ` Quentin Monnet
2023-09-28  0:12   ` Andrii Nakryiko
2023-09-28 21:30     ` Daniel Borkmann
2023-09-26  5:59 ` [PATCH bpf-next 5/8] bpftool: Implement link show support " Daniel Borkmann
2023-09-26 11:19   ` Quentin Monnet
2023-09-26  5:59 ` [PATCH bpf-next 6/8] bpftool: Extend net dump with meta progs Daniel Borkmann
2023-09-26 11:19   ` Quentin Monnet
2023-09-26  5:59 ` [PATCH bpf-next 7/8] selftests/bpf: Add netlink helper library Daniel Borkmann
2023-09-26 21:35   ` Stanislav Fomichev
2023-09-26  5:59 ` [PATCH bpf-next 8/8] selftests/bpf: Add selftests for meta 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=20230926055913.9859-1-daniel@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=martin.lau@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=razor@blackwall.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).