Add OVS_KEY_ATTR_SCTP to the ovskey parse table in ovs-dpctl.py so
that SCTP flow strings carry the L4 key through to the kernel, and
add a matching selftest in openvswitch.sh.

The missing parse-table entry caused a selftest NIPA failure: the
flow string "sctp(dst=4443)" parsed without error but silently
dropped the L4 key, producing a flow with only ipv4(proto=132).
The kernel's match_validate() then rejected it with -EINVAL because
OVS_KEY_ATTR_SCTP was missing for IPPROTO_SCTP.

Changes from v6:
  - Trim unit tests to cover only the new SCTP key parser
    (removed tests for TCP/UDP/ICMP/IPv4/EthType which were out of
    scope for this patch); address Aaron's feedback that testing
    existing parsers was excessive for a selftest tool.
  - _parse_flow() now checks for unparsed remainder.

v6: https://lore.kernel.org/netdev/[email protected]/
v5: https://lore.kernel.org/netdev/[email protected]/
v4: https://lore.kernel.org/netdev/[email protected]/
v3: https://lore.kernel.org/netdev/[email protected]/
v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/netdev/[email protected]/

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

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

--
2.55.0


Reply via email to