Skip to content

bpf: Fix l3 to l2 use of bpf_skb_change_head

Jussi Maki bpf 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 1 replyIn review
  2. v32 patches 1 replySuperseded
  3. v22 patches 4 repliesSuperseded

Changes in v4 from the cover letter

- Run the tc_redirect test in its own thread to isolate the network and mount namespace modifications to the test thread. Fixes the failing CI check in v3.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: Set mac_len in bpf_skb_change_headnet/core/filter.c+1 -02 replies
2/2selftests/bpf: Add test for l3 use of bpf_redirect_peertools/testing/selftests/bpf/prog_tests/tc_redirect.c tools/testing/selftests/bpf/progs/test_tc_peer.c+406 -1780 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH bpf v4 0/2] bpf: Fix l3 to l2 use of bpf_skb_change_head

This fixes an issue with using bpf_skb_change_head to redirect packet from l3 to l2 device. See commit messages for details.

v3->v4:
- Run the tc_redirect test in its own thread to isolate the network and mount namespace modifications to the test thread. Fixes the failing CI check in v3.

v2->v3:
- Refactor test_tc_redirect_peer_l3 to use BPF for passing packets to both directions instead of relying on forwarding on the way back.
- Clean up of tc_redirect test. Setup and tear down namespaces for each test case and avoid a more complex cleanup when tearing down the namespace is enough.

v1->v2:
- Port the test case to the newly refactored prog_tests/tc_redirect.c.