From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: netdev@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, alan.maguire@oracle.com,
Willem de Bruijn <willemb@google.com>
Subject: [PATCH bpf-next v2 00/13] bpf tc tunneling
Date: Fri, 22 Mar 2019 11:14:51 -0400 [thread overview]
Message-ID: <20190322151504.89983-1-willemdebruijn.kernel@gmail.com> (raw)
From: Willem de Bruijn <willemb@google.com>
BPF allows for dynamic tunneling, choosing the tunnel destination and
features on-demand. Extend bpf_skb_adjust_room to allow for efficient
tunneling at the TC hooks.
Most features are required for large packets with GSO, as these will
be modified after this patch.
Patch 1
is a performance optimization, avoiding an unnecessary unclone
for the TCP hot path.
Patches 2..6
introduce a regression test. These can be squashed, but the code is
arguably more readable when gradually expanding the feature set.
Patch 7
is a performance optimization, avoid copying network headers
that are going to be overwritten. This also simplifies the bpf
program.
Patch 8
reenables bpf_skb_adjust_room for UDP packets.
Patch 9
configures skb tunneling metadata analogous to tunnel devices.
Patches 10..13
expand the regression test to make use of the new features and
enable the GSO testcases.
Changes v1->v2
- move BPF_F_ADJ_ROOM_MASK out of uapi as it can be expanded
- document new flags
- in tests replace netcat -q flag with coreutils timeout:
the -q flag is not supported in all netcat versions
Willem de Bruijn (13):
bpf: in bpf_skb_adjust_room avoid copy in tx fast path
selftests/bpf: bpf tunnel encap test
selftests/bpf: expand bpf tunnel test with decap
selftests/bpf: expand bpf tunnel test to ipv6
selftests/bpf: extend bpf tunnel test with gre
selftests/bpf: extend bpf tunnel test with tso
bpf: add bpf_skb_adjust_room mode BPF_ADJ_ROOM_MAC
bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_FIXED_GSO
bpf: add bpf_skb_adjust_room encap flags
bpf: Sync bpf.h to tools
selftests/bpf: convert bpf tunnel test to BPF_ADJ_ROOM_MAC
selftests/bpf: convert bpf tunnel test to BPF_F_ADJ_ROOM_FIXED_GSO
selftests/bpf: convert bpf tunnel test to encap modes
include/uapi/linux/bpf.h | 32 ++-
net/core/filter.c | 129 +++++++--
tools/include/uapi/linux/bpf.h | 32 ++-
tools/testing/selftests/bpf/Makefile | 3 +-
tools/testing/selftests/bpf/config | 2 +
.../selftests/bpf/progs/test_tc_tunnel.c | 261 ++++++++++++++++++
tools/testing/selftests/bpf/test_tc_tunnel.sh | 178 ++++++++++++
7 files changed, 601 insertions(+), 36 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/test_tc_tunnel.c
create mode 100755 tools/testing/selftests/bpf/test_tc_tunnel.sh
--
2.21.0.392.gf8f6787159e-goog
next reply other threads:[~2019-03-22 15:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 15:14 Willem de Bruijn [this message]
2019-03-22 15:14 ` [PATCH bpf-next v2 01/13] bpf: in bpf_skb_adjust_room avoid copy in tx fast path Willem de Bruijn
2019-03-22 15:14 ` [PATCH bpf-next v2 02/13] selftests/bpf: bpf tunnel encap test Willem de Bruijn
2019-03-22 15:14 ` [PATCH bpf-next v2 03/13] selftests/bpf: expand bpf tunnel test with decap Willem de Bruijn
2019-03-22 15:14 ` [PATCH bpf-next v2 04/13] selftests/bpf: expand bpf tunnel test to ipv6 Willem de Bruijn
2019-03-22 15:14 ` [PATCH bpf-next v2 05/13] selftests/bpf: extend bpf tunnel test with gre Willem de Bruijn
2019-03-22 15:14 ` [PATCH bpf-next v2 06/13] selftests/bpf: extend bpf tunnel test with tso Willem de Bruijn
2019-03-22 15:14 ` [PATCH bpf-next v2 07/13] bpf: add bpf_skb_adjust_room mode BPF_ADJ_ROOM_MAC Willem de Bruijn
2019-03-22 15:14 ` [PATCH bpf-next v2 08/13] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_FIXED_GSO Willem de Bruijn
2019-03-22 15:15 ` [PATCH bpf-next v2 09/13] bpf: add bpf_skb_adjust_room encap flags Willem de Bruijn
2019-03-22 15:44 ` Alexei Starovoitov
2019-03-22 15:47 ` Willem de Bruijn
2019-03-22 16:11 ` Alexei Starovoitov
2019-03-22 16:31 ` Willem de Bruijn
2019-03-22 15:15 ` [PATCH bpf-next v2 10/13] bpf: Sync bpf.h to tools Willem de Bruijn
2019-03-22 15:15 ` [PATCH bpf-next v2 11/13] selftests/bpf: convert bpf tunnel test to BPF_ADJ_ROOM_MAC Willem de Bruijn
2019-03-22 15:15 ` [PATCH bpf-next v2 12/13] selftests/bpf: convert bpf tunnel test to BPF_F_ADJ_ROOM_FIXED_GSO Willem de Bruijn
2019-03-22 15:15 ` [PATCH bpf-next v2 13/13] selftests/bpf: convert bpf tunnel test to encap modes Willem de Bruijn
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=20190322151504.89983-1-willemdebruijn.kernel@gmail.com \
--to=willemdebruijn.kernel@gmail.com \
--cc=alan.maguire@oracle.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.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).