Files
Jesper Dangaard Brouer 635a2f3ca4 MTU-tests: BPF-helper did make it upstream and in libbpf
The BPF-helper is now defined in bpf_helper_defs.h header:
 lib/libbpf-install/usr/include/bpf/bpf_helper_defs.h

Update and keep comment as a help for people doing kernel
devel on BPF and want to test BPF-helpers not yet upstream.

Accepted in kernel v5.12
 - commit 34b2021cc616 ("bpf: Add BPF-helper for MTU checking")
 - https://git.kernel.org/torvalds/c/34b2021cc616

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-26 16:10:57 +02:00
..
2020-10-13 15:37:05 +02:00

BPF testing packet size changes

Playing with increasing packet size with TC-BPF. Testing what happens when sending packets larger that MTU out an interface.

Notes loading BPF object

How to manually load TC program:

export DEV=mlx5p1
tc qdisc del dev "$DEV" clsact # Also deletes all filters
tc qdisc add dev "$DEV" clsact
tc filter add dev "$DEV" pref 1 handle 1 egress bpf da obj tc_bpf_inc_pkt_size.o
tc filter show dev "$DEV" egress

Be VERY careful with replace command, it MUST have same pref +=handle=:

tc filter replace dev "$DEV" pref 1 handle 1 egress bpf da obj tc_bpf_inc_pkt_size.o