All of lore.kernel.org
 help / color / mirror / Atom feed
* [External] [PATCH bpf-next v3 0/3] Add source ip in bpf tunnel key
@ 2022-04-17 23:17 fankaixi.li
  0 siblings, 0 replies; only message in thread
From: fankaixi.li @ 2022-04-17 23:17 UTC (permalink / raw)
  To: kafai, songliubraving, yhs, john.fastabend, kpsingh, bpf
  Cc: ast, andrii, daniel, Kaixi Fan

From: Kaixi Fan <fankaixi.li@bytedance.com>

Now bpf code could not set tunnel source ip address of ip tunnel. So it
could not support flow based tunnel mode completely. Because flow based
tunnel mode could set tunnel source, destination ip address and tunnel
key simultaneously.

Flow based tunnel is useful for overlay networks. And by configuring tunnel
source ip address, user could make their networks more elastic.
For example, tunnel source ip could be used to select different egress
nic interface for different flows with same tunnel destination ip. Another
example, user could choose one of multiple ip address of the egress nic
interface as the packet's tunnel source ip.

Add tunnel and tunnel source testcases in test_progs.

v3:
- move vxlan tunnel testcases to test_progs
- replace bpf_trace_printk with bpf_printk
- rename bpf kernel prog section name to tic

v2:
- merge vxlan tunnel and tunnel source ip testcases in test_tunnel.sh

Kaixi Fan (3):
  bpf: Add source ip in "struct bpf_tunnel_key"
  selftests/bpf: move vxlan tunnel testcases to test_progs
  selftests/bpf: replace bpf_trace_printk in tunnel kernel code

 include/uapi/linux/bpf.h                      |   4 +
 net/core/filter.c                             |   9 +
 tools/include/uapi/linux/bpf.h                |   4 +
 .../selftests/bpf/prog_tests/test_tunnel.c    | 461 ++++++++++++++++++
 .../selftests/bpf/progs/test_tunnel_kern.c    | 282 ++++++-----
 tools/testing/selftests/bpf/test_tunnel.sh    | 124 +----
 6 files changed, 646 insertions(+), 238 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/test_tunnel.c

-- 
2.20.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-17 23:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-17 23:17 [External] [PATCH bpf-next v3 0/3] Add source ip in bpf tunnel key fankaixi.li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.