Re: [PATCH bpf-next v6 3/3] selftests/bpf: Add bpf_fib_lookup() VLAN flag tests
From: Avinash Duduskar
Date: Wed Jul 08 2026 - 02:59:40 EST
> Here we add a bunch of shorthands for the topology we're setting up,
> but not for all interfaces/IPs. E.g.,
[...]
> The IPs are hardcoded here (and in the rest of the code below). AFAICT the
> logic is that the defines are to make it more obvious as to what the test
> is about. Is there a logic of this kind behind the naming convention?
Yes, the rule is inherited from the file: a value gets a define when
setup_netns() and the assertion table both use it, so the two sites
cannot drift and a table arm names what it targets (.daddr =
IPV4_VLAN_GW reads as intent). The new defines follow that.
The hardcoded addresses are in the netns and live-frames subtests,
which build their own single-function topologies the table never
references, so there is no second site to keep in sync. The bare
"veth1"/"veth2" strings predate this series; I left them alone rather
than churn lines the series does not otherwise touch.
The netns subtest does repeat its 10.66.0.x addresses a few times,
though, so I will give those a local define in v7 to keep the new code
consistent with itself.
Thanks for the reviews!
Avi