bpf: Allow any source IP in bpf_skb_set_tunnel_key
Status from this message: This series was applied to bpf/bpf-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 0 repliesApplied 5/5
- v25 patches 4 repliesSuperseded
- v15 patches 3 repliesSuperseded
Changes in v3 from the cover letter
- Rebased on top of bpf-next.
- Reworked the last patch, for the selftests. Several changes were required to the existing vxlan_tunnel test to be able to test the change in the bpf_skb_set_tunnel_key helper.
- Apart from the rebase, only the last selftests patch changed, so I kept the Reviewed-by and Acked-by tags on other patches.
Patches in v3 All 5 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | ip_tunnels: Add new flow flags field to ip_tunnel_keyinclude/ | +1 | 0 replies | Applied |
| 2/5 | vxlan: Use ip_tunnel_key flow flags in route lookupsdrivers/ | +7 | 0 replies | Applied |
| 3/5 | geneve: Use ip_tunnel_key flow flags in route lookupsdrivers/ | +1 | 0 replies | Applied |
| 4/5 | bpf: Set flow flag to allow any source IP in bpf_tunnel_keynet/ | +1 | 0 replies | Applied |
| 5/5 | selftests/bpf: Don't assign outer source IP to hosttools/ tools/ | +86 | 0 replies | Applied |
Reviews trailers per patch
4 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Martin KaFai Lau | Nikolay Aleksandrov |
|---|---|---|
| 1/5 | A-b | R-b |
| 2/5 | A-b | R-b |
| 3/5 | A-b | R-b |
| 4/5 | A-b | R-b |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next v3 0/5] bpf: Allow any source IP in bpf_skb_set_tunnel_key
Commit 26101f5ab6bd ("bpf: Add source ip in "struct bpf_tunnel_key"") added support for getting and setting the outer source IP of encapsulated packets via the bpf_skb_{get,set}_tunnel_key BPF helper. This change allows BPF programs to set any IP address as the source, including for example the IP address of a container running on the same host.
In that last case, however, the encapsulated packets are dropped when looking up the route because the source IP address isn't assigned to any interface on the host. To avoid this, we need to set the FLOWI_FLAG_ANYSRC flag.
Changes in v3:
- Rebased on top of bpf-next.
- Reworked the last patch, for the selftests. Several changes were required to the existing vxlan_tunnel test to be able to test the change in the bpf_skb_set_tunnel_key helper.
- Apart from the rebase, only the last selftests patch changed, so I kept the Reviewed-by and Acked-by tags on other patches.
Changes in v2:
- Removed changes to IPv6 code paths as they are unnecessary.
Paul Chaignon (5):
ip_tunnels: Add new flow flags field to ip_tunnel_key
vxlan: Use ip_tunnel_key flow flags in route lookups
geneve: Use ip_tunnel_key flow flags in route lookups
bpf: Set flow flag to allow any source IP in bpf_tunnel_key selftests/bpf: Don't assign outer source IP to host
drivers/net/geneve.c | 1 + drivers/net/vxlan/vxlan_core.c | 11 ++- include/net/ip_tunnels.h | 1 + net/core/filter.c | 1 + .../selftests/bpf/prog_tests/test_tunnel.c | 17 +++- .../selftests/bpf/progs/test_tunnel_kern.c | 80 ++++++++++++++++--- 6 files changed, 96 insertions(+), 15 deletions(-)
Signature · 1 line
2.25.1