From: Stanislav Fomichev <sdf@google.com>
To: bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, song@kernel.org, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org,
David Ahern <dsahern@gmail.com>, Jakub Kicinski <kuba@kernel.org>,
Willem de Bruijn <willemb@google.com>,
Jesper Dangaard Brouer <brouer@redhat.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Alexander Lobakin <alexandr.lobakin@intel.com>,
Magnus Karlsson <magnus.karlsson@gmail.com>,
Maryam Tahhan <mtahhan@redhat.com>,
xdp-hints@xdp-project.net, netdev@vger.kernel.org
Subject: [xdp-hints] [PATCH bpf-next v6 00/17] xdp: hints via kfuncs
Date: Wed, 4 Jan 2023 13:59:32 -0800 [thread overview]
Message-ID: <20230104215949.529093-1-sdf@google.com> (raw)
Please see the first patch in the series for the overall
design and use-cases.
See the following email from Toke for the per-packet metadata overhead:
https://lore.kernel.org/bpf/20221206024554.3826186-1-sdf@google.com/T/#m49d48ea08d525ec88360c7d14c4d34fb0e45e798
Recent changes:
- Reject dev-bound progs at tc (Martin)
- Reuse __bpf_prog_offload_destroy instead of adding
__bpf_prog_dev_bound_destroy (Marin)
- Drop a bunch of unnecessary NULL checks (Martin)
- Fix compilation of xdp_hw_metadata (Martin and thank you David for the hints)
- Move bpf_dev_bound_kfunc_check into offload.c (Martin)
- Swap "ip netns del" and close_netns in the selftest (Martin)
- Move some code out of bpf_devs_lock (Martin)
- Remove some excessive gotos (Martin)
- Trigger bpf_prog_dev_bound_inherit for BPF_PROG_TYPE_EXT only when
the destination program is dev-bound (Martin)
- Document @xdp_metadata_ops (David)
- Use :identifiers: when referencing metadata kfuns in the doc (David)
- Spelling and teletyping fixes for the doc (David)
- Add a note about xsk_umem__get_data and METADATA_SIZE (David)
Prior art (to record pros/cons for different approaches):
- Stable UAPI approach:
https://lore.kernel.org/bpf/20220628194812.1453059-1-alexandr.lobakin@intel.com/
- Metadata+BTF_ID appoach:
https://lore.kernel.org/bpf/166256538687.1434226.15760041133601409770.stgit@firesoul/
- v5:
https://lore.kernel.org/bpf/20221220222043.3348718-1-sdf@google.com/
- v4:
https://lore.kernel.org/bpf/20221213023605.737383-1-sdf@google.com/
- v3:
https://lore.kernel.org/bpf/20221206024554.3826186-1-sdf@google.com/
- v2:
https://lore.kernel.org/bpf/20221121182552.2152891-1-sdf@google.com/
- v1:
https://lore.kernel.org/bpf/20221115030210.3159213-1-sdf@google.com/
- kfuncs v2 RFC:
https://lore.kernel.org/bpf/20221027200019.4106375-1-sdf@google.com/
- kfuncs v1 RFC:
https://lore.kernel.org/bpf/20221104032532.1615099-1-sdf@google.com/
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Willem de Bruijn <willemb@google.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>
Cc: Magnus Karlsson <magnus.karlsson@gmail.com>
Cc: Maryam Tahhan <mtahhan@redhat.com>
Cc: xdp-hints@xdp-project.net
Cc: netdev@vger.kernel.org
Stanislav Fomichev (13):
bpf: Document XDP RX metadata
bpf: Rename bpf_{prog,map}_is_dev_bound to is_offloaded
bpf: Move offload initialization into late_initcall
bpf: Reshuffle some parts of bpf/offload.c
bpf: Introduce device-bound XDP programs
selftests/bpf: Update expected test_offload.py messages
bpf: XDP metadata RX kfuncs
veth: Introduce veth_xdp_buff wrapper for xdp_buff
veth: Support RX XDP metadata
selftests/bpf: Verify xdp_metadata xdp->af_xdp path
net/mlx4_en: Introduce wrapper for xdp_buff
net/mlx4_en: Support RX XDP metadata
selftests/bpf: Simple program to dump XDP RX metadata
Toke Høiland-Jørgensen (4):
bpf: Support consuming XDP HW metadata from fext programs
xsk: Add cb area to struct xdp_buff_xsk
net/mlx5e: Introduce wrapper for xdp_buff
net/mlx5e: Support RX XDP metadata
Documentation/networking/index.rst | 1 +
Documentation/networking/xdp-rx-metadata.rst | 108 +++++
drivers/net/ethernet/mellanox/mlx4/en_clock.c | 13 +-
.../net/ethernet/mellanox/mlx4/en_netdev.c | 6 +
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 63 ++-
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 5 +
drivers/net/ethernet/mellanox/mlx5/core/en.h | 11 +-
.../net/ethernet/mellanox/mlx5/core/en/xdp.c | 26 +-
.../net/ethernet/mellanox/mlx5/core/en/xdp.h | 11 +-
.../ethernet/mellanox/mlx5/core/en/xsk/rx.c | 35 +-
.../ethernet/mellanox/mlx5/core/en/xsk/rx.h | 2 +
.../net/ethernet/mellanox/mlx5/core/en_main.c | 6 +
.../net/ethernet/mellanox/mlx5/core/en_rx.c | 99 ++--
drivers/net/netdevsim/bpf.c | 4 -
drivers/net/veth.c | 87 +++-
include/linux/bpf.h | 61 ++-
include/linux/netdevice.h | 8 +
include/net/xdp.h | 21 +
include/net/xsk_buff_pool.h | 5 +
include/uapi/linux/bpf.h | 5 +
kernel/bpf/core.c | 12 +-
kernel/bpf/offload.c | 426 ++++++++++++------
kernel/bpf/syscall.c | 40 +-
kernel/bpf/verifier.c | 38 +-
net/bpf/test_run.c | 3 +
net/core/dev.c | 9 +-
net/core/filter.c | 2 +-
net/core/xdp.c | 64 +++
tools/include/uapi/linux/bpf.h | 5 +
tools/testing/selftests/bpf/.gitignore | 1 +
tools/testing/selftests/bpf/Makefile | 9 +-
.../selftests/bpf/prog_tests/xdp_metadata.c | 410 +++++++++++++++++
.../selftests/bpf/progs/xdp_hw_metadata.c | 81 ++++
.../selftests/bpf/progs/xdp_metadata.c | 64 +++
.../selftests/bpf/progs/xdp_metadata2.c | 23 +
tools/testing/selftests/bpf/test_offload.py | 10 +-
tools/testing/selftests/bpf/xdp_hw_metadata.c | 405 +++++++++++++++++
tools/testing/selftests/bpf/xdp_metadata.h | 15 +
38 files changed, 1902 insertions(+), 292 deletions(-)
create mode 100644 Documentation/networking/xdp-rx-metadata.rst
create mode 100644 tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
create mode 100644 tools/testing/selftests/bpf/progs/xdp_hw_metadata.c
create mode 100644 tools/testing/selftests/bpf/progs/xdp_metadata.c
create mode 100644 tools/testing/selftests/bpf/progs/xdp_metadata2.c
create mode 100644 tools/testing/selftests/bpf/xdp_hw_metadata.c
create mode 100644 tools/testing/selftests/bpf/xdp_metadata.h
--
2.39.0.314.g84b9a713c41-goog
next reply other threads:[~2023-01-04 21:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 21:59 Stanislav Fomichev [this message]
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 01/17] bpf: Document XDP RX metadata Stanislav Fomichev
2023-01-06 15:09 ` [xdp-hints] " David Vernet
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 02/17] bpf: Rename bpf_{prog,map}_is_dev_bound to is_offloaded Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 03/17] bpf: Move offload initialization into late_initcall Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 04/17] bpf: Reshuffle some parts of bpf/offload.c Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 05/17] bpf: Introduce device-bound XDP programs Stanislav Fomichev
2023-01-06 0:41 ` [xdp-hints] " Martin KaFai Lau
2023-01-06 17:17 ` Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 06/17] selftests/bpf: Update expected test_offload.py messages Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 07/17] bpf: XDP metadata RX kfuncs Stanislav Fomichev
2023-01-06 0:47 ` [xdp-hints] " Martin KaFai Lau
2023-01-06 17:17 ` Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 09/17] veth: Introduce veth_xdp_buff wrapper for xdp_buff Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 10/17] veth: Support RX XDP metadata Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 11/17] selftests/bpf: Verify xdp_metadata xdp->af_xdp path Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 12/17] net/mlx4_en: Introduce wrapper for xdp_buff Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 13/17] net/mlx4_en: Support RX XDP metadata Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 14/17] xsk: Add cb area to struct xdp_buff_xsk Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 15/17] net/mlx5e: Introduce wrapper for xdp_buff Stanislav Fomichev
2023-01-08 7:38 ` [xdp-hints] " Tariq Toukan
2023-01-09 22:44 ` Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 16/17] net/mlx5e: Support RX XDP metadata Stanislav Fomichev
2023-01-06 1:08 ` [xdp-hints] " Martin KaFai Lau
2023-01-08 7:38 ` Tariq Toukan
2023-01-09 22:44 ` Stanislav Fomichev
2023-01-04 21:59 ` [xdp-hints] [PATCH bpf-next v6 17/17] selftests/bpf: Simple program to dump XDP RX metadata Stanislav Fomichev
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
List information: https://lists.xdp-project.net/postorius/lists/xdp-hints.xdp-project.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230104215949.529093-1-sdf@google.com \
--to=sdf@google.com \
--cc=alexandr.lobakin@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=dsahern@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=magnus.karlsson@gmail.com \
--cc=martin.lau@linux.dev \
--cc=mtahhan@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=song@kernel.org \
--cc=willemb@google.com \
--cc=xdp-hints@xdp-project.net \
--cc=yhs@fb.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