get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1523374/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1523374,
    "url": "http://patchwork.ozlabs.org/api/patches/1523374/",
    "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20210901191252.532.67160.stgit@dceara.remote.csb/",
    "project": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/projects/68/",
        "name": "Open Virtual Network development",
        "link_name": "ovn",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20210901191252.532.67160.stgit@dceara.remote.csb>",
    "list_archive_url": null,
    "date": "2021-09-01T19:12:55",
    "name": "[ovs-dev,1/2] Revert \"Revert features detection and zero-snat patches.\"",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0709083101cfd33db1d544df435f8286306befa8",
    "submitter": {
        "id": 76591,
        "url": "http://patchwork.ozlabs.org/api/people/76591/",
        "name": "Dumitru Ceara",
        "email": "dceara@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20210901191252.532.67160.stgit@dceara.remote.csb/mbox/",
    "series": [
        {
            "id": 260617,
            "url": "http://patchwork.ozlabs.org/api/series/260617/",
            "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=260617",
            "date": "2021-09-01T19:12:33",
            "name": "ovn-controller: Reintroduce null-SNAT usage.",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/260617/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1523374/comments/",
    "check": "fail",
    "checks": "http://patchwork.ozlabs.org/api/patches/1523374/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ovs-dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=H9dTPmdI;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.137; helo=smtp4.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
            "smtp1.osuosl.org (amavisd-new);\n dkim=pass (1024-bit key) header.d=redhat.com",
            "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dceara@redhat.com"
        ],
        "Received": [
            "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H0DHJ6BQBz9sSs\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Sep 2021 05:13:32 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 8ECFD403FD;\n\tWed,  1 Sep 2021 19:13:30 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n\tby localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 1vVKR_cWdKJB; Wed,  1 Sep 2021 19:13:26 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp4.osuosl.org (Postfix) with ESMTPS id 26373400C0;\n\tWed,  1 Sep 2021 19:13:25 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 02091C001A;\n\tWed,  1 Sep 2021 19:13:25 +0000 (UTC)",
            "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 33A9BC001A\n for <ovs-dev@openvswitch.org>; Wed,  1 Sep 2021 19:13:24 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 1441E8272D\n for <ovs-dev@openvswitch.org>; Wed,  1 Sep 2021 19:13:24 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id VtkAKY5X0xb6 for <ovs-dev@openvswitch.org>;\n Wed,  1 Sep 2021 19:13:18 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 68E8A8100F\n for <ovs-dev@openvswitch.org>; Wed,  1 Sep 2021 19:13:18 +0000 (UTC)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-214-C_mEwek8MQ-1Z8tNM_5eyQ-1; Wed, 01 Sep 2021 15:13:03 -0400",
            "from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com\n [10.5.11.23])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5C211854E20;\n Wed,  1 Sep 2021 19:12:59 +0000 (UTC)",
            "from dceara.remote.csb (unknown [10.39.194.141])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 0403C19C79;\n Wed,  1 Sep 2021 19:12:57 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.8.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1630523597;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=JKzU74JYDhWFmHPHs+NPpHad8SuVB8BN4KK5RRoXNc8=;\n b=H9dTPmdIeO7RLWhrG+cB3uk5IKFxLW7k013HBVg/ErUyksQtiJOEWBRYDePJZVtlqOyZZq\n R5hAdBTa74LyQzdZcXOqZ/I2yzqIkV4hOfVjCbt12hBQMTJ1q/scaYDz9xaAjNYu2BSBVb\n fp4J4fsDyUu/0LhXUOP9PMCkGu0D/WA=",
        "X-MC-Unique": "C_mEwek8MQ-1Z8tNM_5eyQ-1",
        "From": "Dumitru Ceara <dceara@redhat.com>",
        "To": "ovs-dev@openvswitch.org",
        "Date": "Wed,  1 Sep 2021 21:12:55 +0200",
        "Message-Id": "<20210901191252.532.67160.stgit@dceara.remote.csb>",
        "In-Reply-To": "<20210901191224.532.12009.stgit@dceara.remote.csb>",
        "References": "<20210901191224.532.12009.stgit@dceara.remote.csb>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.23",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Cc": "trozet@redhat.com",
        "Subject": "[ovs-dev] [PATCH ovn 1/2] Revert \"Revert features detection and\n\tzero-snat patches.\"",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "This reverts commit 82e241542cbf19a144257a72324bc3278f76ee99.\n\nTurns out the dataplane performance issue was not caused by the\nzero-snat feature:\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1992012#c24\n\nThe upgrade problem will be addressed as a separate patch.\n\nSigned-off-by: Dumitru Ceara <dceara@redhat.com>\n---\n controller/ovn-controller.c   |  115 +++++++++++++++++++------\n include/ovn/actions.h         |    1 \n include/ovn/features.h        |   18 ++++\n lib/actions.c                 |   31 +++++++\n lib/automake.mk               |    1 \n lib/features.c                |   84 ++++++++++++++++++\n lib/test-ovn-features.c       |   56 ++++++++++++\n tests/automake.mk             |    3 +\n tests/ovn-controller.at       |   11 +-\n tests/ovn-features.at         |    8 ++\n tests/system-common-macros.at |    4 +\n tests/system-ovn.at           |  190 +++++++++++++++++++++++++++++++++++++++++\n tests/testsuite.at            |    1 \n 13 files changed, 490 insertions(+), 33 deletions(-)\n create mode 100644 lib/features.c\n create mode 100644 lib/test-ovn-features.c\n create mode 100644 tests/ovn-features.at",
    "diff": "diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c\nindex 4927187c5..739048cf8 100644\n--- a/controller/ovn-controller.c\n+++ b/controller/ovn-controller.c\n@@ -48,6 +48,7 @@\n #include \"openvswitch/vconn.h\"\n #include \"openvswitch/vlog.h\"\n #include \"ovn/actions.h\"\n+#include \"ovn/features.h\"\n #include \"lib/chassis-index.h\"\n #include \"lib/extend-table.h\"\n #include \"lib/ip-mcast-index.h\"\n@@ -90,6 +91,7 @@ static unixctl_cb_func lflow_cache_show_stats_cmd;\n static unixctl_cb_func debug_delay_nb_cfg_report;\n \n #define DEFAULT_BRIDGE_NAME \"br-int\"\n+#define DEFAULT_DATAPATH \"system\"\n #define DEFAULT_PROBE_INTERVAL_MSEC 5000\n #define OFCTRL_DEFAULT_PROBE_INTERVAL_SEC 0\n \n@@ -329,10 +331,6 @@ static const struct ovsrec_bridge *\n create_br_int(struct ovsdb_idl_txn *ovs_idl_txn,\n               const struct ovsrec_open_vswitch_table *ovs_table)\n {\n-    if (!ovs_idl_txn) {\n-        return NULL;\n-    }\n-\n     const struct ovsrec_open_vswitch *cfg;\n     cfg = ovsrec_open_vswitch_table_first(ovs_table);\n     if (!cfg) {\n@@ -396,6 +394,21 @@ create_br_int(struct ovsdb_idl_txn *ovs_idl_txn,\n     return bridge;\n }\n \n+static const struct ovsrec_datapath *\n+create_br_datapath(struct ovsdb_idl_txn *ovs_idl_txn,\n+                   const struct ovsrec_open_vswitch *cfg,\n+                   const char *datapath_type)\n+{\n+    ovsdb_idl_txn_add_comment(ovs_idl_txn,\n+                              \"ovn-controller: creating bridge datapath '%s'\",\n+                              datapath_type);\n+\n+    struct ovsrec_datapath *dp = ovsrec_datapath_insert(ovs_idl_txn);\n+    ovsrec_open_vswitch_verify_datapaths(cfg);\n+    ovsrec_open_vswitch_update_datapaths_setkey(cfg, datapath_type, dp);\n+    return dp;\n+}\n+\n static const struct ovsrec_bridge *\n get_br_int(const struct ovsrec_bridge_table *bridge_table,\n            const struct ovsrec_open_vswitch_table *ovs_table)\n@@ -409,33 +422,69 @@ get_br_int(const struct ovsrec_bridge_table *bridge_table,\n     return get_bridge(bridge_table, br_int_name(cfg));\n }\n \n-static const struct ovsrec_bridge *\n+static const struct ovsrec_datapath *\n+get_br_datapath(const struct ovsrec_open_vswitch *cfg,\n+                const char *datapath_type)\n+{\n+    for (size_t i = 0; i < cfg->n_datapaths; i++) {\n+        if (!strcmp(cfg->key_datapaths[i], datapath_type)) {\n+            return cfg->value_datapaths[i];\n+        }\n+    }\n+    return NULL;\n+}\n+\n+static void\n process_br_int(struct ovsdb_idl_txn *ovs_idl_txn,\n                const struct ovsrec_bridge_table *bridge_table,\n-               const struct ovsrec_open_vswitch_table *ovs_table)\n+               const struct ovsrec_open_vswitch_table *ovs_table,\n+               const struct ovsrec_bridge **br_int_,\n+               const struct ovsrec_datapath **br_int_dp_)\n {\n-    const struct ovsrec_bridge *br_int = get_br_int(bridge_table,\n-                                                    ovs_table);\n-    if (!br_int) {\n-        br_int = create_br_int(ovs_idl_txn, ovs_table);\n-    }\n-    if (br_int && ovs_idl_txn) {\n-        const struct ovsrec_open_vswitch *cfg;\n-        cfg = ovsrec_open_vswitch_table_first(ovs_table);\n-        ovs_assert(cfg);\n-        const char *datapath_type = smap_get(&cfg->external_ids,\n-                                             \"ovn-bridge-datapath-type\");\n-        /* Check for the datapath_type and set it only if it is defined in\n-         * cfg. */\n-        if (datapath_type && strcmp(br_int->datapath_type, datapath_type)) {\n-            ovsrec_bridge_set_datapath_type(br_int, datapath_type);\n+    const struct ovsrec_bridge *br_int = get_br_int(bridge_table, ovs_table);\n+    const struct ovsrec_datapath *br_int_dp = NULL;\n+\n+    ovs_assert(br_int_ && br_int_dp_);\n+    if (ovs_idl_txn) {\n+        if (!br_int) {\n+            br_int = create_br_int(ovs_idl_txn, ovs_table);\n         }\n-        if (!br_int->fail_mode || strcmp(br_int->fail_mode, \"secure\")) {\n-            ovsrec_bridge_set_fail_mode(br_int, \"secure\");\n-            VLOG_WARN(\"Integration bridge fail-mode changed to 'secure'.\");\n+\n+        if (br_int) {\n+            const struct ovsrec_open_vswitch *cfg =\n+                ovsrec_open_vswitch_table_first(ovs_table);\n+            ovs_assert(cfg);\n+\n+            /* Propagate \"ovn-bridge-datapath-type\" from OVS table, if any.\n+             * Otherwise use the datapath-type set in br-int, if any.\n+             * Finally, assume \"system\" datapath if none configured.\n+             */\n+            const char *datapath_type =\n+                smap_get(&cfg->external_ids, \"ovn-bridge-datapath-type\");\n+\n+            if (!datapath_type) {\n+                if (br_int->datapath_type[0]) {\n+                    datapath_type = br_int->datapath_type;\n+                } else {\n+                    datapath_type = DEFAULT_DATAPATH;\n+                }\n+            }\n+            if (strcmp(br_int->datapath_type, datapath_type)) {\n+                ovsrec_bridge_set_datapath_type(br_int, datapath_type);\n+            }\n+            if (!br_int->fail_mode || strcmp(br_int->fail_mode, \"secure\")) {\n+                ovsrec_bridge_set_fail_mode(br_int, \"secure\");\n+                VLOG_WARN(\"Integration bridge fail-mode changed to 'secure'.\");\n+            }\n+            br_int_dp = get_br_datapath(cfg, datapath_type);\n+            if (!br_int_dp) {\n+                br_int_dp = create_br_datapath(ovs_idl_txn, cfg,\n+                                               datapath_type);\n+            }\n         }\n     }\n-    return br_int;\n+    *br_int_ = br_int;\n+    *br_int_dp_ = br_int_dp;\n }\n \n static const char *\n@@ -879,6 +928,7 @@ ctrl_register_ovs_idl(struct ovsdb_idl *ovs_idl)\n     ovsdb_idl_add_column(ovs_idl, &ovsrec_open_vswitch_col_external_ids);\n     ovsdb_idl_add_column(ovs_idl, &ovsrec_open_vswitch_col_other_config);\n     ovsdb_idl_add_column(ovs_idl, &ovsrec_open_vswitch_col_bridges);\n+    ovsdb_idl_add_column(ovs_idl, &ovsrec_open_vswitch_col_datapaths);\n     ovsdb_idl_add_table(ovs_idl, &ovsrec_table_interface);\n     ovsdb_idl_track_add_column(ovs_idl, &ovsrec_interface_col_name);\n     ovsdb_idl_track_add_column(ovs_idl, &ovsrec_interface_col_bfd);\n@@ -901,6 +951,8 @@ ctrl_register_ovs_idl(struct ovsdb_idl *ovs_idl)\n     ovsdb_idl_add_column(ovs_idl, &ovsrec_ssl_col_ca_cert);\n     ovsdb_idl_add_column(ovs_idl, &ovsrec_ssl_col_certificate);\n     ovsdb_idl_add_column(ovs_idl, &ovsrec_ssl_col_private_key);\n+    ovsdb_idl_add_table(ovs_idl, &ovsrec_table_datapath);\n+    ovsdb_idl_add_column(ovs_idl, &ovsrec_datapath_col_capabilities);\n     chassis_register_ovs_idl(ovs_idl);\n     encaps_register_ovs_idl(ovs_idl);\n     binding_register_ovs_idl(ovs_idl);\n@@ -3465,8 +3517,10 @@ main(int argc, char *argv[])\n             ovsrec_bridge_table_get(ovs_idl_loop.idl);\n         const struct ovsrec_open_vswitch_table *ovs_table =\n             ovsrec_open_vswitch_table_get(ovs_idl_loop.idl);\n-        const struct ovsrec_bridge *br_int =\n-            process_br_int(ovs_idl_txn, bridge_table, ovs_table);\n+        const struct ovsrec_bridge *br_int = NULL;\n+        const struct ovsrec_datapath *br_int_dp = NULL;\n+        process_br_int(ovs_idl_txn, bridge_table, ovs_table,\n+                       &br_int, &br_int_dp);\n \n         /* Enable ACL matching for double tagged traffic. */\n         if (ovs_idl_txn) {\n@@ -3509,6 +3563,13 @@ main(int argc, char *argv[])\n                                       &chassis_private);\n             }\n \n+            /* If any OVS feature support changed, force a full recompute. */\n+            if (br_int_dp\n+                    && ovs_feature_support_update(&br_int_dp->capabilities)) {\n+                VLOG_INFO(\"OVS feature set changed, force recompute.\");\n+                engine_set_force_recompute(true);\n+            }\n+\n             if (br_int) {\n                 ct_zones_data = engine_get_data(&en_ct_zones);\n                 if (ct_zones_data) {\ndiff --git a/include/ovn/actions.h b/include/ovn/actions.h\nindex b2f2f57c6..f023a37b9 100644\n--- a/include/ovn/actions.h\n+++ b/include/ovn/actions.h\n@@ -25,6 +25,7 @@\n #include \"openvswitch/hmap.h\"\n #include \"openvswitch/uuid.h\"\n #include \"util.h\"\n+#include \"ovn/features.h\"\n \n struct expr;\n struct lexer;\ndiff --git a/include/ovn/features.h b/include/ovn/features.h\nindex 10ee46fcd..c35d59b14 100644\n--- a/include/ovn/features.h\n+++ b/include/ovn/features.h\n@@ -16,7 +16,25 @@\n #ifndef OVN_FEATURES_H\n #define OVN_FEATURES_H 1\n \n+#include <stdbool.h>\n+\n+#include \"smap.h\"\n+\n /* ovn-controller supported feature names. */\n #define OVN_FEATURE_PORT_UP_NOTIF \"port-up-notif\"\n \n+/* OVS datapath supported features.  Based on availability OVN might generate\n+ * different types of openflows.\n+ */\n+enum ovs_feature_support_bits {\n+    OVS_CT_ZERO_SNAT_SUPPORT_BIT,\n+};\n+\n+enum ovs_feature_value {\n+    OVS_CT_ZERO_SNAT_SUPPORT = (1 << OVS_CT_ZERO_SNAT_SUPPORT_BIT),\n+};\n+\n+bool ovs_feature_is_supported(enum ovs_feature_value feature);\n+bool ovs_feature_support_update(const struct smap *ovs_capabilities);\n+\n #endif\ndiff --git a/lib/actions.c b/lib/actions.c\nindex f0291afef..c572e88ae 100644\n--- a/lib/actions.c\n+++ b/lib/actions.c\n@@ -742,6 +742,22 @@ encode_CT_COMMIT_V1(const struct ovnact_ct_commit_v1 *cc,\n     ct->zone_src.ofs = 0;\n     ct->zone_src.n_bits = 16;\n \n+    /* If the datapath supports all-zero SNAT then use it to avoid tuple\n+     * collisions at commit time between NATed and firewalled-only sessions.\n+     */\n+\n+    if (ovs_feature_is_supported(OVS_CT_ZERO_SNAT_SUPPORT)) {\n+        size_t nat_offset = ofpacts->size;\n+        ofpbuf_pull(ofpacts, nat_offset);\n+\n+        struct ofpact_nat *nat = ofpact_put_NAT(ofpacts);\n+        nat->flags = 0;\n+        nat->range_af = AF_UNSPEC;\n+        nat->flags |= NX_NAT_F_SRC;\n+        ofpacts->header = ofpbuf_push_uninit(ofpacts, nat_offset);\n+        ct = ofpacts->header;\n+    }\n+\n     size_t set_field_offset = ofpacts->size;\n     ofpbuf_pull(ofpacts, set_field_offset);\n \n@@ -792,6 +808,21 @@ encode_CT_COMMIT_V2(const struct ovnact_nest *on,\n     ct->zone_src.ofs = 0;\n     ct->zone_src.n_bits = 16;\n \n+    /* If the datapath supports all-zero SNAT then use it to avoid tuple\n+     * collisions at commit time between NATed and firewalled-only sessions.\n+     */\n+    if (ovs_feature_is_supported(OVS_CT_ZERO_SNAT_SUPPORT)) {\n+        size_t nat_offset = ofpacts->size;\n+        ofpbuf_pull(ofpacts, nat_offset);\n+\n+        struct ofpact_nat *nat = ofpact_put_NAT(ofpacts);\n+        nat->flags = 0;\n+        nat->range_af = AF_UNSPEC;\n+        nat->flags |= NX_NAT_F_SRC;\n+        ofpacts->header = ofpbuf_push_uninit(ofpacts, nat_offset);\n+        ct = ofpacts->header;\n+    }\n+\n     size_t set_field_offset = ofpacts->size;\n     ofpbuf_pull(ofpacts, set_field_offset);\n \ndiff --git a/lib/automake.mk b/lib/automake.mk\nindex f73e1c9aa..ddfe33948 100644\n--- a/lib/automake.mk\n+++ b/lib/automake.mk\n@@ -15,6 +15,7 @@ lib_libovn_la_SOURCES = \\\n \tlib/expr.c \\\n \tlib/extend-table.h \\\n \tlib/extend-table.c \\\n+\tlib/features.c \\\n \tlib/ovn-parallel-hmap.h \\\n \tlib/ovn-parallel-hmap.c \\\n \tlib/ip-mcast-index.c \\\ndiff --git a/lib/features.c b/lib/features.c\nnew file mode 100644\nindex 000000000..87d04ee3f\n--- /dev/null\n+++ b/lib/features.c\n@@ -0,0 +1,84 @@\n+/* Copyright (c) 2021, Red Hat, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at:\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#include <config.h>\n+#include <stdint.h>\n+#include <stdlib.h>\n+\n+#include \"lib/util.h\"\n+#include \"openvswitch/vlog.h\"\n+#include \"ovn/features.h\"\n+\n+VLOG_DEFINE_THIS_MODULE(features);\n+\n+struct ovs_feature {\n+    enum ovs_feature_value value;\n+    const char *name;\n+};\n+\n+static struct ovs_feature all_ovs_features[] = {\n+    {\n+        .value = OVS_CT_ZERO_SNAT_SUPPORT,\n+        .name = \"ct_zero_snat\"\n+    },\n+};\n+\n+/* A bitmap of OVS features that have been detected as 'supported'. */\n+static uint32_t supported_ovs_features;\n+\n+static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 5);\n+\n+static bool\n+ovs_feature_is_valid(enum ovs_feature_value feature)\n+{\n+    switch (feature) {\n+    case OVS_CT_ZERO_SNAT_SUPPORT:\n+        return true;\n+    default:\n+        return false;\n+    }\n+}\n+\n+bool\n+ovs_feature_is_supported(enum ovs_feature_value feature)\n+{\n+    ovs_assert(ovs_feature_is_valid(feature));\n+    return supported_ovs_features & feature;\n+}\n+\n+/* Returns 'true' if the set of tracked OVS features has been updated. */\n+bool\n+ovs_feature_support_update(const struct smap *ovs_capabilities)\n+{\n+    bool updated = false;\n+\n+    for (size_t i = 0; i < ARRAY_SIZE(all_ovs_features); i++) {\n+        enum ovs_feature_value value = all_ovs_features[i].value;\n+        const char *name = all_ovs_features[i].name;\n+        bool old_state = supported_ovs_features & value;\n+        bool new_state = smap_get_bool(ovs_capabilities, name, false);\n+        if (new_state != old_state) {\n+            updated = true;\n+            if (new_state) {\n+                supported_ovs_features |= value;\n+            } else {\n+                supported_ovs_features &= ~value;\n+            }\n+            VLOG_INFO_RL(&rl, \"OVS Feature: %s, state: %s\", name,\n+                         new_state ? \"supported\" : \"not supported\");\n+        }\n+    }\n+    return updated;\n+}\ndiff --git a/lib/test-ovn-features.c b/lib/test-ovn-features.c\nnew file mode 100644\nindex 000000000..deb97581e\n--- /dev/null\n+++ b/lib/test-ovn-features.c\n@@ -0,0 +1,56 @@\n+/* Copyright (c) 2021, Red Hat, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at:\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#include <config.h>\n+\n+#include \"ovn/features.h\"\n+#include \"tests/ovstest.h\"\n+\n+static void\n+test_ovn_features(struct ovs_cmdl_context *ctx OVS_UNUSED)\n+{\n+    ovs_assert(!ovs_feature_is_supported(OVS_CT_ZERO_SNAT_SUPPORT));\n+\n+    struct smap features = SMAP_INITIALIZER(&features);\n+\n+    smap_add(&features, \"ct_zero_snat\", \"false\");\n+    ovs_assert(!ovs_feature_support_update(&features));\n+    ovs_assert(!ovs_feature_is_supported(OVS_CT_ZERO_SNAT_SUPPORT));\n+\n+    smap_replace(&features, \"ct_zero_snat\", \"true\");\n+    ovs_assert(ovs_feature_support_update(&features));\n+    ovs_assert(ovs_feature_is_supported(OVS_CT_ZERO_SNAT_SUPPORT));\n+\n+    smap_add(&features, \"unknown_feature\", \"true\");\n+    ovs_assert(!ovs_feature_support_update(&features));\n+\n+    smap_destroy(&features);\n+}\n+\n+static void\n+test_ovn_features_main(int argc, char *argv[])\n+{\n+    set_program_name(argv[0]);\n+    static const struct ovs_cmdl_command commands[] = {\n+        {\"run\", NULL, 0, 0, test_ovn_features, OVS_RO},\n+        {NULL, NULL, 0, 0, NULL, OVS_RO},\n+    };\n+    struct ovs_cmdl_context ctx;\n+    ctx.argc = argc - 1;\n+    ctx.argv = argv + 1;\n+    ovs_cmdl_run_command(&ctx, commands);\n+}\n+\n+OVSTEST_REGISTER(\"test-ovn-features\", test_ovn_features_main);\ndiff --git a/tests/automake.mk b/tests/automake.mk\nindex 60c732aae..5b890d644 100644\n--- a/tests/automake.mk\n+++ b/tests/automake.mk\n@@ -36,6 +36,7 @@ TESTSUITE_AT = \\\n \ttests/ovn-performance.at \\\n \ttests/ovn-ofctrl-seqno.at \\\n \ttests/ovn-ipam.at \\\n+\ttests/ovn-features.at \\\n \ttests/ovn-lflow-cache.at \\\n \ttests/ovn-ipsec.at\n \n@@ -234,6 +235,7 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac\n \n noinst_PROGRAMS += tests/ovstest\n tests_ovstest_SOURCES = \\\n+\tinclude/ovn/features.h \\\n \ttests/ovstest.c \\\n \ttests/ovstest.h \\\n \ttests/test-utils.c \\\n@@ -245,6 +247,7 @@ tests_ovstest_SOURCES = \\\n \tcontroller/lflow-cache.h \\\n \tcontroller/ofctrl-seqno.c \\\n \tcontroller/ofctrl-seqno.h \\\n+\tlib/test-ovn-features.c \\\n \tnorthd/test-ipam.c \\\n \tnorthd/ipam.c \\\n \tnorthd/ipam.h\ndiff --git a/tests/ovn-controller.at b/tests/ovn-controller.at\nindex 29ddd742f..4ae218ed6 100644\n--- a/tests/ovn-controller.at\n+++ b/tests/ovn-controller.at\n@@ -151,23 +151,24 @@ sysid=$(ovs-vsctl get Open_vSwitch . external_ids:system-id)\n check_datapath_type () {\n     datapath_type=$1\n     chassis_datapath_type=$(ovn-sbctl get Chassis ${sysid} other_config:datapath-type | sed -e 's/\"//g') #\"\n-    test \"${datapath_type}\" = \"${chassis_datapath_type}\"\n+    ovs_datapath_type=$(ovs-vsctl get Bridge br-int datapath-type)\n+    test \"${datapath_type}\" = \"${chassis_datapath_type}\" && test \"${datapath_type}\" = \"${ovs_datapath_type}\"\n }\n \n-OVS_WAIT_UNTIL([check_datapath_type \"\"])\n+OVS_WAIT_UNTIL([check_datapath_type system])\n \n ovs-vsctl set Bridge br-int datapath-type=foo\n OVS_WAIT_UNTIL([check_datapath_type foo])\n \n # Change \"ovn-bridge-mappings\" value. It should not change the \"datapath-type\".\n ovs-vsctl set Open_vSwitch . external_ids:ovn-bridge-mappings=foo-mapping\n-check_datapath_type foo\n+AT_CHECK([check_datapath_type foo])\n \n ovs-vsctl set Bridge br-int datapath-type=bar\n OVS_WAIT_UNTIL([check_datapath_type bar])\n \n ovs-vsctl set Bridge br-int datapath-type=\\\"\\\"\n-OVS_WAIT_UNTIL([check_datapath_type \"\"])\n+OVS_WAIT_UNTIL([check_datapath_type system])\n \n # Set the datapath_type in external_ids:ovn-bridge-datapath-type.\n ovs-vsctl set Open_vSwitch . external_ids:ovn-bridge-datapath-type=foo\n@@ -176,11 +177,9 @@ OVS_WAIT_UNTIL([check_datapath_type foo])\n # Change the br-int's datapath type to bar.\n # It should be reset to foo since ovn-bridge-datapath-type is configured.\n ovs-vsctl set Bridge br-int datapath-type=bar\n-OVS_WAIT_UNTIL([test foo = `ovs-vsctl get Bridge br-int datapath-type`])\n OVS_WAIT_UNTIL([check_datapath_type foo])\n \n ovs-vsctl set Open_vSwitch . external_ids:ovn-bridge-datapath-type=foobar\n-OVS_WAIT_UNTIL([test foobar = `ovs-vsctl get Bridge br-int datapath-type`])\n OVS_WAIT_UNTIL([check_datapath_type foobar])\n \n expected_iface_types=$(ovs-vsctl get Open_vSwitch . iface_types | tr -d '[[]] \"\"')\ndiff --git a/tests/ovn-features.at b/tests/ovn-features.at\nnew file mode 100644\nindex 000000000..7910c57e9\n--- /dev/null\n+++ b/tests/ovn-features.at\n@@ -0,0 +1,8 @@\n+#\n+# Unit tests for the lib/features.c module.\n+#\n+AT_BANNER([OVN unit tests - features])\n+\n+AT_SETUP([unit test -- OVS feature detection tests])\n+AT_CHECK([ovstest test-ovn-features run], [0], [])\n+AT_CLEANUP\ndiff --git a/tests/system-common-macros.at b/tests/system-common-macros.at\nindex c23804f6f..616a87fcf 100644\n--- a/tests/system-common-macros.at\n+++ b/tests/system-common-macros.at\n@@ -330,3 +330,7 @@ m4_define([OVS_CHECK_IPROUTE_ENCAP],\n # OVS_CHECK_CT_CLEAR()\n m4_define([OVS_CHECK_CT_CLEAR],\n     [AT_SKIP_IF([! grep -q \"Datapath supports ct_clear action\" ovs-vswitchd.log])])\n+\n+# OVS_CHECK_CT_ZERO_SNAT()\n+m4_define([OVS_CHECK_CT_ZERO_SNAT],\n+    [AT_SKIP_IF([! grep -q \"Datapath supports ct_zero_snat\" ovs-vswitchd.log])]))\ndiff --git a/tests/system-ovn.at b/tests/system-ovn.at\nindex 9487dde49..aadd68634 100644\n--- a/tests/system-ovn.at\n+++ b/tests/system-ovn.at\n@@ -5319,6 +5319,196 @@ OVS_TRAFFIC_VSWITCHD_STOP([\"/failed to query port patch-.*/d\n AT_CLEANUP\n ])\n \n+OVN_FOR_EACH_NORTHD([\n+AT_SETUP([load-balancer and firewall tuple conflict IPv4])\n+AT_SKIP_IF([test $HAVE_NC = no])\n+AT_KEYWORDS([ovnlb])\n+\n+CHECK_CONNTRACK()\n+CHECK_CONNTRACK_NAT()\n+ovn_start\n+OVS_TRAFFIC_VSWITCHD_START()\n+OVS_CHECK_CT_ZERO_SNAT()\n+ADD_BR([br-int])\n+\n+# Set external-ids in br-int needed for ovn-controller\n+ovs-vsctl \\\n+        -- set Open_vSwitch . external-ids:system-id=hv1 \\\n+        -- set Open_vSwitch . external-ids:ovn-remote=unix:$ovs_base/ovn-sb/ovn-sb.sock \\\n+        -- set Open_vSwitch . external-ids:ovn-encap-type=geneve \\\n+        -- set Open_vSwitch . external-ids:ovn-encap-ip=169.0.0.1 \\\n+        -- set bridge br-int fail-mode=secure other-config:disable-in-band=true\n+\n+# Start ovn-controller\n+start_daemon ovn-controller\n+\n+# Logical network:\n+# 1 logical switch connetected to one logical router.\n+# 2 VMs, one used as backend for a load balancer.\n+\n+check ovn-nbctl                                                  \\\n+    -- lr-add rtr                                                \\\n+    -- lrp-add rtr rtr-ls 00:00:00:00:01:00 42.42.42.1/24        \\\n+    -- ls-add ls                                                 \\\n+    -- lsp-add ls ls-rtr                                         \\\n+    -- lsp-set-addresses ls-rtr 00:00:00:00:01:00                \\\n+    -- lsp-set-type ls-rtr router                                \\\n+    -- lsp-set-options ls-rtr router-port=rtr-ls                 \\\n+    -- lsp-add ls vm1 -- lsp-set-addresses vm1 00:00:00:00:00:01 \\\n+    -- lsp-add ls vm2 -- lsp-set-addresses vm2 00:00:00:00:00:02 \\\n+    -- lb-add lb-test 66.66.66.66:666 42.42.42.2:4242 tcp        \\\n+    -- ls-lb-add ls lb-test\n+\n+ADD_NAMESPACES(vm1)\n+ADD_VETH(vm1, vm1, br-int, \"42.42.42.2/24\", \"00:00:00:00:00:01\", \"42.42.42.1\")\n+\n+ADD_NAMESPACES(vm2)\n+ADD_VETH(vm2, vm2, br-int, \"42.42.42.3/24\", \"00:00:00:00:00:02\", \"42.42.42.1\")\n+\n+# Wait for ovn-controller to catch up.\n+wait_for_ports_up\n+check ovn-nbctl --wait=hv sync\n+\n+# Start IPv4 TCP server on vm1.\n+NETNS_DAEMONIZE([vm1], [nc -k -l 42.42.42.2 4242], [nc-vm1.pid])\n+\n+# Make sure connecting to the VIP works.\n+NS_CHECK_EXEC([vm2], [nc 66.66.66.66 666 -p 2000 -z])\n+\n+# Start IPv4 TCP connection to VIP from vm2.\n+NS_CHECK_EXEC([vm2], [nc 66.66.66.66 666 -p 2001 -z])\n+\n+# Check conntrack.  We expect two entries:\n+# - one in vm1's zone (firewall)\n+# - one in vm2's zone (dnat)\n+AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 2001 |             \\\n+grep \"orig=.src=42\\.42\\.42\\.3\" |                                    \\\n+sed -e 's/port=2001/port=<clnt_s_port>/g'                           \\\n+    -e 's/sport=4242,dport=[[0-9]]\\+/sport=4242,dport=<rnd_port>/g' \\\n+    -e 's/state=[[0-9_A-Z]]*/state=<cleared>/g'                     \\\n+    -e 's/zone=[[0-9]]*/zone=<cleared>/' | sort], [0], [dnl\n+tcp,orig=(src=42.42.42.3,dst=42.42.42.2,sport=<clnt_s_port>,dport=4242),reply=(src=42.42.42.2,dst=42.42.42.3,sport=4242,dport=<clnt_s_port>),zone=<cleared>,protoinfo=(state=<cleared>)\n+tcp,orig=(src=42.42.42.3,dst=66.66.66.66,sport=<clnt_s_port>,dport=666),reply=(src=42.42.42.2,dst=42.42.42.3,sport=4242,dport=<clnt_s_port>),zone=<cleared>,labels=0x2,protoinfo=(state=<cleared>)\n+])\n+\n+# Start IPv4 TCP connection to backend IP from vm2 which would require\n+# additional source port translation to avoid a tuple conflict.\n+NS_CHECK_EXEC([vm2], [nc 42.42.42.2 4242 -p 2001 -z])\n+\n+# Check conntrack.  We expect three entries:\n+# - one in vm1's zone (firewall) - reused from the previous connection.\n+# - one in vm2's zone (dnat) - still in TIME_WAIT after the previous connection.\n+# - one in vm2's zone (firewall + additional all-zero SNAT)\n+AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 2001 |             \\\n+grep \"orig=.src=42\\.42\\.42\\.3\" |                                    \\\n+sed -e 's/port=2001/port=<clnt_s_port>/g'                           \\\n+    -e 's/sport=4242,dport=[[0-9]]\\+/sport=4242,dport=<rnd_port>/g' \\\n+    -e 's/state=[[0-9_A-Z]]*/state=<cleared>/g'                     \\\n+    -e 's/zone=[[0-9]]*/zone=<cleared>/' | sort], [0], [dnl\n+tcp,orig=(src=42.42.42.3,dst=42.42.42.2,sport=<clnt_s_port>,dport=4242),reply=(src=42.42.42.2,dst=42.42.42.3,sport=4242,dport=<clnt_s_port>),zone=<cleared>,protoinfo=(state=<cleared>)\n+tcp,orig=(src=42.42.42.3,dst=42.42.42.2,sport=<clnt_s_port>,dport=4242),reply=(src=42.42.42.2,dst=42.42.42.3,sport=4242,dport=<rnd_port>),zone=<cleared>,protoinfo=(state=<cleared>)\n+tcp,orig=(src=42.42.42.3,dst=66.66.66.66,sport=<clnt_s_port>,dport=666),reply=(src=42.42.42.2,dst=42.42.42.3,sport=4242,dport=<clnt_s_port>),zone=<cleared>,labels=0x2,protoinfo=(state=<cleared>)\n+])\n+\n+AT_CLEANUP\n+])\n+\n+OVN_FOR_EACH_NORTHD([\n+AT_SETUP([load-balancer and firewall tuple conflict IPv6])\n+AT_SKIP_IF([test $HAVE_NC = no])\n+AT_KEYWORDS([ovnlb])\n+\n+CHECK_CONNTRACK()\n+CHECK_CONNTRACK_NAT()\n+ovn_start\n+OVS_TRAFFIC_VSWITCHD_START()\n+OVS_CHECK_CT_ZERO_SNAT()\n+ADD_BR([br-int])\n+\n+# Set external-ids in br-int needed for ovn-controller\n+ovs-vsctl \\\n+        -- set Open_vSwitch . external-ids:system-id=hv1 \\\n+        -- set Open_vSwitch . external-ids:ovn-remote=unix:$ovs_base/ovn-sb/ovn-sb.sock \\\n+        -- set Open_vSwitch . external-ids:ovn-encap-type=geneve \\\n+        -- set Open_vSwitch . external-ids:ovn-encap-ip=169.0.0.1 \\\n+        -- set bridge br-int fail-mode=secure other-config:disable-in-band=true\n+\n+# Start ovn-controller\n+start_daemon ovn-controller\n+\n+# Logical network:\n+# 1 logical switch connetected to one logical router.\n+# 2 VMs, one used as backend for a load balancer.\n+\n+check ovn-nbctl                                                  \\\n+    -- lr-add rtr                                                \\\n+    -- lrp-add rtr rtr-ls 00:00:00:00:01:00 4242::1/64           \\\n+    -- ls-add ls                                                 \\\n+    -- lsp-add ls ls-rtr                                         \\\n+    -- lsp-set-addresses ls-rtr 00:00:00:00:01:00                \\\n+    -- lsp-set-type ls-rtr router                                \\\n+    -- lsp-set-options ls-rtr router-port=rtr-ls                 \\\n+    -- lsp-add ls vm1 -- lsp-set-addresses vm1 00:00:00:00:00:01 \\\n+    -- lsp-add ls vm2 -- lsp-set-addresses vm2 00:00:00:00:00:02 \\\n+    -- lb-add lb-test [[6666::1]]:666 [[4242::2]]:4242 tcp       \\\n+    -- ls-lb-add ls lb-test\n+\n+ADD_NAMESPACES(vm1)\n+ADD_VETH(vm1, vm1, br-int, \"4242::2/64\", \"00:00:00:00:00:01\", \"4242::1\")\n+OVS_WAIT_UNTIL([test \"$(ip netns exec vm1 ip a | grep 4242::2 | grep tentative)\" = \"\"])\n+\n+ADD_NAMESPACES(vm2)\n+ADD_VETH(vm2, vm2, br-int, \"4242::3/64\", \"00:00:00:00:00:02\", \"4242::1\")\n+OVS_WAIT_UNTIL([test \"$(ip netns exec vm2 ip a | grep 4242::3 | grep tentative)\" = \"\"])\n+\n+# Wait for ovn-controller to catch up.\n+wait_for_ports_up\n+check ovn-nbctl --wait=hv sync\n+\n+# Start IPv6 TCP server on vm1.\n+NETNS_DAEMONIZE([vm1], [nc -k -l 4242::2 4242], [nc-vm1.pid])\n+\n+# Make sure connecting to the VIP works.\n+NS_CHECK_EXEC([vm2], [nc 6666::1 666 -p 2000 -z])\n+\n+# Start IPv6 TCP connection to VIP from vm2.\n+NS_CHECK_EXEC([vm2], [nc 6666::1 666 -p 2001 -z])\n+\n+# Check conntrack.  We expect two entries:\n+# - one in vm1's zone (firewall)\n+# - one in vm2's zone (dnat)\n+AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 2001 |             \\\n+grep \"orig=.src=4242::3\" |                                         \\\n+sed -e 's/port=2001/port=<clnt_s_port>/g'                           \\\n+    -e 's/sport=4242,dport=[[0-9]]\\+/sport=4242,dport=<rnd_port>/g' \\\n+    -e 's/state=[[0-9_A-Z]]*/state=<cleared>/g'                     \\\n+    -e 's/zone=[[0-9]]*/zone=<cleared>/' | sort], [0], [dnl\n+tcp,orig=(src=4242::3,dst=4242::2,sport=<clnt_s_port>,dport=4242),reply=(src=4242::2,dst=4242::3,sport=4242,dport=<clnt_s_port>),zone=<cleared>,protoinfo=(state=<cleared>)\n+tcp,orig=(src=4242::3,dst=6666::1,sport=<clnt_s_port>,dport=666),reply=(src=4242::2,dst=4242::3,sport=4242,dport=<clnt_s_port>),zone=<cleared>,labels=0x2,protoinfo=(state=<cleared>)\n+])\n+\n+# Start IPv6 TCP connection to backend IP from vm2 which would require\n+# additional source port translation to avoid a tuple conflict.\n+NS_CHECK_EXEC([vm2], [nc 4242::2 4242 -p 2001 -z])\n+\n+# Check conntrack.  We expect three entries:\n+# - one in vm1's zone (firewall) - reused from the previous connection.\n+# - one in vm2's zone (dnat) - still in TIME_WAIT after the previous connection.\n+# - one in vm2's zone (firewall + additional all-zero SNAT)\n+AT_CHECK([ovs-appctl dpctl/dump-conntrack | grep 2001 |             \\\n+grep \"orig=.src=4242::3\" |                                          \\\n+sed -e 's/port=2001/port=<clnt_s_port>/g'                           \\\n+    -e 's/sport=4242,dport=[[0-9]]\\+/sport=4242,dport=<rnd_port>/g' \\\n+    -e 's/state=[[0-9_A-Z]]*/state=<cleared>/g'                     \\\n+    -e 's/zone=[[0-9]]*/zone=<cleared>/' | sort], [0], [dnl\n+tcp,orig=(src=4242::3,dst=4242::2,sport=<clnt_s_port>,dport=4242),reply=(src=4242::2,dst=4242::3,sport=4242,dport=<clnt_s_port>),zone=<cleared>,protoinfo=(state=<cleared>)\n+tcp,orig=(src=4242::3,dst=4242::2,sport=<clnt_s_port>,dport=4242),reply=(src=4242::2,dst=4242::3,sport=4242,dport=<rnd_port>),zone=<cleared>,protoinfo=(state=<cleared>)\n+tcp,orig=(src=4242::3,dst=6666::1,sport=<clnt_s_port>,dport=666),reply=(src=4242::2,dst=4242::3,sport=4242,dport=<clnt_s_port>),zone=<cleared>,labels=0x2,protoinfo=(state=<cleared>)\n+])\n+\n+AT_CLEANUP\n+])\n+\n # When a lport is released on a chassis, ovn-controller was\n # not clearing some of the flowss in the table 33 leading\n # to packet drops if ct() is hit.\ndiff --git a/tests/testsuite.at b/tests/testsuite.at\nindex ddc3f11d6..b716a1ad9 100644\n--- a/tests/testsuite.at\n+++ b/tests/testsuite.at\n@@ -27,6 +27,7 @@ m4_include([tests/ovn.at])\n m4_include([tests/ovn-performance.at])\n m4_include([tests/ovn-northd.at])\n m4_include([tests/ovn-nbctl.at])\n+m4_include([tests/ovn-features.at])\n m4_include([tests/ovn-lflow-cache.at])\n m4_include([tests/ovn-ofctrl-seqno.at])\n m4_include([tests/ovn-sbctl.at])\n",
    "prefixes": [
        "ovs-dev",
        "1/2"
    ]
}