> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Wednesday 24 June 2026 00:23
> To: [email protected]
> Cc: Stephen Hemminger <[email protected]>; Konstantin Ananyev 
> <[email protected]>;
> Marat Khalili <[email protected]>
> Subject: [PATCH v4 7/7] test/bpf: check that bpf_convert can be JIT'd
> 
> Run each converted filter through both the interpreter and the JIT and
> check they agree, catching JIT miscompiles.
> 
> test_bpf_filter and test_bpf_match did nearly the same thing: compile,
> load and run a filter against the dummy packet. Combine them into
> test_bpf_match, which now builds the packet itself and returns whether
> the filter matched. Callers run it for both load methods.
> 
> The dummy packet is a UDP packet to a fixed destination MAC, source
> and destination ports, so the filter results are deterministic. None
> of the sample filters should match it, so assert that; a convert or
> JIT bug that flips a result is then caught. The destination MAC and
> source port are chosen so the negative ethernet and port filters do
> not match, and "port not 53 and not arp" is dropped as it matches
> any non-ARP packet that lacks port 53.
> 
> Reduce log output to make it easier to match which expression might be
> causing issues.
> 
> Signed-off-by: Stephen Hemminger <[email protected]>

Acked-by: Marat Khalili <[email protected]>

Reply via email to