public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 bpf-next 0/4] bpf: Support setting variable-length tunnel options
@ 2022-08-23 13:30 Shmulik Ladkani
  2022-08-23 13:30 ` [PATCH v4 bpf-next 1/4] bpf: Add 'bpf_dynptr_get_data' helper Shmulik Ladkani
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Shmulik Ladkani @ 2022-08-23 13:30 UTC (permalink / raw)
  To: bpf, Alexei Starovoitov, Daniel Borkmann, John Fastabend
  Cc: Andrii Nakryiko, Paul Chaignon, Shmulik Ladkani

Introduce 'skb_set_tunnel_opt_dynptr' to allow setting tunnel options of
dynamic length.

v2:
- Place test_tunnel's local route in a custom table, to ensure the IP
  isn't considered assigned to a device.
v3:
- Avoid 'inline' for the __bpf_skb_set_tunopt helper function
v4:
- change API to be based on bpf_dynptr,
  suggested by John Fastabend <john.fastabend@gmail.com>

Shmulik Ladkani (4):
  bpf: Add 'bpf_dynptr_get_data' helper
  bpf: Support setting variable-length tunnel options
  selftests/bpf: Simplify test_tunnel setup for allowing non-local
    tunnel traffic
  selftests/bpf: Add geneve with bpf_skb_set_tunnel_opt_dynptr test-case
    to test_progs

 include/linux/bpf.h                           |   1 +
 include/uapi/linux/bpf.h                      |  12 ++
 kernel/bpf/helpers.c                          |  10 +
 net/core/filter.c                             |  36 +++-
 tools/include/uapi/linux/bpf.h                |  12 ++
 .../selftests/bpf/prog_tests/test_tunnel.c    | 131 ++++++++++--
 .../selftests/bpf/progs/test_tunnel_kern.c    | 200 ++++++++++++------
 7 files changed, 322 insertions(+), 80 deletions(-)

-- 
2.37.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-24  4:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-23 13:30 [PATCH v4 bpf-next 0/4] bpf: Support setting variable-length tunnel options Shmulik Ladkani
2022-08-23 13:30 ` [PATCH v4 bpf-next 1/4] bpf: Add 'bpf_dynptr_get_data' helper Shmulik Ladkani
2022-08-23 19:11   ` Joanne Koong
2022-08-24  4:07     ` Shmulik Ladkani
2022-08-23 13:30 ` [PATCH v4 bpf-next 2/4] bpf: Support setting variable-length tunnel options Shmulik Ladkani
2022-08-23 13:30 ` [PATCH v4 bpf-next 3/4] selftests/bpf: Simplify test_tunnel setup for allowing non-local tunnel traffic Shmulik Ladkani
2022-08-23 13:30 ` [PATCH v4 bpf-next 4/4] selftests/bpf: Add geneve with bpf_skb_set_tunnel_opt_dynptr test-case to test_progs Shmulik Ladkani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox