get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2221013/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2221013,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2221013/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260408170613.587902-11-aconole@redhat.com/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/47/?format=api",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs"
    },
    "msgid": "<20260408170613.587902-11-aconole@redhat.com>",
    "date": "2026-04-08T17:06:06",
    "name": "[ovs-dev,RFC,10/12] conntrack: Propagate input netdev pointer to conntrack.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "14e2ccba1ca96a3585396ccfb94ec29ee9613026",
    "submitter": {
        "id": 67184,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/67184/?format=api",
        "name": "Aaron Conole",
        "email": "aconole@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260408170613.587902-11-aconole@redhat.com/mbox/",
    "series": [
        {
            "id": 499163,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499163/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=499163",
            "date": "2026-04-08T17:05:56",
            "name": "ct-offload: Introduce a conntrack offload infrastructure.",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499163/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221013/comments/",
    "check": "fail",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221013/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "legolas.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=W4SY8Cho;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)",
            "smtp2.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=W4SY8Cho",
            "smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com"
        ],
        "Received": [
            "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frTyC5w3yz1xv0\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 03:07:15 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id 74A64408F6;\n\tWed,  8 Apr 2026 17:07:14 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 8AjK9X32yEFw; Wed,  8 Apr 2026 17:07:12 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id 1BF46408AB;\n\tWed,  8 Apr 2026 17:07:08 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id B7CCCC0903;\n\tWed,  8 Apr 2026 17:07:07 +0000 (UTC)",
            "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 13535C0904\n for <dev@openvswitch.org>; Wed,  8 Apr 2026 17:07:07 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id C6ABD4051C\n for <dev@openvswitch.org>; Wed,  8 Apr 2026 17:06:42 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id YO22MN7yJEUe for <dev@openvswitch.org>;\n Wed,  8 Apr 2026 17:06:42 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp2.osuosl.org (Postfix) with ESMTPS id D96CD407FB\n for <dev@openvswitch.org>; Wed,  8 Apr 2026 17:06:41 +0000 (UTC)",
            "from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-199-j1C4kDroM0qt6Nsm6Ee1fA-1; Wed,\n 08 Apr 2026 13:06:39 -0400",
            "from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 3EF401956060; Wed,  8 Apr 2026 17:06:38 +0000 (UTC)",
            "from RHTRH0061144.redhat.com (unknown [10.22.89.172])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 77D52300019F; Wed,  8 Apr 2026 17:06:36 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections - client-ip=140.211.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1BF46408AB",
            "OpenDKIM Filter v2.11.0 smtp2.osuosl.org D96CD407FB"
        ],
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=aconole@redhat.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp2.osuosl.org D96CD407FB",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775668000;\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=QVbK0aQ1aUaNEWy7oYrBR6yLKJYUEQzlo9UJQ681MwM=;\n b=W4SY8Cho+ragXJWGnKUF236vmrt+O7QUnCWu0aLBcyklYXwsWO0+DtgV99HzcJsWBDm+H2\n eLtJ4zbWUQqb3DoBN3Vk+d0Hsxk2++9K524jGF0hF2BsO/ucRvA8tfDX43yYdhBKqy0wbl\n mlcy7MdQWezQvM6qxFq8kDbpR4nsFa0=",
        "X-MC-Unique": "j1C4kDroM0qt6Nsm6Ee1fA-1",
        "X-Mimecast-MFC-AGG-ID": "j1C4kDroM0qt6Nsm6Ee1fA_1775667998",
        "To": "dev@openvswitch.org",
        "Date": "Wed,  8 Apr 2026 13:06:06 -0400",
        "Message-ID": "<20260408170613.587902-11-aconole@redhat.com>",
        "In-Reply-To": "<20260408170613.587902-1-aconole@redhat.com>",
        "References": "<20260408170613.587902-1-aconole@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.4",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "SFDuyCD9G5Wcn42Tqrn8zk1LWXz9K3Rch0Cx0BsUSNc_1775667998",
        "X-Mimecast-Originator": "redhat.com",
        "Subject": "[ovs-dev] [RFC 10/12] conntrack: Propagate input netdev pointer to\n conntrack.",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.30",
        "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>",
        "From": "Aaron Conole via dev <ovs-dev@openvswitch.org>",
        "Reply-To": "Aaron Conole <aconole@redhat.com>",
        "Cc": "Eli Britstein <elibr@nvidia.com>, Florian Westphal <fwestpha@redhat.com>,\n Flavio Leitner <fbl@redhat.com>",
        "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": "Offloading providers will need input port details in order to\ncorrectly map the packet movement.  They will also need the output\nport mapping for the batch, but that will come in the future.\n\nSigned-off-by: Aaron Conole <aconole@redhat.com>\n---\n lib/conntrack.c        | 10 +++++-----\n lib/conntrack.h        |  5 ++++-\n lib/dpif-netdev.c      | 14 +++++++++++++-\n tests/test-conntrack.c | 18 +++++++++---------\n 4 files changed, 31 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/lib/conntrack.c b/lib/conntrack.c\nindex e59630aa2b..5491b3471f 100644\n--- a/lib/conntrack.c\n+++ b/lib/conntrack.c\n@@ -1335,7 +1335,7 @@ process_one(struct conntrack *ct, struct dp_packet *pkt,\n             bool force, bool commit, long long now, const uint32_t *setmark,\n             const struct ovs_key_ct_labels *setlabel,\n             const struct nat_action_info_t *nat_action_info,\n-            const char *helper, uint32_t tp_id)\n+            const char *helper, uint32_t tp_id, struct netdev *in_netdev)\n {\n     /* Reset ct_state whenever entering a new zone. */\n     if (pkt->md.ct_state && pkt->md.ct_zone != zone) {\n@@ -1410,7 +1410,7 @@ process_one(struct conntrack *ct, struct dp_packet *pkt,\n         if (conn && ct_offload_enabled()) {\n             struct ct_offload_ctx offload_ctx = {\n                 .conn           = conn,\n-                .netdev_in      = NULL,\n+                .netdev_in      = in_netdev,\n                 .input_port_id  = pkt->md.in_port.odp_port,\n             };\n             ct_offload_conn_add(&offload_ctx);\n@@ -1428,7 +1428,7 @@ process_one(struct conntrack *ct, struct dp_packet *pkt,\n          * reverse direction port. */\n         struct ct_offload_ctx offload_ctx = {\n             .conn          = conn,\n-            .netdev_in     = NULL,\n+            .netdev_in     = in_netdev,\n             .input_port_id = pkt->md.in_port.odp_port,\n         };\n         ct_offload_conn_established(&offload_ctx);\n@@ -1465,7 +1465,7 @@ conntrack_execute(struct conntrack *ct, struct dp_packet_batch *pkt_batch,\n                   const struct ovs_key_ct_labels *setlabel,\n                   const char *helper,\n                   const struct nat_action_info_t *nat_action_info,\n-                  long long now, uint32_t tp_id)\n+                  long long now, uint32_t tp_id, struct netdev *in_netdev)\n {\n     odp_port_t in_port = ODPP_LOCAL;\n     struct conn_lookup_ctx ctx;\n@@ -1502,7 +1502,7 @@ conntrack_execute(struct conntrack *ct, struct dp_packet_batch *pkt_batch,\n             write_ct_md(packet, zone, NULL, NULL, NULL);\n         } else {\n             process_one(ct, packet, &ctx, zone, force, commit, now, setmark,\n-                        setlabel, nat_action_info, helper, tp_id);\n+                        setlabel, nat_action_info, helper, tp_id, in_netdev);\n         }\n     }\n \ndiff --git a/lib/conntrack.h b/lib/conntrack.h\nindex e5ca1528bf..fc4a529e2a 100644\n--- a/lib/conntrack.h\n+++ b/lib/conntrack.h\n@@ -130,6 +130,8 @@ typedef unsigned int ct_private_id_t;\n  * this slot (i.e. at module initialization time). */\n ct_private_id_t conn_private_id_alloc(void (*destructor)(void *));\n \n+struct netdev;\n+\n struct conntrack *conntrack_init(void);\n void conntrack_destroy(struct conntrack *);\n \n@@ -139,7 +141,8 @@ int conntrack_execute(struct conntrack *ct, struct dp_packet_batch *pkt_batch,\n                       const struct ovs_key_ct_labels *setlabel,\n                       const char *helper,\n                       const struct nat_action_info_t *nat_action_info,\n-                      long long now, uint32_t tp_id);\n+                      long long now, uint32_t tp_id,\n+                      struct netdev *in_netdev);\n void conntrack_clear(struct dp_packet *packet);\n \n struct conntrack_dump {\ndiff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c\nindex 9df05c4c28..b721169758 100644\n--- a/lib/dpif-netdev.c\n+++ b/lib/dpif-netdev.c\n@@ -8630,6 +8630,8 @@ dp_execute_cb(void *aux_, struct dp_packet_batch *packets_,\n         break;\n \n     case OVS_ACTION_ATTR_CT: {\n+        struct dp_netdev_port *in_port_p = NULL;;\n+        struct netdev *in_netdev = NULL;\n         const struct nlattr *b;\n         bool force = false;\n         bool commit = false;\n@@ -8762,9 +8764,19 @@ dp_execute_cb(void *aux_, struct dp_packet_batch *packets_,\n             VLOG_WARN_RL(&rl, \"NAT specified without commit.\");\n         }\n \n+        if (!dp_packet_batch_is_empty(packets_)) {\n+            odp_port_t query_port = packets_->packets[0]->md.in_port.odp_port;\n+            in_port_p = dp_netdev_lookup_port(dp, query_port);\n+        }\n+\n+        if (in_port_p) {\n+            in_netdev = in_port_p->netdev;\n+        }\n+\n         conntrack_execute(dp->conntrack, packets_, aux->flow->dl_type, force,\n                           commit, zone, setmark, setlabel, helper,\n-                          nat_action_info_ref, pmd->ctx.now / 1000, tp_id);\n+                          nat_action_info_ref, pmd->ctx.now / 1000, tp_id,\n+                          in_netdev);\n         break;\n     }\n \ndiff --git a/tests/test-conntrack.c b/tests/test-conntrack.c\nindex 7f42adbb55..3c409b373b 100644\n--- a/tests/test-conntrack.c\n+++ b/tests/test-conntrack.c\n@@ -198,7 +198,7 @@ ct_thread_main(void *aux_)\n     ovs_barrier_block(&barrier);\n     for (i = 0; i < n_pkts; i += batch_size) {\n         conntrack_execute(ct, pkt_batch, dl_type, false, true, 0, NULL, NULL,\n-                          NULL, NULL, now, 0);\n+                          NULL, NULL, now, 0, NULL);\n         DP_PACKET_BATCH_FOR_EACH (j, pkt, pkt_batch) {\n             pkt_metadata_init_conn(&pkt->md);\n         }\n@@ -311,7 +311,7 @@ test_benchmark_zones(struct ovs_cmdl_context *ctx)\n     for (i = 0; i < n_zones; i++) {\n         for (j = 0; j < n_conns; j++) {\n             conntrack_execute(ct, pkt_batch[j], dl_type, false, true, i,\n-                              NULL, NULL, NULL, NULL, now, 0);\n+                              NULL, NULL, NULL, NULL, now, 0, NULL);\n             pkt_metadata_init_conn(&pkt_batch[j]->packets[0]->md);\n         }\n     }\n@@ -334,7 +334,7 @@ test_benchmark_zones(struct ovs_cmdl_context *ctx)\n         stopwatch_start(STOPWATCH_CT_EXECUTE_COMMIT, time_usec());\n         for (j = 0; j < n_conns; j++) {\n             conntrack_execute(ct, pkt_batch[j], dl_type, false, true, zone,\n-                              NULL, NULL, NULL, NULL, now, 0);\n+                              NULL, NULL, NULL, NULL, now, 0, NULL);\n             pkt_metadata_init_conn(&pkt_batch[j]->packets[0]->md);\n         }\n         stopwatch_stop(STOPWATCH_CT_EXECUTE_COMMIT, time_usec());\n@@ -343,7 +343,7 @@ test_benchmark_zones(struct ovs_cmdl_context *ctx)\n         stopwatch_start(STOPWATCH_CT_EXECUTE_NO_COMMIT, time_usec());\n         for (j = 0; j < n_conns; j++) {\n             conntrack_execute(ct, pkt_batch[j], dl_type, false, false, zone,\n-                              NULL, NULL, NULL, NULL, now, 0);\n+                              NULL, NULL, NULL, NULL, now, 0, NULL);\n             pkt_metadata_init_conn(&pkt_batch[j]->packets[0]->md);\n         }\n         stopwatch_stop(STOPWATCH_CT_EXECUTE_NO_COMMIT, time_usec());\n@@ -419,7 +419,7 @@ pcap_batch_execute_conntrack(struct conntrack *ct_,\n \n         if (flow.dl_type != dl_type) {\n             conntrack_execute(ct_, &new_batch, dl_type, false, true, 0,\n-                              NULL, NULL, NULL, NULL, now, 0);\n+                              NULL, NULL, NULL, NULL, now, 0, NULL);\n             dp_packet_batch_init(&new_batch);\n         }\n         dp_packet_batch_add(&new_batch, packet);\n@@ -427,7 +427,7 @@ pcap_batch_execute_conntrack(struct conntrack *ct_,\n \n     if (!dp_packet_batch_is_empty(&new_batch)) {\n         conntrack_execute(ct_, &new_batch, dl_type, false, true, 0, NULL, NULL,\n-                          NULL, NULL, now, 0);\n+                          NULL, NULL, now, 0, NULL);\n     }\n \n }\n@@ -540,7 +540,7 @@ test_ftp_alg_large_payload(struct ovs_cmdl_context *ctx OVS_UNUSED)\n     struct dp_packet_batch syn_batch;\n     dp_packet_batch_init_packet(&syn_batch, syn);\n     conntrack_execute(ct, &syn_batch, htons(ETH_TYPE_IP), false, true, 0,\n-                      NULL, NULL, \"ftp\", &nat_info, now, 0);\n+                      NULL, NULL, \"ftp\", &nat_info, now, 0, NULL);\n     dp_packet_delete_batch(&syn_batch, true);\n \n     /* We get to skip some of the processing because the conntrack execute\n@@ -563,7 +563,7 @@ test_ftp_alg_large_payload(struct ovs_cmdl_context *ctx OVS_UNUSED)\n     struct dp_packet_batch port_batch;\n     dp_packet_batch_init_packet(&port_batch, port_pkt);\n     conntrack_execute(ct, &port_batch, htons(ETH_TYPE_IP), false, true, 0,\n-                      NULL, NULL, \"ftp\", &nat_info, now, 0);\n+                      NULL, NULL, \"ftp\", &nat_info, now, 0, NULL);\n \n     struct tcp_header *th = dp_packet_l4(port_pkt);\n     size_t tcp_hdr_len = TCP_OFFSET(th->tcp_ctl) * 4;\n@@ -660,7 +660,7 @@ test_private_destructor(struct ovs_cmdl_context *ctx OVS_UNUSED)\n \n     long long now = time_msec();\n     conntrack_execute(lct, &batch, dl_type, false, true, 0,\n-                      NULL, NULL, NULL, NULL, now, 0);\n+                      NULL, NULL, NULL, NULL, now, 0, NULL);\n \n     /* After a committed execute the packet carries a cached conn pointer. */\n     struct conn *conn = pkt->md.conn;\n",
    "prefixes": [
        "ovs-dev",
        "RFC",
        "10/12"
    ]
}