Re: [PATCH bpf] selftests/bpf: Check returned keys in map batch validators

From: Tianyi Chen

Date: Sun Sep 06 2026 - 11:40:24 EST


Thanks for pointing out the third validator.

I have included the LPM trie case in v2. The struct key is not a reason
to leave it out: the updated check validates the /32 prefix and complete
192.168.1.x address, then checks the host octet against the inserted key
range before using it to index visited.

I also moved the validation notes below the --- separator, leaving the
commit message focused on the problem and the fix.

The revised full test_maps suite passes with no skips on the matching
kernel, including array, per-CPU array, hash, per-CPU hash and LPM batch
tests. The revised patch is here:

https://lore.kernel.org/bpf/178870889323.880246.16480713814270899611.bpf-batch-v2@xxxxxxxxx/

Thanks,
Tianyi