Re: [PATCH v4 2/2] selftests/bpf: cover stale CB after LWT IP encapsulation
From: Daniel Borkmann
Date: Tue Sep 22 2026 - 10:20:14 EST
On 9/21/26 7:39 PM, Weiming Shi wrote:
Add compact regression coverage to the existing LWT IP encapsulationDid you /actually/ try to run the test you submitted?
test. Send an IPv4 ping with a Record Route option through an ingress LWT
program which prepends a TTL-one IPv4 header, then observe __icmp_send()
with fentry and verify that the restored protocol control block no longer
contains the inner header's cached option offsets.
Read ctx->cb[0] in the LWT program so the test exercises
bpf_prog_run_save_cb()'s save/restore path before the post-run check.
Link: https://lore.kernel.org/bpf/DLKB3UXOH0IS.1UL8NV9HSJFXG@xxxxxxxxx/
Signed-off-by: Weiming Shi <bestswngs@xxxxxxxxx>
BPF CI :
[...]
lwt_ip_encap_vxlan:PASS:setup network 0 nsec
setup_vxlan_routes:PASS:open ns3 for vxlan 0 nsec
setup_vxlan_routes:PASS:ip a add 172.16.17.100/32 dev veth8 0 nsec
setup_vxlan_routes:PASS:ip -6 a add fb11::1/128 dev veth8 0 nsec
setup_vxlan_routes:PASS:ip link add vxlan4 type vxlan id 1 dstport 4789 local 172.16.17.100 dev veth8 nolearning noudpcsum 0 nsec
setup_vxlan_routes:PASS:ip link set vxlan4 up 0 nsec
setup_vxlan_routes:PASS:ip link add vxlan6 type vxlan id 1 dstport 4789 local fb11::1 dev veth8 nolearning udp6zerocsumrx 0 nsec
setup_vxlan_routes:PASS:ip link set vxlan6 up 0 nsec
setup_vxlan_routes:PASS:ip -n ns-lwt-ip-encap-1-0000128 route add 172.16.17.100/32 dev veth5 via 172.16.6.100 0 nsec
setup_vxlan_routes:PASS:ip -n ns-lwt-ip-encap-2-0000128 route add 172.16.17.100/32 dev veth7 via 172.16.8.100 0 nsec
setup_vxlan_routes:PASS:ip -n ns-lwt-ip-encap-1-0000128 -6 route add fb11::1/128 dev veth5 via fb06::1 0 nsec
setup_vxlan_routes:PASS:ip -n ns-lwt-ip-encap-2-0000128 -6 route add fb11::1/128 dev veth7 via fb08::1 0 nsec
lwt_ip_encap_vxlan:PASS:setup vxlan routes 0 nsec
lwt_ip_encap_vxlan:PASS:test_lwt_ip_encap__open 0 nsec
libbpf: prog 'bpf_lwt_encap_stale': missing BPF prog type, check ELF section name 'encap_stale'
libbpf: prog 'bpf_lwt_encap_stale': failed to load: -EINVAL
libbpf: failed to load object 'test_lwt_ip_encap'
libbpf: failed to load BPF skeleton 'test_lwt_ip_encap': -EINVAL
lwt_ip_encap_vxlan:FAIL:test_lwt_ip_encap__load unexpected error: -22 (errno 22)