This series reworks the userspace connection tracker in Open vSwitch in
order to introduce an infrastructure that future offload providers could
use to offload connections, similar to facilities provided in the TC offload
path.  The goal is to enable userspace datapath offloads to provide
additional connection tracking offload support.

Patch 1 introduces a new conn private storage and a common initializer that
will be used throughout the connection lifecycle for more modular metadata.
Patch 2 then adds a priority-ordered observer infrastructure for monitoring,
and optionally handling connection state transitions.  Patches 3 + 4 are
restructures of existing code into separate files and prep work for
offloading in the TCP module.

Patches 5-10 are the meat of the offload infrastructure.  They provide the
basic support - add/del/est/update indicators that give enough context into
the userspace connection tracking layers to actually inform the hardware and
keep the userspace updated.  Additionally, we automatically disable tcp
sequence number checking on connections that are 'tracked'.

Patch 11 provides a dummy offloading implementation.

Patch 12 is Documentation / NEWS updates

This work stops at the connection lifecycle boundary, rather than adding
additional APIs for other types of CT queries.  For example, the dpif layer
may need assistance querying whether a particular match can be offloaded.
That API work is still in progress (although we do provide some assistance
with specific querying).

NOTE: Some in-flight patches will conflict with this, notably the ALG
      refactor, and (if they get posted) Felix's ct optimization.

RFC:
  https://mail.openvswitch.org/pipermail/ovs-dev/2026-April/431605.html

RFC->v1:
  https://mail.openvswitch.org/pipermail/ovs-dev/2026-May/432353.html
  Fixed a number of freebsd / compiler issues
  Fixed calling offload conn_del in the conn_clean case
  Fixed an incorrect gate in the sweeping code

v1->v2:
  https://mail.openvswitch.org/pipermail/ovs-dev/2026-July/434631.html
  Fixed up spelling mistakes, null checks, and nits.
  Changed ct_private_id to a 32-bit unsigned type
  Updated example
  Reworked comments

v2->v3:
  BIG NOTE: this does a big rework of the series based on all the feedback.
            I'm hoping that I caught it all.  It also means a large class
            of comments got invalidated.  There is a bigger design change,
            so it needs some careful analysis from that perspective, but
            I believe it should offer all the mechanisms needed to
            implement conntrack offloading.

  Fixed up some header consistency
  Dictionary entries
  Updates from Eelco's feedback (ex: error sentinels, spacing, etc)
  'Tighter' coupling to dpif-offload layer.
  Redesigned the API based on feedback from Eelco to drop the individual
    api call sites
  Redesigned the sync between HW and SW to fix up weird edge cases like
    Flush during add, signals during updates, etc.
  Disambiguated 'established' from 'tracked' and 'hw_confirmed' states.
  Time extension needs to be tightly checked.
  Updated the documentation to describe the sync and integration better.

Aaron Conole (12):
  conntrack: Add per-conn storage for conntrack modules.
  conntrack: Introduce an observer pattern infrastructure as a hook.
  conntrack: Split the FTP and TFTP handling into separate files.
  conntrack-tcp: Convert to using the per-conn storage area.
  ct-offload: Add a new interface as an offload provider.
  ct-offload: Add batching support.
  ct-offload: Add a mark for offloaded connections.
  conntrack: Add calls to ct-offload infrastructure.
  ct-offload: Tie conntrack offload to dpif hw-offload.
  conntrack: Propagate input netdev pointer to conntrack.
  ct-offload-dummy: Introduce dummy ct offload.
  Documentation: Announce and describe the conntrack offload feature.

 Documentation/automake.mk                     |   1 +
 Documentation/topics/index.rst                |   1 +
 .../topics/userspace-conntrack-offloading.rst | 502 ++++++++++
 NEWS                                          |  16 +
 lib/automake.mk                               |   7 +
 lib/conntrack-ftp.c                           | 690 ++++++++++++++
 lib/conntrack-icmp.c                          |   2 +
 lib/conntrack-other.c                         |   2 +
 lib/conntrack-private.h                       | 163 +++-
 lib/conntrack-tcp.c                           |  92 +-
 lib/conntrack-tcp.h                           |  59 ++
 lib/conntrack-tftp.c                          |  47 +
 lib/conntrack.c                               | 891 ++++--------------
 lib/conntrack.h                               |  63 +-
 lib/ct-dpif.c                                 |   3 +
 lib/ct-dpif.h                                 |   3 +
 lib/ct-offload-dummy.c                        | 307 ++++++
 lib/ct-offload-dummy.h                        |  32 +
 lib/ct-offload.c                              | 632 +++++++++++++
 lib/ct-offload.h                              | 260 +++++
 lib/dpif-netdev.c                             |  21 +-
 lib/dpif-offload-dummy.c                      |  53 +-
 lib/dpif-offload.c                            |  18 +
 lib/dpif-offload.h                            |   1 +
 tests/dpif-netdev.at                          | 135 +++
 tests/library.at                              |  24 +
 tests/test-conntrack.c                        | 181 +++-
 utilities/checkpatch_dict.txt                 |  16 +
 28 files changed, 3405 insertions(+), 817 deletions(-)
 create mode 100644 Documentation/topics/userspace-conntrack-offloading.rst
 create mode 100644 lib/conntrack-ftp.c
 create mode 100644 lib/conntrack-tcp.h
 create mode 100644 lib/conntrack-tftp.c
 create mode 100644 lib/ct-offload-dummy.c
 create mode 100644 lib/ct-offload-dummy.h
 create mode 100644 lib/ct-offload.c
 create mode 100644 lib/ct-offload.h

-- 
2.56.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to