Thread (14 messages) flat view 14 messages, 4 authors, 2026-02-26
STALE194d REVIEWED: 1 (1M)

1 review trailer.

[RFC PATCH bpf-next 2/9] selftests/bpf: fib_lookup: Enable forwarding on second net device

From: Ido Schimmel <idosch@nvidia.com>
Date: 2026-02-26 08:01:03
Also in: bpf
Subsystem: bpf [general] (safe dynamic programs and tools), bpf [selftests] (test runners & infrastructure), kernel selftest framework, the rest · Maintainers: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Eduard Zingerman, Kumar Kartikeya Dwivedi, Shuah Khan, Shuah Khan, Linus Torvalds

Currently, the bpf_fib_lookup() helper is only called with the ifindex
of veth1. In preparation for calling the bpf_fib_lookup() helper with
the ifindex of veth2, enable forwarding on this device.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 tools/testing/selftests/bpf/prog_tests/fib_lookup.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/fib_lookup.c b/tools/testing/selftests/bpf/prog_tests/fib_lookup.c
index 77f65ff7784a..14a6515a453d 100644
--- a/tools/testing/selftests/bpf/prog_tests/fib_lookup.c
+++ b/tools/testing/selftests/bpf/prog_tests/fib_lookup.c
@@ -193,10 +193,18 @@ static int setup_netns(void)
 	if (!ASSERT_OK(err, "write_sysctl(net.ipv4.conf.veth1.forwarding)"))
 		goto fail;
 
+	err = write_sysctl("/proc/sys/net/ipv4/conf/veth2/forwarding", "1");
+	if (!ASSERT_OK(err, "write_sysctl(net.ipv4.conf.veth2.forwarding)"))
+		goto fail;
+
 	err = write_sysctl("/proc/sys/net/ipv6/conf/veth1/forwarding", "1");
 	if (!ASSERT_OK(err, "write_sysctl(net.ipv6.conf.veth1.forwarding)"))
 		goto fail;
 
+	err = write_sysctl("/proc/sys/net/ipv6/conf/veth2/forwarding", "1");
+	if (!ASSERT_OK(err, "write_sysctl(net.ipv6.conf.veth2.forwarding)"))
+		goto fail;
+
 	/* Setup for policy routing tests */
 	SYS(fail, "ip addr add %s/24 dev veth1", IPV4_LOCAL);
 	SYS(fail, "ip addr add %s/64 dev veth1 nodad", IPV6_LOCAL);
-- 
2.53.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help