Subject: Re: [PATCH net v2 2/3] selftests: add selftest for the SRv6 End.DX4 behavior with netfilter

From: Jakub Kicinski <[email-masked]>
Date: Wed, 5 Jun 2024 17:35:32 -0700

On Wed, 5 Jun 2024 11:28:17 +0800 Jianguo Wu wrote:
> > sysctl: cannot stat /proc/sys/net/netfilter/nf_hooks_lwtunnel: No such file or directory
> > Warning: Extension rpfilter revision 0 not supported, missing kernel module?
> > iptables v1.8.9 (nf_tables):  RULE_APPEND failed (No such file or directory): rule in chain PREROUTING
> >   
> 
> What is your kernel version? The file was introduced from v5.15-rc1
> 
> > Looks we are missing some config in selftest net/config.
> >   
> 
> Sorry, I can't find what config to add, please tell me.

Please follow the instructions from here:
https://github.com/linux-netdev/nipa/wiki/How-to-run-netdev-selftests-CI-style
the kernel we build for testing is minimal.

We see this output:

TAP version 13
1..1
# overriding timeout to 7200
# selftests: net: srv6_end_dx4_netfilter_test.sh
# Warning: file srv6_end_dx4_netfilter_test.sh is not executable
# 
# ################################################################################
# TEST SECTION: SRv6 VPN connectivity test among hosts in the same tenant
# ################################################################################
# 
#     TEST: Hosts connectivity: hs-1 -> hs-2 (tenant 100)                 [ OK ]
# 
#     TEST: Hosts connectivity: hs-2 -> hs-1 (tenant 100)                 [ OK ]
# 
# ################################################################################
# TEST SECTION: SRv6 VPN connectivity test with netfilter enabled in routers
# ################################################################################
# Warning: Extension rpfilter revision 0 not supported, missing kernel module?
# iptables v1.8.8 (nf_tables):  RULE_APPEND failed (No such file or directory): rule in chain PREROUTING
# Warning: Extension rpfilter revision 0 not supported, missing kernel module?
# iptables v1.8.8 (nf_tables):  RULE_APPEND failed (No such file or directory): rule in chain PREROUTING
# 
#     TEST: Hosts connectivity: hs-1 -> hs-2 (tenant 100)                 [ OK ]
# 
#     TEST: Hosts connectivity: hs-2 -> hs-1 (tenant 100)                 [ OK ]
# 
# Tests passed:   4
# Tests failed:   0
ok 1 selftests: net: srv6_end_dx4_netfilter_test.sh

https://netdev-3.bots.linux.dev/vmksft-net-dbg/results/627022/58-srv6-end-dx4-netfilter-test-sh/stdout

Note that the CI uses nftables-based iptables, not legacy iptables.