From: netdev-bot+sashiko@kernel.org
To: houminxi@gmail.com
Cc: netdev@vger.kernel.org, aconole@redhat.com, echaudro@redhat.com,
i.maximets@ovn.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
shuah@kernel.org, dev@openvswitch.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v4 1/2] selftests/net/openvswitch: add SCTP flow key test over IPv6
Date: Thu, 10 Sep 2026 12:27:11 +0000 [thread overview]
Message-ID: <178904323159.219967.4281963773797281538@kernel.org> (raw)
In-Reply-To: <20260909122521.2687193-2-houminxi@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:
Critical: 0 · High: 0 · Medium: 0 · Low: 1
- [Low] test_sctp_connect_v6() gates itself on `[ -e /proc/sys/net/ipv6
]` (line 717) and on socat's `WITH_SCTP` define (line 716) only, and…
--
selftests/net/openvswitch: add SCTP flow key test over IPv6
Adds test_sctp_connect_v6 to the openvswitch selftest, mirroring the
existing IPv4 SCTP test: icmpv6() flows forward neighbour discovery,
ipv6(proto=132),sctp() flows gate an SCTP association over IPv6, a keyless
ipv6(proto=132) install is expected to be refused with EINVAL, and a payload
is pushed across the datapath.
> diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh
> index a31f7fb6882d..1160f8ed7d8a 100755
> --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh
> +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh
[ ... ]
> @@ -700,6 +701,113 @@ test_sctp_connect_v4() {
> return 0
> }
>
> +# sctp_connect_v6 test
> +# - sctp(dst=4443) matches client-to-server INIT
> +# - sctp(src=4443) matches server-to-client INIT-ACK
> +# - icmpv6 NS/NA flows forward neighbour discovery
> +# - remove flows and verify connection fails, reinstall and recover
> +test_sctp_connect_v6() {
> + local t="test_sctp_connect_v6"
> + local v6="eth_type(0x86dd),ipv6(proto=132)"
> + local payload="SCTP6_DATA_OK"
> + local rxfile="${ovs_base}/${t}/sctp-rx.txt"
> +
> + modprobe -q sctp 2>/dev/null || return "$ksft_skip"
> + socat -V 2>&1 | grep -q "define WITH_SCTP" || return "$ksft_skip"
> + [ -e /proc/sys/net/ipv6 ] || return "$ksft_skip"
> +
> + sbx_add "$t" || return $?
> + ovs_add_dp "$t" sctp6 || return 1
> +
> + info "create namespaces"
> + for ns in client server; do
> + ovs_add_netns_and_veths "$t" "sctp6" "$ns" \
> + "${ns:0:1}0" "${ns:0:1}1" || return 1
> + done
> +
> + ip netns exec client ip addr add fd00::1/64 dev c1 nodad
> + ip netns exec client ip link set c1 up
> + ip netns exec server ip addr add fd00::2/64 dev s1 nodad
> + ip netns exec server ip link set s1 up
[Severity: Low]
Two questions about the skip/setup handling in test_sctp_connect_v6().
First, the capability probe only greps socat -V for "define WITH_SCTP", while
this test uses the SCTP6-LISTEN and SCTP6-CONNECT addresses, which also need
socat's IPv6 support (WITH_IP6). On a socat built with SCTP but without IPv6,
the probe passes, the listener never comes up, and:
ovs_wait sctp_eps_has server 4443 || return 1
times out and reports FAIL for the SCTP flow-key path rather than skipping for
a missing userspace prerequisite. Would it make sense to also grep for the
IPv6 define here?
Second, the four addressing commands above discard their exit status. The rest
of the test does not depend on addressing until the association attempt, so if
"ip addr add fd00::1/64 ... nodad" fails (for example an iproute2 that rejects
nodad, or IPv6 disabled per-device in the fresh netns via
net.core.devconf_inherit_init_net), the first visible error is:
ovs_sbx "$t" ip netns exec client \
timeout 3 socat -u STDIN "SCTP6-CONNECT:[fd00::2]:4443" </dev/null \
|| return 1
which attributes a setup failure to the SCTP flow-key path. The file-level
"trap ovs_exit_sig EXIT TERM INT ERR" does not catch these, since set -e/set -E
are not in use and run_test() runs the body in a subshell via
"eval test_${tname}". Should these four commands carry "|| return 1" so the
failure is reported where it happens? The pre-existing test_icmpv6() and
test_sctp_connect_v4() use the same unchecked pattern, so this is the current
convention in the file rather than something new here.
> +
> + # NS/NA forwarding
[ ... ]
> + ovs_netns_spawn_daemon "$t" "server" \
> + socat -u -t 1 SCTP6-LISTEN:4443,fork \
> + OPEN:"$rxfile",creat,append
> + ovs_wait sctp_eps_has server 4443 || return 1
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260909122521.2687193-1-houminxi%40gmail.com
next prev parent reply other threads:[~2026-09-10 12:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 12:25 [PATCH net-next v4 0/2] selftests/net/openvswitch: SCTP tests Minxi Hou
2026-09-09 12:25 ` [PATCH net-next v4 1/2] selftests/net/openvswitch: add SCTP flow key test over IPv6 Minxi Hou
2026-09-10 12:27 ` netdev-bot+sashiko [this message]
2026-09-09 12:25 ` [PATCH net-next v4 2/2] selftests/net/openvswitch: add SCTP NAT test with port translation Minxi Hou
2026-09-10 12:27 ` netdev-bot+sashiko
2026-09-09 15:03 ` [PATCH net-next v4 0/2] selftests/net/openvswitch: SCTP tests Ilya Maximets
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178904323159.219967.4281963773797281538@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=houminxi@gmail.com \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox