bpf: add helper for getting xfrm states
Status from this message: Applied to bpf-next, thanks Eyal!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 1 replyApplied
- v22 patches 4 repliesSuperseded
- v12 patches 2 repliesSuperseded
Changes in v3 from the cover letter
- Kept SPI and peer IPv4 address in state in network byte order following suggestion from Alexei Starovoitov
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf: add helper for getting xfrm statesinclude/ net/ | +72 | 0 replies | |
| 2/2 | samples/bpf: extend test_tunnel_bpf.sh with xfrm state testsamples/ samples/ tools/ +1 more | +114 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH bpf-next,v3 0/2] bpf: add helper for getting xfrm states
This patchset adds support for fetching XFRM state information from an eBPF program called from TC.
The first patch introduces a helper for fetching an XFRM state from the skb's secpath. The XFRM state is modeled using a new virtual struct which contains the SPI, peer address, and reqid values of the state; This struct can be extended in the future to provide additional state information.
The second patch adds a test example in test_tunnel_bpf.sh. The sample validates the correct extraction of state information by the eBPF program.
---
v3:
- Kept SPI and peer IPv4 address in state in network byte order following suggestion from Alexei Starovoitov
v2:
- Fixed two comments by Daniel Borkmann:
- disallow reserved flags in helper call
- avoid compiling in helper code when CONFIG_XFRM is off
Eyal Birger (2):
bpf: add helper for getting xfrm states samples/bpf: extend test_tunnel_bpf.sh with xfrm state test
include/uapi/linux/bpf.h | 25 ++++++++++- net/core/filter.c | 48 +++++++++++++++++++++ samples/bpf/tcbpf2_kern.c | 16 +++++++ samples/bpf/test_tunnel_bpf.sh | 71 +++++++++++++++++++++++++++++++ tools/include/uapi/linux/bpf.h | 25 ++++++++++- tools/testing/selftests/bpf/bpf_helpers.h | 4 +- 6 files changed, 186 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4