Thread (4 messages) 4 messages, 2 authors, 1d ago
WARM1d

[PATCH net-next v6 0/2] selftests/net/openvswitch: add SCTP flow key test

From: Minxi Hou <hidden>
Date: 2026-07-24 15:06:34
Also in: linux-kselftest, lkml

v5 failed in NIPA: the kernel rejected the SCTP-keyed flow with
EINVAL(22) in add_flow. Root cause: v5 installed flows containing
sctp() via ovs-dpctl.py without registering OVS_KEY_ATTR_SCTP in its
flow-string parse table, so the parser silently dropped the L4 key;
the kernel mandates the SCTP key when ipv4.proto == IPPROTO_SCTP
(match_validate() in flow_netlink.c) and returns -EINVAL.

The parse-table entry was present in v1-v4 and was accidentally
dropped in the v4->v5 respin. v6 splits the fix from the test so each
patch stands on its own: patch 1 restores SCTP parsing in ovs-dpctl.py
(the NIPA fix) with unit tests, patch 2 adds the SCTP flow key test
(same goal as v5).

Tested with vng on x86_64: all OVS selftests pass, including the new
sctp_connect_v4.

v6:
  - split into 2 patches: ovs-dpctl.py parse fix + shell test
  - restore OVS_KEY_ATTR_SCTP parse-table entry + unit tests (NIPA fix)
  - listener readiness via /proc/net/sctp/eps (ss needs sctp_diag)
  - add timeout 3 to socat clients (unidirectional connect hangs)
  - restart listeners with kill -TERM + kill -0 poll (wait can hang)
v5: https://lore.kernel.org/netdev/20260723084203.3483560-1-houminxi@gmail.com/ (local)
  - switch to socat per Kicinski; NIPA FAIL: EINVAL in add_flow
    (parse entry accidentally dropped in this respin)
v4: https://lore.kernel.org/netdev/20260719162657.3263089-1-houminxi@gmail.com/ (local)
  - rebase after ICMPv6 test merged; nc --sctp detection nit
v3: https://lore.kernel.org/netdev/20260715015446.530018-1-houminxi@gmail.com/ (local)
  - switch ncat -> nc with skip if nc lacks SCTP support
v2: https://lore.kernel.org/netdev/20260707034718.2717982-1-houminxi@gmail.com/ (local)
  - replace sleep after spawn with ovs_wait on listener stderr
v1: https://lore.kernel.org/netdev/20260702090908.1253688-1-houminxi@gmail.com/ (local)

Minxi Hou (2):
  selftests/net/openvswitch: add SCTP flow key parsing to ovs-dpctl.py
  selftests/net/openvswitch: add SCTP flow key test

 .../selftests/net/openvswitch/openvswitch.sh  | 121 ++++++++++++++++
 .../selftests/net/openvswitch/ovs-dpctl.py    | 129 ++++++++++++++++++
 2 files changed, 250 insertions(+)

-- 
2.55.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