Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217289/?format=api
{ "id": 2217289, "url": "http://patchwork.ozlabs.org/api/patches/2217289/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20260327205322.1804579-1-dceara@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": "<20260327205322.1804579-1-dceara@redhat.com>", "list_archive_url": null, "date": "2026-03-27T20:53:22", "name": "[ovs-dev] northd: Fix requested-tnl-key not reassigned after conflict resolved by deletion.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2e59c5169d3fb9b26ad9da1ef721f542c6249f7e", "submitter": { "id": 76591, "url": "http://patchwork.ozlabs.org/api/people/76591/?format=api", "name": "Dumitru Ceara", "email": "dceara@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20260327205322.1804579-1-dceara@redhat.com/mbox/", "series": [ { "id": 497827, "url": "http://patchwork.ozlabs.org/api/series/497827/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=497827", "date": "2026-03-27T20:53:22", "name": "[ovs-dev] northd: Fix requested-tnl-key not reassigned after conflict resolved by deletion.", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497827/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217289/comments/", "check": "warning", "checks": "http://patchwork.ozlabs.org/api/patches/2217289/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@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=BCQJGgJy;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)", "smtp4.osuosl.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=BCQJGgJy", "smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "smtp2.osuosl.org; dkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=BCQJGgJy" ], "Received": [ "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\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 4fjCXv58MQz1yGQ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 07:53:35 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 1AAFF411DC;\n\tFri, 27 Mar 2026 20:53:34 +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 xI-OyacExz76; Fri, 27 Mar 2026 20:53:33 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp4.osuosl.org (Postfix) with ESMTPS id CA63A41165;\n\tFri, 27 Mar 2026 20:53:32 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id A374EC054A;\n\tFri, 27 Mar 2026 20:53:32 +0000 (UTC)", "from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 40B15C0549\n for <ovs-dev@openvswitch.org>; Fri, 27 Mar 2026 20:53:31 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id 3B03040029\n for <ovs-dev@openvswitch.org>; Fri, 27 Mar 2026 20:53:31 +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 7V0VPLSd8eWD for <ovs-dev@openvswitch.org>;\n Fri, 27 Mar 2026 20:53:30 +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 1107440052\n for <ovs-dev@openvswitch.org>; Fri, 27 Mar 2026 20:53:29 +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-443-q7hG4uVtMqSkL0JnSXUQjw-1; Fri,\n 27 Mar 2026 16:53:26 -0400", "from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12])\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 B37DA1956055\n for <ovs-dev@openvswitch.org>; Fri, 27 Mar 2026 20:53:25 +0000 (UTC)", "from cecil-rh.redhat.com (unknown [10.45.224.19])\n by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id EF8A419560B1\n for <ovs-dev@openvswitch.org>; Fri, 27 Mar 2026 20:53:24 +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 smtp4.osuosl.org CA63A41165", "OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1107440052" ], "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=dceara@redhat.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp2.osuosl.org 1107440052", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1774644808;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=f8DwUYBGmriJ/2S53WMLlpC3ygB2MoqiJ+EbOe6uWH8=;\n b=BCQJGgJyQJ1xPlIhc/qJDmzi0T/2XJGUHO8FSjxPMNW5y021331FZKfhyj2EGaod3a33I+\n 7lfBqNCmoFwKPk97pAyV8F1U60g/vEH/dlgj5liY2ig+QiA5rZys2n9xOeKmQg0veFAQm2\n VMJTlmAhX6+r2D+VRZt+OHI0fUa6f68=", "X-MC-Unique": "q7hG4uVtMqSkL0JnSXUQjw-1", "X-Mimecast-MFC-AGG-ID": "q7hG4uVtMqSkL0JnSXUQjw_1774644805", "To": "ovs-dev@openvswitch.org", "Date": "Fri, 27 Mar 2026 21:53:22 +0100", "Message-ID": "<20260327205322.1804579-1-dceara@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.12", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "5oi-Piw8MFXnAUehi_2qgI6aD6woOdravZQeE3ljhWk_1774644805", "X-Mimecast-Originator": "redhat.com", "Subject": "[ovs-dev] [PATCH ovn] northd: Fix requested-tnl-key not reassigned\n after conflict resolved by deletion.", "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": "Dumitru Ceara via dev <ovs-dev@openvswitch.org>", "Reply-To": "Dumitru Ceara <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": "When two switch ports are configured with the same requested-tnl-key,\nonly one port gets the requested key while the other gets a random one.\nIf the port whose request was satisfied is deleted, the remaining port's\ntunnel key was not updated until a full recompute.\n\nFix this by tracking in the datapath whether any port had a\nrequested-tnl-key conflict. When a port is deleted from such a\ndatapath, fall back to recompute so the tunnel key is properly\nreassigned.\n\nThe change is a bit aggressive and will trigger recomputes every time a\nport is deleted from such a switch but we're in a situation in which the\nconfiguration is incorrect so it's probably acceptable and definitely\nbetter than the old behavior of just remaining in an inconsistent state\nuntil a recompute happens (potentially for ever).\n\nReported-at: https://redhat.atlassian.net/browse/FDP-3560\nAssisted-by: Claude, with model: claude-opus-4-6\nSigned-off-by: Dumitru Ceara <dceara@redhat.com>\n---\n northd/northd.c | 9 +++++++++\n northd/northd.h | 3 +++\n tests/ovn-northd.at | 25 +++++++++++++++++++++++++\n 3 files changed, 37 insertions(+)", "diff": "diff --git a/northd/northd.c b/northd/northd.c\nindex ac23614172..b7239f4e20 100644\n--- a/northd/northd.c\n+++ b/northd/northd.c\n@@ -4279,6 +4279,7 @@ ovn_port_assign_requested_tnl_id(struct ovn_port *op)\n \"%\"PRIu32\" as another LSP or LRP\",\n op->nbsp ? \"switch\" : \"router\",\n op_get_name(op), tunnel_key);\n+ op->od->port_key_conflict = true;\n return false;\n }\n }\n@@ -4985,6 +4986,14 @@ ls_handle_lsp_changes(struct ovsdb_idl_txn *ovnsb_idl_txn,\n * impacted by this deletion. Fallback to recompute. */\n goto fail;\n }\n+ if (od->port_key_conflict &&\n+ smap_get_int(&op->nbsp->options, \"requested-tnl-key\", 0)) {\n+ /* Some port in this datapath had a requested-tnl-key\n+ * that couldn't be satisfied due to a conflict. Now\n+ * that a port is being deleted the conflict may be\n+ * resolved; fall back to recompute. */\n+ goto fail;\n+ }\n add_op_to_northd_tracked_ports(&trk_lsps->deleted, op);\n hmap_remove(&nd->ls_ports, &op->key_node);\n hmap_remove(&od->ports, &op->dp_node);\ndiff --git a/northd/northd.h b/northd/northd.h\nindex 884edc22d9..1395190064 100644\n--- a/northd/northd.h\n+++ b/northd/northd.h\n@@ -417,6 +417,9 @@ struct ovn_datapath {\n struct hmap port_tnlids;\n uint32_t port_key_hint;\n \n+ bool port_key_conflict; /* True if a port's requested-tnl-key could\n+ * not be assigned due to a conflict. */\n+\n bool has_unknown;\n bool has_vtep_lports;\n bool has_arp_proxy_port;\ndiff --git a/tests/ovn-northd.at b/tests/ovn-northd.at\nindex 3e7a6f7f80..6230fd039a 100644\n--- a/tests/ovn-northd.at\n+++ b/tests/ovn-northd.at\n@@ -3049,6 +3049,31 @@ AT_CHECK([test $lsp02 = 3 && test $ls1 = 123])\n OVN_CLEANUP_NORTHD\n AT_CLEANUP\n ])\n+\n+OVN_FOR_EACH_NORTHD_NO_HV([\n+AT_SETUP([port requested-tnl-key -- conflict resolved on deletion])\n+AT_KEYWORDS([requested tnl tunnel key keys])\n+ovn_start\n+\n+AS_BOX([Create two ports with the same requested-tnl-key])\n+check ovn-nbctl --wait=sb ls-add ls \\\n+ -- lsp-add ls lsp1 \\\n+ -- set logical_switch_port lsp1 options:requested-tnl-key=1 \\\n+ -- lsp-add ls lsp2 \\\n+ -- set logical_switch_port lsp2 options:requested-tnl-key=1\n+\n+AS_BOX([Delete the port that got key 1])\n+lsp=$(fetch_column port_binding logical_port tunnel_key=1)\n+check test -n \"$lsp\"\n+check ovn-nbctl --wait=sb lsp-del $lsp\n+\n+AS_BOX([Remaining port should now have tunnel_key=1])\n+check_column 1 Port_Binding tunnel_key\n+\n+OVN_CLEANUP_NORTHD\n+AT_CLEANUP\n+])\n+\n OVN_FOR_EACH_NORTHD_NO_HV([\n AT_SETUP([check VXLAN mode disabling])\n ovn_start\n", "prefixes": [ "ovs-dev" ] }