get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227902,
    "url": "http://patchwork.ozlabs.org/api/patches/2227902/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20260424132342.3486635-5-amusil@redhat.com/",
    "project": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/projects/68/?format=api",
        "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": "<20260424132342.3486635-5-amusil@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-24T13:23:39",
    "name": "[ovs-dev,4/7] controller: Accept ECMP FDB entries.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "fb1854859b5aa5dd722e8052280eb08724328d2b",
    "submitter": {
        "id": 83634,
        "url": "http://patchwork.ozlabs.org/api/people/83634/?format=api",
        "name": "Ales Musil",
        "email": "amusil@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20260424132342.3486635-5-amusil@redhat.com/mbox/",
    "series": [
        {
            "id": 501360,
            "url": "http://patchwork.ozlabs.org/api/series/501360/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=501360",
            "date": "2026-04-24T13:23:35",
            "name": "This series adds support for Equal-Cost Multi-Path (ECMP) FDB entries",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501360/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227902/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227902/checks/",
    "tags": {},
    "related": [],
    "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=W0TCy+8b;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)",
            "smtp3.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=W0TCy+8b",
            "smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "smtp4.osuosl.org;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.a=rsa-sha256 header.s=mimecast20190719 header.b=W0TCy+8b"
        ],
        "Received": [
            "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\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 4g2DFG46bQz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 23:24:02 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 35B6C61B0C;\n\tFri, 24 Apr 2026 13:24:01 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id rUnBOFBTZP_9; Fri, 24 Apr 2026 13:23:59 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp3.osuosl.org (Postfix) with ESMTPS id CB10361AEB;\n\tFri, 24 Apr 2026 13:23:58 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id A9896C04FB;\n\tFri, 24 Apr 2026 13:23:58 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 24980C04FA\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:57 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 0EFC2427D4\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:56 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id TyMJWYgk2Y-W for <dev@openvswitch.org>;\n Fri, 24 Apr 2026 13:23:55 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp4.osuosl.org (Postfix) with ESMTPS id E85A0427E7\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:54 +0000 (UTC)",
            "from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-671-276akqoAOqSp6nJ3bW0Ilg-1; Fri,\n 24 Apr 2026 09:23:52 -0400",
            "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 9DDB818004A9\n for <dev@openvswitch.org>; Fri, 24 Apr 2026 13:23:51 +0000 (UTC)",
            "from amusil.redhat.com (unknown [10.44.32.61])\n by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 72CE8180047F; Fri, 24 Apr 2026 13:23:50 +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 smtp3.osuosl.org CB10361AEB",
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org E85A0427E7"
        ],
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org E85A0427E7",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777037033;\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=SKdslUSuGxtwN0PQfUr/oSCFNMV9gQxPJSYEyppEksM=;\n b=W0TCy+8bjjEH+k5dpWT4952UyuA3MFaqN7kEYv6nWHzyi5NL/iEinlBF2NL9QKvTBT70BL\n hvluIYKeCGUirujTkN31/pxFWgGKHo/8guTDuwUixu9reJepJHXS9JNgUyaN2iA2yL8vVV\n Ni+f1ttXSsvoqaxc5VRhCE3Fa328VQ4=",
        "X-MC-Unique": "276akqoAOqSp6nJ3bW0Ilg-1",
        "X-Mimecast-MFC-AGG-ID": "276akqoAOqSp6nJ3bW0Ilg_1777037031",
        "To": "dev@openvswitch.org",
        "Date": "Fri, 24 Apr 2026 15:23:39 +0200",
        "Message-ID": "<20260424132342.3486635-5-amusil@redhat.com>",
        "In-Reply-To": "<20260424132342.3486635-1-amusil@redhat.com>",
        "References": "<20260424132342.3486635-1-amusil@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "1MCMcakbTgXM7SC-eSAUV3QuXw7PcbGUGUuWYVS4U5Q_1777037031",
        "X-Mimecast-Originator": "redhat.com",
        "Subject": "[ovs-dev] [PATCH ovn 4/7] controller: Accept ECMP FDB entries.",
        "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": "Ales Musil via dev <ovs-dev@openvswitch.org>",
        "Reply-To": "Ales Musil <amusil@redhat.com>",
        "Cc": "dceara@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": "Accept FDB entries with nexthop group ID (nh_id) in\nne_is_valid_static_fdb(), alongside the existing single-VTEP-IP\nentries. Thread nh_id through evpn_static_entry so it is available\nfor downstream resolution.\n\nAssisted-by: Claude Opus 4.6, Claude Code\nSigned-off-by: Ales Musil <amusil@redhat.com>\n---\n controller/neighbor-exchange-netlink.c |  8 ++++---\n controller/neighbor-exchange.c         | 31 ++++++++++++++------------\n controller/neighbor-exchange.h         |  5 ++++-\n 3 files changed, 26 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/controller/neighbor-exchange-netlink.c b/controller/neighbor-exchange-netlink.c\nindex 9eecf9f5b..5ea8aeb58 100644\n--- a/controller/neighbor-exchange-netlink.c\n+++ b/controller/neighbor-exchange-netlink.c\n@@ -193,13 +193,15 @@ ne_is_valid_remote_vtep(struct ne_nl_received_neigh *ne)\n     return false;\n }\n \n-/* OVN expects that the FDB entry has an IP address (that of the remote VTEP),\n- * has MAC address and the entry is marked as \"extern learned\". */\n+/* OVN expects that the FDB entry has a MAC address, the entry is marked as\n+ * \"extern learned\", and either has an IP address (that of the remote VTEP)\n+ * or a nexthop group ID (for ECMP/multi-homed entries). */\n bool\n ne_is_valid_static_fdb(struct ne_nl_received_neigh *ne)\n {\n     return !eth_addr_is_zero(ne->lladdr) &&\n-           ipv6_addr_is_set(&ne->addr) && ne->flags & NTF_EXT_LEARNED;\n+           (ipv6_addr_is_set(&ne->addr) || ne->nh_id) &&\n+           ne->flags & NTF_EXT_LEARNED;\n }\n \n /* OVN expects that the ARP entry has an IP address, a MAC address,\ndiff --git a/controller/neighbor-exchange.c b/controller/neighbor-exchange.c\nindex 47e757712..43626cc21 100644\n--- a/controller/neighbor-exchange.c\n+++ b/controller/neighbor-exchange.c\n@@ -39,13 +39,13 @@ static struct evpn_remote_vtep *evpn_remote_vtep_find(\n     uint16_t port, uint32_t vni);\n static void evpn_static_entry_add(struct hmap *static_entries,\n                                   struct eth_addr mac, struct in6_addr ip,\n-                                  uint32_t vni);\n+                                  uint32_t vni, uint32_t nh_id);\n static struct evpn_static_entry *evpn_static_entry_find(\n     const struct hmap *static_entries, struct eth_addr mac,\n-    struct in6_addr ip, uint32_t vni);\n+    struct in6_addr ip, uint32_t vni, uint32_t nh_id);\n static uint32_t evpn_static_entry_hash(const struct eth_addr *mac,\n                                        const struct in6_addr *ip,\n-                                       uint32_t vni);\n+                                       uint32_t vni, uint32_t nh_id);\n \n /* Last neighbor_exchange netlink operation. */\n static int neighbor_exchange_nl_status;\n@@ -100,10 +100,10 @@ neighbor_exchange_run(const struct neighbor_exchange_ctx_in *n_ctx_in,\n                 if (ne_is_valid_static_arp(ne)) {\n                     if (!evpn_static_entry_find(n_ctx_out->static_arps,\n                                                 ne->lladdr, ne->addr,\n-                                                nim->vni)) {\n+                                                nim->vni, 0)) {\n                         evpn_static_entry_add(n_ctx_out->static_arps,\n                                               ne->lladdr, ne->addr,\n-                                              nim->vni);\n+                                              nim->vni, 0);\n                     }\n                 }\n             }\n@@ -122,10 +122,10 @@ neighbor_exchange_run(const struct neighbor_exchange_ctx_in *n_ctx_in,\n                 if (ne_is_valid_static_fdb(ne)) {\n                     if (!evpn_static_entry_find(n_ctx_out->static_fdbs,\n                                                 ne->lladdr, ne->addr,\n-                                                nim->vni)) {\n+                                                nim->vni, ne->nh_id)) {\n                         evpn_static_entry_add(n_ctx_out->static_fdbs,\n                                               ne->lladdr, ne->addr,\n-                                              nim->vni);\n+                                              nim->vni, ne->nh_id);\n                     }\n                 }\n             }\n@@ -230,30 +230,32 @@ evpn_remote_vtep_hash(const struct in6_addr *ip, uint16_t port,\n \n static void\n evpn_static_entry_add(struct hmap *static_entries, struct eth_addr mac,\n-                      struct in6_addr ip, uint32_t vni)\n+                      struct in6_addr ip, uint32_t vni, uint32_t nh_id)\n {\n     struct evpn_static_entry *e = xmalloc(sizeof *e);\n     *e = (struct evpn_static_entry) {\n         .mac = mac,\n         .ip = ip,\n         .vni = vni,\n+        .nh_id = nh_id,\n     };\n \n     hmap_insert(static_entries, &e->hmap_node,\n-                evpn_static_entry_hash(&mac, &ip, vni));\n+                evpn_static_entry_hash(&mac, &ip, vni, nh_id));\n }\n \n static struct evpn_static_entry *\n evpn_static_entry_find(const struct hmap *static_entries, struct eth_addr mac,\n-                       struct in6_addr ip, uint32_t vni)\n+                       struct in6_addr ip, uint32_t vni, uint32_t nh_id)\n {\n-    uint32_t hash = evpn_static_entry_hash(&mac, &ip, vni);\n+    uint32_t hash = evpn_static_entry_hash(&mac, &ip, vni, nh_id);\n \n     struct evpn_static_entry *e;\n     HMAP_FOR_EACH_WITH_HASH (e, hmap_node, hash, static_entries) {\n         if (eth_addr_equals(e->mac, mac) &&\n             ipv6_addr_equals(&e->ip, &ip) &&\n-            e->vni == vni) {\n+            e->vni == vni &&\n+            e->nh_id == nh_id) {\n             return e;\n         }\n     }\n@@ -263,12 +265,13 @@ evpn_static_entry_find(const struct hmap *static_entries, struct eth_addr mac,\n \n static uint32_t\n evpn_static_entry_hash(const struct eth_addr *mac, const struct in6_addr *ip,\n-                       uint32_t vni)\n+                       uint32_t vni, uint32_t nh_id)\n {\n     uint32_t hash = 0;\n     hash = hash_bytes(mac, sizeof *mac, hash);\n     hash = hash_add_in6_addr(hash, ip);\n     hash = hash_add(hash, vni);\n+    hash = hash_add(hash, nh_id);\n \n-    return hash_finish(hash, 26);\n+    return hash_finish(hash, 30);\n }\ndiff --git a/controller/neighbor-exchange.h b/controller/neighbor-exchange.h\nindex 32c87a8ab..456ff23df 100644\n--- a/controller/neighbor-exchange.h\n+++ b/controller/neighbor-exchange.h\n@@ -56,10 +56,13 @@ struct evpn_static_entry {\n     struct hmap_node hmap_node;\n     /* MAC address of the remote workload. */\n     struct eth_addr mac;\n-    /* Destination ip of the remote tunnel or remote IP. */\n+    /* Destination IP of the remote tunnel or remote IP.\n+     * Zero if nh_id is set. */\n     struct in6_addr ip;\n     /* VNI of the VTEP. */\n     uint32_t vni;\n+    /* Nexthop group ID for ECMP/multi-homed entries, 0 if ip is set. */\n+    uint32_t nh_id;\n };\n \n void neighbor_exchange_run(const struct neighbor_exchange_ctx_in *,\n",
    "prefixes": [
        "ovs-dev",
        "4/7"
    ]
}