Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218451/?format=api
{ "id": 2218451, "url": "http://patchwork.ozlabs.org/api/patches/2218451/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260401091318.2671624-3-elibr@nvidia.com/", "project": { "id": 47, "url": "http://patchwork.ozlabs.org/api/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", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260401091318.2671624-3-elibr@nvidia.com>", "list_archive_url": null, "date": "2026-04-01T09:13:09", "name": "[ovs-dev,v3,02/11] refmap: Introduce reference map.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6da46adb1bbeb539293a924dadd1be5738f24ebb", "submitter": { "id": 79848, "url": "http://patchwork.ozlabs.org/api/people/79848/?format=api", "name": "Eli Britstein", "email": "elibr@nvidia.com" }, "delegate": { "id": 75123, "url": "http://patchwork.ozlabs.org/api/users/75123/?format=api", "username": "echaudron", "first_name": "Eelco", "last_name": "Chaudron", "email": "echaudro@redhat.com" }, "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260401091318.2671624-3-elibr@nvidia.com/mbox/", "series": [ { "id": 498297, "url": "http://patchwork.ozlabs.org/api/series/498297/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=498297", "date": "2026-04-01T09:13:07", "name": "netdev-doca", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/498297/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218451/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2218451/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\" (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=DKMTEQMD;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.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\" (2048-bit key,\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=DKMTEQMD", "smtp1.osuosl.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com", "smtp1.osuosl.org; dkim=pass (2048-bit key,\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=DKMTEQMD" ], "Received": [ "from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.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 4flzpt434Wz1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 20:15:18 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id 7F2FB40800;\n\tWed, 1 Apr 2026 09:15:16 +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 sqsntG4AzrCR; Wed, 1 Apr 2026 09:15:11 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id 050024087E;\n\tWed, 1 Apr 2026 09:15:11 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id DFD77C0070;\n\tWed, 1 Apr 2026 09:15:10 +0000 (UTC)", "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 1365EC054D\n for <dev@openvswitch.org>; Wed, 1 Apr 2026 09:15:10 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id D668F80BDF\n for <dev@openvswitch.org>; Wed, 1 Apr 2026 09:15:07 +0000 (UTC)", "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id iZZ0qg78TqAW for <dev@openvswitch.org>;\n Wed, 1 Apr 2026 09:15:04 +0000 (UTC)", "from BN1PR04CU002.outbound.protection.outlook.com\n (mail-eastus2azlp170100001.outbound.protection.outlook.com\n [IPv6:2a01:111:f403:c110::1])\n by smtp1.osuosl.org (Postfix) with ESMTPS id A7BAF807FA\n for <dev@openvswitch.org>; Wed, 1 Apr 2026 09:15:03 +0000 (UTC)", "from PH7P220CA0009.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:326::14)\n by CH1PPF0B4A257F6.namprd12.prod.outlook.com\n (2603:10b6:61f:fc00::605) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.15; Wed, 1 Apr\n 2026 09:14:50 +0000", "from SA2PEPF000015CD.namprd03.prod.outlook.com\n (2603:10b6:510:326:cafe::21) by PH7P220CA0009.outlook.office365.com\n (2603:10b6:510:326::14) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.29 via Frontend Transport; Wed,\n 1 Apr 2026 09:14:44 +0000", "from mail.nvidia.com (216.228.117.161) by\n SA2PEPF000015CD.mail.protection.outlook.com (10.167.241.203) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9769.17 via Frontend Transport; Wed, 1 Apr 2026 09:14:49 +0000", "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Wed, 1 Apr\n 2026 02:14:31 -0700", "from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Wed, 1 Apr\n 2026 02:14:28 -0700" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections -\n client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp2.osuosl.org 050024087E", "OpenDKIM Filter v2.11.0 smtp1.osuosl.org A7BAF807FA" ], "Received-SPF": [ "Pass (mailfrom) identity=mailfrom;\n client-ip=2a01:111:f403:c110::1;\n helo=bn1pr04cu002.outbound.protection.outlook.com;\n envelope-from=elibr@nvidia.com; receiver=<UNKNOWN>", "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.161 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp1.osuosl.org A7BAF807FA", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=CqXDWL8hpOZryHQ1Hvgu5ZURVoIDZzThqZTYVWaXGSkpXkiFaXGfCTJjeedQxSm+AFbEI8cdk4jNNA8DflF5d6XuMuTlxkoi3JxaR1eINH67cs41tFhmqa4lyqsSHiIfpQEmHjPSskprVqHIZAW5ew0BpGsxPglDpew6ff+wmNhoxzIeDVOK4Wbb8mN3Vqn3URsu97AgPXAisjeuem4ReYkTqqw6+8rPl3p2X4eRcjTfmdKe69mtgcjtKgiykyF3bpXhSU8bJjm/AMH3C3T/0kUWEoPKabHBZOBSoAJfZ7VvwsERjuHFnH0K0iHP4h8MzzhBZDLkiOzqEClvnlI1ng==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=Y0Hj6AIlhQ2Ij2uxi5C3g5YNmqeNot3nLeC8tgu4hZ4=;\n b=iSt+J08of6hcgnaCu1kfREadQy8SMYVKaJ9uUBXO5WM0Nm3lakuJDE83FTYm+zIf6vOPoF0sF6eB8ufA2TcZ2C4b5HfXnBI74oa3NrHIvZTgFFryikcb2xFeMS9TnFxovFW2YuWUOZfDOJH1Z/XSCnMWfOqyEPkzug1SlKM6XWTcFzsTdcy+3AUt/DSqujfc69rZP/yjvDQd3A+FWtEYYKD2oSpXfWJ4d/P1VYr8u4+l/zQm+Xmq5SoW4AgzAOatQGsxoL8l0s+UTU4SX06My0CYg/wTyLbioRbSlGpA8W3lradomFiXim1+XCLwJb+PdX53KD8hPg/5eG6Iuv0sTQ==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.161) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none (0)", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=Y0Hj6AIlhQ2Ij2uxi5C3g5YNmqeNot3nLeC8tgu4hZ4=;\n b=DKMTEQMDn7gj+ybNHKM7Sq/auuqSWNHQ6edvAdxoXic9PSNhvGmjQqlOn4xj0Oe4ywOOYJpqiGwFFuEWnm3VDqsiu8Fw6v5rzpcAHuhKBE5y+bvDaoc4ulLu8ijwdcx/rBg8WUyyG4Y7c1LqdVgAofpjs7wCA+zwH779ztGqEXsSVP52emQ41elIJkxiQ2rbK0ONRO28vszsMNs5DGYjBgTT677xtYp2NkTQ+0yhm1nuz+7PGAYeXiXSZPHBPj/Y/prALDyWALqCdoGEn5ut0AEnX7ESY3ZIxsIrPxlBINNzgtlJS14GOdJP+uvFyi19Q+CkrjaWRPUZFj1f9ghdFw==", "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.161)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;", "From": "Eli Britstein <elibr@nvidia.com>", "To": "<dev@openvswitch.org>", "Date": "Wed, 1 Apr 2026 12:13:09 +0300", "Message-ID": "<20260401091318.2671624-3-elibr@nvidia.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260401091318.2671624-1-elibr@nvidia.com>", "References": "<20260401091318.2671624-1-elibr@nvidia.com>", "MIME-Version": "1.0", "X-Originating-IP": "[10.126.231.35]", "X-ClientProxiedBy": "rnnvmail203.nvidia.com (10.129.68.9) To\n rnnvmail201.nvidia.com (10.129.68.8)", "X-EOPAttributedMessage": "0", "X-MS-PublicTrafficType": "Email", "X-MS-TrafficTypeDiagnostic": "SA2PEPF000015CD:EE_|CH1PPF0B4A257F6:EE_", "X-MS-Office365-Filtering-Correlation-Id": "959bcbb1-f4fc-420c-0922-08de8fcf2060", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "BCL:0;\n ARA:13230040|376014|36860700016|82310400026|1800799024|13003099007|22082099003|56012099003|18002099003;", "X-Microsoft-Antispam-Message-Info": "\n c/Q8l0BBoNd7HAjNYEDYnGPCA8Nzfq3LUfFrEcSVxovGzqr1baCCgylTzAnReWVBa9RcInMxuGcyxHJM4HiHjbBJFU35ly8aVwOTN6XchyLwcX3zSrDafcF/jhZP0NmsjxqoiSMEIJdB1VHnIb2RFJrTyl+ZcNJ/pmKJWqcACEPUaXnXx2ZFzwT2NoSb06JcvkWmYbI7Jh9LVhgMzhgGVigkIMvTc6bjpjiW5yBsC1iYYtYTVVXE58cFYCwSibjYVGYpqFj1c4saBM/RpUkkr9jPP3eZESlFxEBh1z/p2JTuto8sKwPOVUyVEKXNTjgfRrrDAx2DmMbTiNXqxC9i8YhdwDb/JwXkT8STstPdm/M4qe3Ml1MkFZX8JA00bGjwgG50oKNB62M0RoxQBQXroSzin70I8iL/CzNuDM8X1gLCdzkv6rHU1xVBfK1WHIDai4FHa376jugQyuoOrB4XR2/N2TlXvq+NN2mu2OfJfmCs3XlZ+KGR53uxDMOJerl6osoSZv/9P8sMpAaC2Xj0PpaTfV4QN7C90wr2sFYFO/3WRCWNwyqgNJ2cuTuKKmkJZZxzbn6/MglegXfFE9avrBNVQaKp1+KicRzlh33ZNiU8Y+AJARblP78bT1N8fjWSyaAEF6qk3ZfqhdjmrYO3fK4YiybXQjn1jqLYLYzki9Mse8CYMjIFpeBenZ9+nC8BIxh7B9MQc1rPFVi1igQ3O3TAcSqEGSAG43EdVFDhli75zZeN8TTHI6ZgJIvQBGOzIXmXmTHcCqdNEzklrwfIRA==", "X-Forefront-Antispam-Report": "CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE;\n SFS:(13230040)(376014)(36860700016)(82310400026)(1800799024)(13003099007)(22082099003)(56012099003)(18002099003);\n DIR:OUT; SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n 1IG7ZRBFkz8oD9z9D0veQwKLvDqUGsdRIpWhQM6QHAxKzL5LSt6OOS3eJ0VAWpEw6S5CG/QIHj657cBdZsa9ODrIK1fnCDFlPBNYs4ER946RdTJw1FD0UjT4zLsc6m9xPzb6V1BiPXoWh5zoXNljCXE75Iw0B+7m7n3OeZO6Nm591v86yPMM+ys8xkthta8xJZ69mIFijfsbb3prZsE3/uCQzwqR+DxXqU2DfESTtLsPvfcd/UhMrzUcFKdFETak+Q5H/zcATBPpVbw+GTh0ZIBmqFOL6YRMZF1xVsjMX+zkw2yOjrNmup5zPaqg22xalw1jHpF5Izdygia1sQ+NiOYf6BINiR1+gVHmR+LQsLdqVFShDeHe5OIlyLTULe4KHvWhLGcQfnnxnXfcAcIg4whlSkcyf1VBJtUyTNRHs9S9JtX3S6RETrXxzIXN93vO", "X-OriginatorOrg": "Nvidia.com", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "01 Apr 2026 09:14:49.5978 (UTC)", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 959bcbb1-f4fc-420c-0922-08de8fcf2060", "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161];\n Helo=[mail.nvidia.com]", "X-MS-Exchange-CrossTenant-AuthSource": "\n SA2PEPF000015CD.namprd03.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CH1PPF0B4A257F6", "Subject": "[ovs-dev] [PATCH v3 02/11] refmap: Introduce reference map.", "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>", "Cc": "Eli Britstein <elibr@nvidia.com>, Ilya Maximets <i.maximets@ovn.org>,\n David Marchand <david.marchand@redhat.com>, Maor Dickman <maord@nvidia.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": "From: Gaetan Rivet <gaetanr@nvidia.com>\n\nAdd a reference-counted key-value map.\n\nDuplicates take a reference on the original entry within the map,\nleaving it in place. To be able to execute an entry creation after\ndetermining whether it is already present or not in the map,\nstore relevant initialization and de-initialization functions.\n\nSigned-off-by: Gaetan Rivet <gaetanr@nvidia.com>\nCo-authored-by: Eli Britstein <elibr@nvidia.com>\nSigned-off-by: Eli Britstein <elibr@nvidia.com>\n---\n lib/automake.mk | 2 +\n lib/refmap.c | 485 ++++++++++++++++++\n lib/refmap.h | 130 +++++\n tests/automake.mk | 1 +\n tests/library.at | 5 +\n tests/test-refmap.c | 894 ++++++++++++++++++++++++++++++++++\n utilities/checkpatch_dict.txt | 2 +\n 7 files changed, 1519 insertions(+)\n create mode 100644 lib/refmap.c\n create mode 100644 lib/refmap.h\n create mode 100644 tests/test-refmap.c", "diff": "diff --git a/lib/automake.mk b/lib/automake.mk\nindex c6e988906..cb6458b0d 100644\n--- a/lib/automake.mk\n+++ b/lib/automake.mk\n@@ -323,6 +323,8 @@ lib_libopenvswitch_la_SOURCES = \\\n \tlib/rculist.h \\\n \tlib/reconnect.c \\\n \tlib/reconnect.h \\\n+\tlib/refmap.c \\\n+\tlib/refmap.h \\\n \tlib/rstp.c \\\n \tlib/rstp.h \\\n \tlib/rstp-common.h \\\ndiff --git a/lib/refmap.c b/lib/refmap.c\nnew file mode 100644\nindex 000000000..c2c435238\n--- /dev/null\n+++ b/lib/refmap.c\n@@ -0,0 +1,485 @@\n+/*\n+ * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES.\n+ * All rights reserved.\n+ * SPDX-License-Identifier: Apache-2.0\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 \"cmap.h\"\n+#include \"hash.h\"\n+#include \"fatal-signal.h\"\n+#include \"ovs-atomic.h\"\n+#include \"ovs-thread.h\"\n+#include \"refmap.h\"\n+#include \"timeval.h\"\n+\n+#include \"openvswitch/list.h\"\n+#include \"openvswitch/vlog.h\"\n+\n+VLOG_DEFINE_THIS_MODULE(refmap);\n+static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(600, 600);\n+\n+static struct ovs_mutex refmap_destroy_lock = OVS_MUTEX_INITIALIZER;\n+static struct ovs_list refmap_destroy_list\n+ OVS_GUARDED_BY(refmap_destroy_lock) =\n+ OVS_LIST_INITIALIZER(&refmap_destroy_list);\n+\n+struct refmap {\n+ struct cmap map;\n+ struct ovs_mutex map_lock;\n+ size_t key_size;\n+ size_t value_size;\n+ refmap_value_init value_init;\n+ refmap_value_uninit value_uninit;\n+ refmap_value_format value_format;\n+ char *name;\n+ struct ovs_list in_destroy_list;\n+};\n+\n+struct refmap_node {\n+ struct ovsrcu_node rcu_node;\n+ /* CMAP related: */\n+ struct cmap_node map_node;\n+ uint32_t hash;\n+ /* Content: */\n+ struct ovs_refcount refcount;\n+ /* Key, then Value follows. */\n+};\n+\n+static void\n+refmap_destroy__(struct refmap *rfm, bool global_destroy);\n+\n+static void\n+refmap_destroy_unregister_protected(struct refmap *rfm)\n+ OVS_REQUIRES(refmap_destroy_lock)\n+{\n+ ovs_list_remove(&rfm->in_destroy_list);\n+}\n+\n+static void\n+refmap_destroy_unregister(struct refmap *rfm)\n+ OVS_EXCLUDED(refmap_destroy_lock)\n+{\n+ ovs_mutex_lock(&refmap_destroy_lock);\n+ refmap_destroy_unregister_protected(rfm);\n+ ovs_mutex_unlock(&refmap_destroy_lock);\n+}\n+\n+static void\n+refmap_destroy_register(struct refmap *rfm)\n+ OVS_EXCLUDED(refmap_destroy_lock)\n+{\n+ ovs_mutex_lock(&refmap_destroy_lock);\n+ ovs_list_push_back(&refmap_destroy_list, &rfm->in_destroy_list);\n+ ovs_mutex_unlock(&refmap_destroy_lock);\n+}\n+\n+static void\n+refmap_destroy_all(void *aux OVS_UNUSED)\n+{\n+ struct refmap *rfm;\n+\n+ ovs_mutex_lock(&refmap_destroy_lock);\n+ LIST_FOR_EACH_SAFE (rfm, in_destroy_list, &refmap_destroy_list) {\n+ refmap_destroy_unregister_protected(rfm);\n+ refmap_destroy__(rfm, true);\n+ }\n+ ovs_mutex_unlock(&refmap_destroy_lock);\n+ ovs_mutex_destroy(&refmap_destroy_lock);\n+}\n+\n+static void\n+refmap_fatal_signal_hook(void *aux OVS_UNUSED)\n+{\n+ /* This argument is only for the type check in 'ovsrcu_postpone',\n+ * it is not otherwise used. */\n+ static int dummy_arg;\n+\n+ /* Do not run all destroys right in the signal handler.\n+ * Let other modules execute their own cleanup, and then\n+ * iterate over any remaining to warn about leaks. */\n+ ovsrcu_postpone(refmap_destroy_all, &dummy_arg);\n+}\n+\n+struct refmap *\n+refmap_create(const char *name,\n+ size_t key_size,\n+ size_t value_size,\n+ refmap_value_init value_init,\n+ refmap_value_uninit value_uninit,\n+ refmap_value_format value_format)\n+{\n+ static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER;\n+ struct refmap *rfm;\n+\n+ ovs_assert(value_init && value_uninit);\n+\n+ if (ovsthread_once_start(&once)) {\n+ fatal_signal_add_hook(refmap_fatal_signal_hook, NULL, NULL, true);\n+ ovsthread_once_done(&once);\n+ }\n+\n+ rfm = xzalloc(sizeof *rfm);\n+ rfm->name = xstrdup(name);\n+ rfm->key_size = key_size;\n+ rfm->value_size = value_size;\n+ rfm->value_init = value_init;\n+ rfm->value_uninit = value_uninit;\n+ rfm->value_format = value_format;\n+\n+ ovs_mutex_init(&rfm->map_lock);\n+ cmap_init(&rfm->map);\n+\n+ refmap_destroy_register(rfm);\n+\n+ return rfm;\n+}\n+\n+static void\n+refmap_destroy__(struct refmap *rfm, bool global_destroy)\n+{\n+ bool leaks_detected = false;\n+\n+ if (!rfm) {\n+ return;\n+ }\n+\n+ VLOG_DBG(\"%s: destroying the map\", rfm->name);\n+\n+ ovs_mutex_lock(&rfm->map_lock);\n+ if (!cmap_is_empty(&rfm->map)) {\n+ struct refmap_node *node;\n+\n+ VLOG_WARN(\"%s: %s called with elements remaining in the map\",\n+ rfm->name, __func__);\n+ leaks_detected = true;\n+ CMAP_FOR_EACH (node, map_node, &rfm->map) {\n+ /* No need to remove the node from the CMAP, it will\n+ * be destroyed immediately. */\n+ ovsrcu_postpone_embedded(free, node, rcu_node);\n+ }\n+ }\n+ cmap_destroy(&rfm->map);\n+ ovs_mutex_unlock(&rfm->map_lock);\n+\n+ ovs_mutex_destroy(&rfm->map_lock);\n+ free(rfm->name);\n+ free(rfm);\n+\n+ /* During the very last stage of execution of RCU callbacks,\n+ * the VLOG subsystem has been disabled. All logs are thus muted.\n+ * If leaks are detected, abort the process, even though we were\n+ * exiting due to a fatal signal. The SIGABRT generated will still\n+ * be visible. */\n+ if (global_destroy && leaks_detected) {\n+ ovs_abort(-1, \"Refmap values leak detected.\");\n+ }\n+}\n+\n+void\n+refmap_destroy(struct refmap *rfm)\n+{\n+ if (!rfm) {\n+ return;\n+ }\n+\n+ refmap_destroy_unregister(rfm);\n+ refmap_destroy__(rfm, false);\n+}\n+\n+static size_t\n+refmap_aligned_key_size(struct refmap *rfm)\n+{\n+ return ROUND_UP(rfm->key_size, 8);\n+}\n+\n+static void *\n+refmap_node_key(struct refmap_node *node)\n+{\n+ if (!node) {\n+ return NULL;\n+ }\n+\n+ return node + 1;\n+}\n+\n+static void *\n+refmap_node_value(struct refmap *rfm, struct refmap_node *node)\n+{\n+ if (!node) {\n+ return NULL;\n+ }\n+\n+ return ((char *) refmap_node_key(node)) + refmap_aligned_key_size(rfm);\n+}\n+\n+static size_t\n+refmap_node_total_size(struct refmap *rfm)\n+{\n+ return sizeof(struct refmap_node) +\n+ refmap_aligned_key_size(rfm) + rfm->value_size;\n+}\n+\n+static struct refmap_node *\n+refmap_node_from_value(struct refmap *rfm, void *value)\n+{\n+ size_t offset = sizeof(struct refmap_node) + refmap_aligned_key_size(rfm);\n+\n+ if ((uintptr_t) value < offset) {\n+ return NULL;\n+ }\n+ return (void *) (((char *) value) - offset);\n+}\n+\n+static void\n+log_node(struct refmap *rfm, const char *prefix, struct refmap_node *node)\n+{\n+ void *key, *value;\n+ struct ds s;\n+\n+ if (OVS_LIKELY(VLOG_DROP_DBG(&rl) || !rfm->value_format)) {\n+ return;\n+ }\n+\n+ key = refmap_node_key(node);\n+ value = refmap_node_value(rfm, node);\n+\n+ ds_init(&s);\n+ ds_put_cstr(&s, \", '\");\n+ rfm->value_format(&s, key, value);\n+ ds_put_cstr(&s, \"'\");\n+ VLOG_DBG(\"%s: %p %s, refcnt=%d%s\", rfm->name, value, prefix,\n+ ovs_refcount_read(&node->refcount), ds_cstr(&s));\n+ ds_destroy(&s);\n+}\n+\n+/* Increments 'refcount', but only if it is over one.\n+ *\n+ * Returns false if the refcount was zero or one.\n+ * In refmap, the last reference is only used to synchronize between\n+ * value init and uninit in case of contention. In such state, the\n+ * object is not valid anymore for external readers, until the\n+ * value_{init,uninit} critical section is completed.\n+ */\n+static inline bool\n+refmap_refcount_try_ref_one(struct ovs_refcount *refcount)\n+{\n+ unsigned int count;\n+\n+ atomic_read_explicit(&refcount->count, &count, memory_order_relaxed);\n+ do {\n+ if (count <= 1) {\n+ return false;\n+ }\n+ } while (!atomic_compare_exchange_weak_explicit(&refcount->count, &count,\n+ count + 1,\n+ memory_order_relaxed,\n+ memory_order_relaxed));\n+ return true;\n+}\n+\n+void\n+refmap_for_each(struct refmap *rfm,\n+ void (*cb)(void *value, void *key, void *arg), void *arg)\n+{\n+ struct refmap_node *node;\n+\n+ CMAP_FOR_EACH (node, map_node, &rfm->map) {\n+ void *value;\n+\n+ if (!refmap_refcount_try_ref_one(&node->refcount)) {\n+ continue;\n+ }\n+ log_node(rfm, \"foreach\", node);\n+ value = refmap_node_value(rfm, node);\n+ cb(value, refmap_node_key(node), arg);\n+ refmap_unref(rfm, value);\n+ }\n+}\n+\n+static uint32_t\n+refmap_key_hash(const struct refmap *rfm, const void *key)\n+{\n+ return hash_bytes(key, rfm->key_size, 0);\n+}\n+\n+static void *\n+refmap_lookup_protected(struct refmap *rfm, void *key, uint32_t hash)\n+{\n+ struct refmap_node *node;\n+\n+ CMAP_FOR_EACH_WITH_HASH_PROTECTED (node, map_node, hash, &rfm->map) {\n+ if (!memcmp(key, refmap_node_key(node), rfm->key_size) &&\n+ ovs_refcount_read(&node->refcount) > 1) {\n+ return node;\n+ }\n+ }\n+\n+ return NULL;\n+}\n+\n+static void *\n+refmap_lookup(struct refmap *rfm, void *key, uint32_t hash)\n+{\n+ struct refmap_node *node;\n+\n+ CMAP_FOR_EACH_WITH_HASH (node, map_node, hash, &rfm->map) {\n+ if (!memcmp(key, refmap_node_key(node), rfm->key_size) &&\n+ ovs_refcount_read(&node->refcount) > 1) {\n+ return node;\n+ }\n+ }\n+\n+ return NULL;\n+}\n+\n+void *\n+refmap_try_ref(struct refmap *rfm, void *key)\n+{\n+ struct refmap_node *node;\n+\n+ node = refmap_lookup(rfm, key, refmap_key_hash(rfm, key));\n+ if (!node || !refmap_refcount_try_ref_one(&node->refcount)) {\n+ return NULL;\n+ }\n+\n+ log_node(rfm, \"try_ref\", node);\n+ return refmap_node_value(rfm, node);\n+}\n+\n+void *\n+refmap_ref(struct refmap *rfm, void *key, void *arg)\n+{\n+ struct refmap_node *node;\n+ bool error = false;\n+ uint32_t hash;\n+ void *value;\n+\n+ hash = refmap_key_hash(rfm, key);\n+\n+ node = refmap_lookup(rfm, key, hash);\n+ if (node && refmap_refcount_try_ref_one(&node->refcount)) {\n+ value = refmap_node_value(rfm, node);\n+ goto out;\n+ }\n+\n+ ovs_mutex_lock(&rfm->map_lock);\n+\n+ node = refmap_lookup_protected(rfm, key, hash);\n+ if (node && refmap_refcount_try_ref_one(&node->refcount)) {\n+ ovs_mutex_unlock(&rfm->map_lock);\n+ value = refmap_node_value(rfm, node);\n+ goto out;\n+ }\n+\n+ node = xzalloc(refmap_node_total_size(rfm));\n+ node->hash = hash;\n+ ovs_refcount_init(&node->refcount);\n+ memcpy(refmap_node_key(node), key, rfm->key_size);\n+ value = refmap_node_value(rfm, node);\n+ if (rfm->value_init(value, arg) == 0) {\n+ cmap_insert(&rfm->map, &node->map_node, node->hash);\n+ ovs_refcount_ref(&node->refcount);\n+ } else {\n+ value = NULL;\n+ error = true;\n+ VLOG_WARN(\"%s: value_init failed\", rfm->name);\n+ }\n+ ovs_mutex_unlock(&rfm->map_lock);\n+\n+out:\n+ if (error) {\n+ free(node);\n+ return NULL;\n+ }\n+\n+ log_node(rfm, \"ref\", node);\n+\n+ return value;\n+}\n+\n+bool\n+refmap_try_ref_value(struct refmap *rfm, void *value)\n+{\n+ struct refmap_node *node;\n+\n+ if (!value) {\n+ return false;\n+ }\n+\n+ node = refmap_node_from_value(rfm, value);\n+ if (!node || !refmap_refcount_try_ref_one(&node->refcount)) {\n+ return false;\n+ }\n+\n+ log_node(rfm, \"try_ref_value\", node);\n+ return true;\n+}\n+\n+bool\n+refmap_unref(struct refmap *rfm, void *value)\n+{\n+ struct refmap_node *node;\n+\n+ if (!value) {\n+ return false;\n+ }\n+\n+ node = refmap_node_from_value(rfm, value);\n+ if (!node) {\n+ return false;\n+ }\n+\n+ log_node(rfm, \"unref\", node);\n+\n+ if (ovs_refcount_unref(&node->refcount) == 2) {\n+ ovs_mutex_lock(&rfm->map_lock);\n+ if (ovs_refcount_read(&node->refcount) > 1) {\n+ ovs_mutex_unlock(&rfm->map_lock);\n+ return false;\n+ }\n+ rfm->value_uninit(refmap_node_value(rfm, node));\n+ cmap_remove(&rfm->map, &node->map_node, node->hash);\n+ ovs_assert(ovs_refcount_unref(&node->refcount) == 1);\n+ ovs_mutex_unlock(&rfm->map_lock);\n+ ovsrcu_postpone_embedded(free, node, rcu_node);\n+ return true;\n+ }\n+ return false;\n+}\n+\n+void *\n+refmap_key_from_value(struct refmap *rfm, void *value)\n+{\n+ return refmap_node_key(refmap_node_from_value(rfm, value));\n+}\n+\n+unsigned int\n+refmap_value_refcount_read(struct refmap *rfm, void *value)\n+{\n+ struct refmap_node *node;\n+\n+ if (!value) {\n+ return 0;\n+ }\n+\n+ node = refmap_node_from_value(rfm, value);\n+ if (node) {\n+ return ovs_refcount_read(&node->refcount) - 1;\n+ }\n+\n+ return 0;\n+}\ndiff --git a/lib/refmap.h b/lib/refmap.h\nnew file mode 100644\nindex 000000000..e41f1d888\n--- /dev/null\n+++ b/lib/refmap.h\n@@ -0,0 +1,130 @@\n+/*\n+ * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES.\n+ * All rights reserved.\n+ * SPDX-License-Identifier: Apache-2.0\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+#ifndef REFMAP_H\n+#define REFMAP_H\n+\n+#include <config.h>\n+\n+#include <stddef.h>\n+#include <stdint.h>\n+\n+#include \"openvswitch/dynamic-string.h\"\n+\n+/*\n+ * Reference map\n+ * =============\n+ *\n+ * This key-value store acts like a regular concurrent hashmap,\n+ * except that insertion takes a reference on the value if already\n+ * present.\n+ * The key provided must be fully initialized, including potential pad bytes.\n+ *\n+ * As the value creation is dependent on it being already present\n+ * within the structure and the user cannot predict that, this structure\n+ * requires definitions for value_init and value_uninit functions,\n+ * that will be called only at creation (first reference taken) and\n+ * destruction (last reference released).\n+ *\n+ * Example:\n+ * 1. struct key key;\n+ * 2. memset(&key, 0, sizeof key);\n+ * 3. refmap_create()\n+ * 4. value = refmap_ref(key);\n+ * Since it's the first reference for <key>, value_init is called.\n+ * 5. refmap_ref(key);\n+ * This is not the first reference for <key>. Only ref-count is updated.\n+ * 6. refmap_unref(value);\n+ * This is not the last reference released. Only ref-count is updated.\n+ * 7. refmap_unref(value);\n+ * This is the last reference released. value_uninit is immediatelly\n+ * called, while the value memory is freed after RCU grace period.\n+ *\n+ * Thread safety\n+ * =============\n+ *\n+ * MT-unsafe:\n+ * * refmap_create\n+ * * refmap_destroy\n+ *\n+ * MT-safe:\n+ * * refmap_for_each\n+ * * refmap_ref\n+ * * refmap_try_ref\n+ * * refmap_try_ref_value\n+ * * refmap_unref\n+ *\n+ */\n+\n+struct refmap;\n+\n+/* Called once on a newly created 'value', i.e. when the first\n+ * reference is taken. */\n+typedef int (*refmap_value_init)(void *value, void *arg);\n+\n+/* Called once on the last dereference to value. */\n+typedef void (*refmap_value_uninit)(void *value);\n+\n+/* Format a (key, value, arg) tuple in 's'. This is an optional (can be NULL)\n+ * callback, used for debug log purposes.\n+ */\n+typedef struct ds *(*refmap_value_format)(struct ds *s, void *key,\n+ void *value);\n+\n+/* Allocate and return a map handle.\n+ *\n+ * The user must ensure the 'key' is fully initialized, including potential\n+ * pad bytes.\n+ */\n+struct refmap *refmap_create(const char *name,\n+ size_t key_size,\n+ size_t value_size,\n+ refmap_value_init value_init,\n+ refmap_value_uninit value_uninit,\n+ refmap_value_format value_format);\n+\n+/* Frees the map memory.\n+ *\n+ * The client is responsible for unreferencing any data previously held in\n+ * the map. */\n+void refmap_destroy(struct refmap *rfm);\n+\n+/* refmap_try_ref takes a reference for the found value upon success.\n+ * It's the user's responsibility to unref it. */\n+void *refmap_try_ref(struct refmap *rfm, void *key);\n+void *refmap_ref(struct refmap *rfm, void *key, void *arg);\n+bool refmap_try_ref_value(struct refmap *rfm, void *value);\n+void refmap_for_each(struct refmap *rfm,\n+ void (*cb)(void *value, void *key, void *arg),\n+ void *arg);\n+/* The refmap_value_refcount_read() API requires the caller to hold a\n+ * reference, so a returned value of 1 only indicates you were the sole owner\n+ * at the moment of the read, but may no longer be by the time you receive the\n+ * value. This makes it unsuitable for logic decisions and only useful for\n+ * debug logging.\n+ */\n+void *refmap_key_from_value(struct refmap *rfm, void *value);\n+\n+/* Return 'true' if it was the last 'value' dereference and\n+ * 'value_uninit' has been called. */\n+bool refmap_unref(struct refmap *rfm, void *value);\n+\n+unsigned int\n+refmap_value_refcount_read(struct refmap *rfm, void *value);\n+\n+#endif /* REFMAP_H */\ndiff --git a/tests/automake.mk b/tests/automake.mk\nindex a9d972a86..a74e56454 100644\n--- a/tests/automake.mk\n+++ b/tests/automake.mk\n@@ -502,6 +502,7 @@ tests_ovstest_SOURCES = \\\n \ttests/test-rcu.c \\\n \ttests/test-rculist.c \\\n \ttests/test-reconnect.c \\\n+\ttests/test-refmap.c \\\n \ttests/test-rstp.c \\\n \ttests/test-sflow.c \\\n \ttests/test-sha1.c \\\ndiff --git a/tests/library.at b/tests/library.at\nindex 449f15fd5..3662d488e 100644\n--- a/tests/library.at\n+++ b/tests/library.at\n@@ -44,6 +44,11 @@ AT_CHECK([ovstest test-ccmap check 1], [0], [...\n ])\n AT_CLEANUP\n \n+AT_SETUP([refmap])\n+AT_KEYWORDS([refmap])\n+AT_CHECK([ovstest test-refmap check], [0], [])\n+AT_CLEANUP\n+\n AT_SETUP([atomic operations])\n AT_CHECK([ovstest test-atomic])\n AT_CLEANUP\ndiff --git a/tests/test-refmap.c b/tests/test-refmap.c\nnew file mode 100644\nindex 000000000..4639088bc\n--- /dev/null\n+++ b/tests/test-refmap.c\n@@ -0,0 +1,894 @@\n+/*\n+ * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES.\n+ * All rights reserved.\n+ * SPDX-License-Identifier: Apache-2.0\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+#undef NDEBUG\n+#include <assert.h>\n+#include <errno.h>\n+#include <getopt.h>\n+#include <string.h>\n+\n+#include \"ovs-atomic.h\"\n+#include \"ovs-numa.h\"\n+#include \"ovs-rcu.h\"\n+#include \"ovs-thread.h\"\n+#include \"ovstest.h\"\n+#include \"random.h\"\n+#include \"refmap.h\"\n+#include \"timeval.h\"\n+#include \"util.h\"\n+\n+#include \"openvswitch/util.h\"\n+#include \"openvswitch/vlog.h\"\n+\n+#define N 100\n+\n+static struct refmap_test_params {\n+ unsigned int n_threads;\n+ unsigned int n_ids;\n+ int step_idx;\n+ bool debug;\n+ bool csv_format;\n+} params = {\n+ .n_threads = 1,\n+ .n_ids = N,\n+ .debug = false,\n+ .csv_format = false,\n+};\n+\n+DEFINE_STATIC_PER_THREAD_DATA(unsigned int, thread_id, OVSTHREAD_ID_UNSET);\n+\n+static unsigned int\n+thread_id(void)\n+{\n+ static atomic_count next_id = ATOMIC_COUNT_INIT(0);\n+ unsigned int id = *thread_id_get();\n+\n+ if (OVS_UNLIKELY(id == OVSTHREAD_ID_UNSET)) {\n+ id = atomic_count_inc(&next_id);\n+ *thread_id_get() = id;\n+ }\n+\n+ return id;\n+}\n+\n+struct key {\n+ size_t idx;\n+ bool b;\n+ uint8_t pad[7];\n+};\n+\n+struct value {\n+ uint32_t *hdl;\n+};\n+\n+struct arg {\n+ uint32_t *ptr;\n+};\n+\n+static int\n+value_init(void *value_, void *arg_)\n+{\n+ struct value *value = value_;\n+ struct arg *arg = arg_;\n+\n+ /* Verify that we don't double-init value. */\n+ ovs_assert(!value->hdl);\n+\n+ *arg->ptr = 1;\n+ value->hdl = arg->ptr;\n+ return 0;\n+}\n+\n+static void\n+value_uninit(void *value_)\n+{\n+ struct value *value = value_;\n+\n+ /* Verify that we don't double-uninit value. */\n+ ovs_assert(value->hdl);\n+\n+ *value->hdl = 2;\n+ value->hdl = NULL;\n+}\n+\n+static struct ds *\n+value_format(struct ds *s, void *key_, void *value_)\n+{\n+ struct key *key = key_;\n+ struct value *value = value_;\n+\n+ ds_put_format(s, \"idx=%\"PRIuSIZE\", b=%s, hdl=%p\",\n+ key->idx, key->b ? \"1\" : \"0\",\n+ value->hdl);\n+ return s;\n+}\n+\n+struct check_refmap_ctx {\n+ struct refmap *rfm;\n+ struct value **values;\n+ int count;\n+};\n+\n+static void\n+check_refmap_cb(void *value_, void *key_, void *arg_)\n+{\n+ struct check_refmap_ctx *ctx = arg_;\n+ struct key *key = key_;\n+\n+ ovs_assert(key->idx < N);\n+ if (ctx->values) {\n+ ovs_assert(ctx->values[key->idx] == value_);\n+ }\n+\n+ ctx->count++;\n+}\n+\n+static void\n+check_refmap(struct refmap *rfm, struct value **values, int n_expected)\n+{\n+ struct check_refmap_ctx ctx = {\n+ .rfm = rfm,\n+ .values = values,\n+ .count = 0,\n+ };\n+\n+ refmap_for_each(rfm, check_refmap_cb, &ctx);\n+ ovs_assert(ctx.count == n_expected);\n+}\n+\n+struct iter_modify_ctx {\n+ struct refmap *rfm;\n+ struct key *keys;\n+ struct value **extra_refs;\n+ int ref_count;\n+ int unref_count;\n+};\n+\n+static void\n+iter_ref_cb(void *value_, void *key_, void *arg_)\n+{\n+ struct iter_modify_ctx *ctx = arg_;\n+ struct key *key = key_;\n+\n+ ovs_assert(refmap_try_ref_value(ctx->rfm, value_));\n+ ctx->extra_refs[key->idx] = value_;\n+ ctx->ref_count++;\n+}\n+\n+static void\n+iter_unref_cb(void *value_, void *key_ OVS_UNUSED, void *arg_)\n+{\n+ struct iter_modify_ctx *ctx = arg_;\n+\n+ refmap_unref(ctx->rfm, value_);\n+ ctx->unref_count++;\n+}\n+\n+struct try_ref_race_ctx {\n+ struct refmap *rfm;\n+ struct key key;\n+ atomic_bool stop;\n+};\n+\n+static void\n+race_for_each_cb(void *value_, void *key_ OVS_UNUSED, void *arg_ OVS_UNUSED)\n+{\n+ struct value *value = value_;\n+\n+ ovs_assert(value->hdl);\n+}\n+\n+static void *\n+try_ref_racer(void *arg)\n+{\n+ struct try_ref_race_ctx *ctx = arg;\n+\n+ for (;;) {\n+ bool stop_;\n+\n+ atomic_read(&ctx->stop, &stop_);\n+ if (stop_) {\n+ break;\n+ }\n+\n+ void *value = refmap_try_ref(ctx->rfm, &ctx->key);\n+ if (value) {\n+ struct value *v = value;\n+\n+ ovs_assert(v->hdl);\n+ refmap_unref(ctx->rfm, value);\n+ }\n+\n+ refmap_for_each(ctx->rfm, race_for_each_cb, NULL);\n+ }\n+\n+ return NULL;\n+}\n+\n+/* Stress-test that try_ref rejects entries at refcount 1 (the internal\n+ * reference used during value init/uninit synchronization).\n+ *\n+ * Thread A repeatedly creates and destroys the same entry.\n+ * Thread B continuously calls try_ref and for_each. */\n+static void\n+check_try_ref_race(void)\n+{\n+ struct try_ref_race_ctx race_ctx;\n+ pthread_t worker;\n+ struct refmap *rfm;\n+\n+ rfm = refmap_create(\"try-ref-race\", sizeof(struct key),\n+ sizeof(struct value), value_init, value_uninit,\n+ value_format);\n+\n+ memset(&race_ctx.key, 0, sizeof race_ctx.key);\n+ race_ctx.key.idx = 0;\n+ race_ctx.rfm = rfm;\n+ atomic_init(&race_ctx.stop, false);\n+\n+ worker = ovs_thread_create(\"try-ref-racer\", try_ref_racer, &race_ctx);\n+\n+ for (int i = 0; i < 10000; i++) {\n+ uint32_t arg_val = 0;\n+ struct arg arg = { .ptr = &arg_val };\n+ void *value;\n+\n+ value = refmap_ref(rfm, &race_ctx.key, &arg);\n+ refmap_unref(rfm, value);\n+ }\n+\n+ atomic_store(&race_ctx.stop, true);\n+ xpthread_join(worker, NULL);\n+\n+ refmap_destroy(rfm);\n+}\n+\n+static void\n+run_check(struct ovs_cmdl_context *ctx OVS_UNUSED)\n+{\n+ struct iter_modify_ctx im_ctx;\n+ struct value *extra_refs[N];\n+ struct value *values[N];\n+ struct key keys[N];\n+ struct refmap *rfm;\n+ uint32_t args[N];\n+\n+ rfm = refmap_create(\"check-rfm\", sizeof(struct key), sizeof(struct value),\n+ value_init, value_uninit, value_format);\n+\n+ check_refmap(rfm, NULL, 0);\n+\n+ memset(keys, 0, sizeof keys);\n+ for (int i = 0; i < N; i++) {\n+ struct arg arg = {\n+ .ptr = &args[i],\n+ };\n+ struct value *value;\n+\n+ keys[i].idx = i;\n+ args[i] = i;\n+ ovs_assert(!refmap_try_ref(rfm, &keys[i]));\n+ value = refmap_ref(rfm, &keys[i], &arg);\n+ ovs_assert(value);\n+ ovs_assert(value == refmap_ref(rfm, &keys[i], &arg));\n+ refmap_unref(rfm, value);\n+ ovs_assert(value == refmap_try_ref(rfm, &keys[i]));\n+ refmap_unref(rfm, value);\n+ values[i] = value;\n+ }\n+\n+ check_refmap(rfm, (struct value **) values, N);\n+\n+ for (int i = 0; i < N; i++) {\n+ /* Verify that value_init is properly called. */\n+ ovs_assert(values[i]->hdl == &args[i]);\n+ ovs_assert(args[i] == 1);\n+ }\n+\n+ /* Verify refmap_value_refcount_read: each value has one user ref. */\n+ for (int i = 0; i < N; i++) {\n+ ovs_assert(refmap_value_refcount_read(rfm, values[i]) == 1);\n+ }\n+\n+ ovs_assert(refmap_value_refcount_read(rfm, NULL) == 0);\n+\n+ /* Verify refmap_key_from_value. */\n+ for (int i = 0; i < N; i++) {\n+ struct key *k = refmap_key_from_value(rfm, values[i]);\n+ ovs_assert(k->idx == keys[i].idx);\n+ }\n+\n+ /* Verify refmap_try_ref_value and refcount changes. */\n+ for (int i = 0; i < N; i++) {\n+ ovs_assert(refmap_try_ref_value(rfm, values[i]));\n+ ovs_assert(refmap_value_refcount_read(rfm, values[i]) == 2);\n+ refmap_unref(rfm, values[i]);\n+ ovs_assert(refmap_value_refcount_read(rfm, values[i]) == 1);\n+ }\n+\n+ ovs_assert(!refmap_try_ref_value(rfm, NULL));\n+\n+ check_refmap(rfm, (struct value **) values, N);\n+\n+ /* Take extra refs from within refmap_for_each callback. */\n+ memset(&im_ctx, 0, sizeof im_ctx);\n+ im_ctx.rfm = rfm;\n+ im_ctx.keys = keys;\n+ im_ctx.extra_refs = (struct value **) extra_refs;\n+ memset(extra_refs, 0, sizeof extra_refs);\n+ refmap_for_each(rfm, iter_ref_cb, &im_ctx);\n+ ovs_assert(im_ctx.ref_count == N);\n+ for (int i = 0; i < N; i++) {\n+ ovs_assert(extra_refs[i] == values[i]);\n+ ovs_assert(refmap_value_refcount_read(rfm, values[i]) == 2);\n+ }\n+\n+ check_refmap(rfm, (struct value **) values, N);\n+\n+ /* Drop extra refs from within refmap_for_each callback. */\n+ memset(&im_ctx, 0, sizeof im_ctx);\n+ im_ctx.rfm = rfm;\n+ refmap_for_each(rfm, iter_unref_cb, &im_ctx);\n+ ovs_assert(im_ctx.unref_count == N);\n+ for (int i = 0; i < N; i++) {\n+ ovs_assert(refmap_value_refcount_read(rfm, values[i]) == 1);\n+ }\n+\n+ check_refmap(rfm, (struct value **) values, N);\n+\n+ for (int i = 0; i < N; i++) {\n+ refmap_unref(rfm, values[i]);\n+ }\n+\n+ for (int i = 0; i < N; i++) {\n+ ovs_assert(!refmap_try_ref(rfm, &keys[i]));\n+ }\n+\n+ for (int i = 0; i < N; i++) {\n+ /* Verify that value_uninit is executed. */\n+ ovs_assert(args[i] == 2);\n+ }\n+\n+ check_refmap(rfm, NULL, 0);\n+\n+ refmap_destroy(rfm);\n+\n+ check_try_ref_race();\n+}\n+\n+static uint32_t *ids;\n+static void **values;\n+static atomic_uint *thread_working_ms; /* Measured work time. */\n+\n+static struct ovs_barrier barrier_outer;\n+static struct ovs_barrier barrier_inner;\n+\n+static atomic_uint running_time_ms;\n+static atomic_bool stop;\n+\n+static unsigned int\n+elapsed(unsigned int start)\n+{\n+ unsigned int running_time_ms_;\n+\n+ atomic_read(&running_time_ms, &running_time_ms_);\n+\n+ return running_time_ms_ - start;\n+}\n+\n+static void *\n+clock_main(void *arg OVS_UNUSED)\n+{\n+ struct timeval start;\n+ struct timeval end;\n+\n+ xgettimeofday(&start);\n+ for (;;) {\n+ bool stop_;\n+\n+ atomic_read(&stop, &stop_);\n+ if (stop_) {\n+ break;\n+ }\n+\n+ xgettimeofday(&end);\n+ atomic_store(&running_time_ms,\n+ timeval_to_msec(&end) - timeval_to_msec(&start));\n+ xnanosleep(100 * 1000);\n+ }\n+\n+ return NULL;\n+}\n+\n+enum step_id {\n+ STEP_NONE,\n+ STEP_ALLOC,\n+ STEP_REF,\n+ STEP_UNREF,\n+ STEP_FREE,\n+ STEP_MIXED,\n+ STEP_POS_QUERY,\n+ STEP_NEG_QUERY,\n+};\n+\n+static const char *step_names[] = {\n+ [STEP_NONE] = \"<bug>\",\n+ [STEP_ALLOC] = \"alloc\",\n+ [STEP_REF] = \"ref\",\n+ [STEP_UNREF] = \"unref\",\n+ [STEP_FREE] = \"free\",\n+ [STEP_MIXED] = \"mixed\",\n+ [STEP_POS_QUERY] = \"pos-query\",\n+ [STEP_NEG_QUERY] = \"neg-query\",\n+};\n+\n+#define MAX_N_STEP 10\n+\n+#define FOREACH_STEP(STEP_VAR, SCHEDULE) \\\n+ for (int __idx = 0, STEP_VAR = (SCHEDULE)[__idx]; \\\n+ (STEP_VAR = (SCHEDULE)[__idx]) != STEP_NONE; \\\n+ __idx++)\n+\n+struct test_case {\n+ int idx;\n+ enum step_id schedule[MAX_N_STEP];\n+};\n+\n+static void\n+print_header(void)\n+{\n+ if (params.csv_format) {\n+ return;\n+ }\n+\n+ printf(\"Benchmarking n=%u on %u thread%s.\\n\",\n+ params.n_ids, params.n_threads,\n+ params.n_threads > 1 ? \"s\" : \"\");\n+\n+ printf(\" step\\\\thread: \");\n+ printf(\" Avg\");\n+ for (size_t i = 0; i < params.n_threads; i++) {\n+ printf(\" %3\" PRIuSIZE, i + 1);\n+ }\n+\n+ printf(\"\\n\");\n+}\n+\n+static void\n+print_test_header(struct test_case *test)\n+{\n+ if (params.csv_format) {\n+ return;\n+ }\n+\n+ printf(\"[%d]---------------------------\", test->idx);\n+ for (size_t i = 0; i < params.n_threads; i++) {\n+ printf(\"-------\");\n+ }\n+\n+ printf(\"\\n\");\n+}\n+\n+static void\n+print_test_result(struct test_case *test, enum step_id step, int step_idx)\n+{\n+ char test_name[50];\n+ uint32_t *twm;\n+ uint32_t avg;\n+ size_t i;\n+\n+ twm = xcalloc(params.n_threads, sizeof *twm);\n+ for (i = 0; i < params.n_threads; i++) {\n+ atomic_read(&thread_working_ms[i], &twm[i]);\n+ }\n+\n+ avg = 0;\n+ for (i = 0; i < params.n_threads; i++) {\n+ avg += twm[i];\n+ }\n+\n+ ovs_assert(params.n_threads);\n+ avg /= params.n_threads;\n+\n+ snprintf(test_name, sizeof test_name, \"%d.%d-%s\",\n+ test->idx, step_idx,\n+ step_names[step]);\n+ if (params.csv_format) {\n+ printf(\"%s,%\" PRIu32, test_name, avg);\n+ } else {\n+ printf(\"%*s: \", 18, test_name);\n+ printf(\" %6\" PRIu32, avg);\n+ for (i = 0; i < params.n_threads; i++) {\n+ printf(\" %6\" PRIu32, twm[i]);\n+ }\n+ printf(\" ms\");\n+ }\n+\n+ printf(\"\\n\");\n+\n+ free(twm);\n+}\n+\n+static struct test_case test_cases[] = {\n+ {\n+ .schedule = {\n+ STEP_ALLOC,\n+ STEP_FREE,\n+ },\n+ },\n+ {\n+ .schedule = {\n+ STEP_ALLOC,\n+ STEP_REF,\n+ STEP_UNREF,\n+ STEP_FREE,\n+ },\n+ },\n+ {\n+ .schedule = {\n+ STEP_MIXED,\n+ STEP_FREE,\n+ },\n+ },\n+ {\n+ .schedule = {\n+ STEP_ALLOC,\n+ STEP_POS_QUERY,\n+ /* Test negative query with map full. */\n+ STEP_NEG_QUERY,\n+ STEP_FREE,\n+ /* Test negative query with map empty. */\n+ STEP_NEG_QUERY,\n+ },\n+ },\n+};\n+\n+static void\n+swap_ptr(void **a, void **b)\n+{\n+ void *t;\n+ t = *a;\n+ *a = *b;\n+ *b = t;\n+}\n+\n+struct aux {\n+ struct test_case test;\n+ struct refmap *rfm;\n+};\n+\n+static void *\n+benchmark_thread_worker(void *aux_)\n+{\n+ unsigned int tid = thread_id();\n+ unsigned int n_ids_per_thread;\n+ unsigned int start_idx;\n+ struct aux *aux = aux_;\n+ struct refmap *rfm;\n+ unsigned int start;\n+ uint32_t *th_ids;\n+ void **th_privs;\n+ void *value;\n+ size_t i;\n+\n+ n_ids_per_thread = params.n_ids / params.n_threads;\n+ start_idx = tid * n_ids_per_thread;\n+ th_privs = &values[start_idx];\n+ th_ids = &ids[start_idx];\n+\n+ for (;;) {\n+ bool stop_;\n+\n+ ovs_barrier_block(&barrier_outer);\n+ atomic_read(&stop, &stop_);\n+ if (stop_) {\n+ break;\n+ }\n+\n+ /* Wait for main thread to finish initializing\n+ * rfm and step schedule. */\n+ ovs_barrier_block(&barrier_inner);\n+ rfm = aux->rfm;\n+\n+ FOREACH_STEP(step, aux->test.schedule) {\n+ ovs_barrier_block(&barrier_inner);\n+ atomic_read(&running_time_ms, &start);\n+ switch (step) {\n+ case STEP_ALLOC:\n+ case STEP_REF:\n+ for (i = 0; i < n_ids_per_thread; i++) {\n+ struct key key = {\n+ .idx = start_idx + i,\n+ };\n+ struct arg arg = {\n+ .ptr = &th_ids[i],\n+ };\n+\n+ th_privs[i] = refmap_ref(rfm, &key, &arg);\n+ }\n+ break;\n+ case STEP_POS_QUERY:\n+ for (i = 0; i < n_ids_per_thread; i++) {\n+ struct key key = {\n+ .idx = start_idx + i,\n+ };\n+ value = refmap_try_ref(rfm, &key);\n+ refmap_unref(rfm, value);\n+ }\n+ break;\n+ case STEP_NEG_QUERY:\n+ for (i = 0; i < n_ids_per_thread; i++) {\n+ struct key key = {\n+ .idx = params.n_ids + 1,\n+ };\n+ value = refmap_try_ref(rfm, &key);\n+ refmap_unref(rfm, value);\n+ }\n+ break;\n+ case STEP_UNREF:\n+ case STEP_FREE:\n+ for (i = 0; i < n_ids_per_thread; i++) {\n+ refmap_unref(rfm, th_privs[i]);\n+ }\n+ break;\n+ case STEP_MIXED:\n+ for (i = 0; i < n_ids_per_thread; i++) {\n+ struct arg arg;\n+ struct key key;\n+ int shuffled;\n+\n+ /* Mixed mode is doing:\n+ * 1. Alloc.\n+ * 2. Shuffle two elements.\n+ * 3. Delete shuffled element.\n+ * 4. Alloc again.\n+ * The loop ends with all elements allocated.\n+ */\n+\n+ memset(&key, 0, sizeof key);\n+ key.idx = start_idx + i;\n+ shuffled = random_range(i + 1);\n+\n+ arg.ptr = &th_ids[i];\n+ th_privs[i] = refmap_ref(rfm, &key, &arg);\n+ swap_ptr(&th_privs[i], &th_privs[shuffled]);\n+ refmap_unref(rfm, th_privs[i]);\n+ arg.ptr = &th_ids[i];\n+ th_privs[i] = refmap_ref(rfm, &key, &arg);\n+ }\n+ break;\n+ default:\n+ fprintf(stderr, \"[%u]: Reached step %d\\n\",\n+ tid, step);\n+ OVS_NOT_REACHED();\n+ break;\n+ }\n+ atomic_store(&thread_working_ms[tid], elapsed(start));\n+ ovs_barrier_block(&barrier_inner);\n+ /* Main thread prints result now. */\n+ }\n+ }\n+\n+ return NULL;\n+}\n+\n+static void\n+benchmark_thread_main(struct aux *aux)\n+{\n+ int step_idx;\n+\n+ memset(ids, 0, params.n_ids * sizeof *ids);\n+ memset(values, 0, params.n_ids * sizeof *values);\n+\n+ aux->rfm = refmap_create(\"benchmark-rfm\", sizeof(struct key),\n+ sizeof(struct value), value_init, value_uninit,\n+ value_format);\n+\n+ print_test_header(&aux->test);\n+ ovs_barrier_block(&barrier_inner);\n+ /* Init is done, worker can start preparing to work. */\n+ step_idx = 0;\n+ FOREACH_STEP(step, aux->test.schedule) {\n+ ovs_barrier_block(&barrier_inner);\n+ /* Workers do the scheduled work now. */\n+ ovs_barrier_block(&barrier_inner);\n+ print_test_result(&aux->test, step, step_idx++);\n+ }\n+\n+ refmap_destroy(aux->rfm);\n+}\n+\n+static bool\n+parse_benchmark_params(int argc, char *argv[])\n+{\n+ long int l_threads = 0;\n+ long int l_ids = 0;\n+ bool valid = true;\n+ long int l;\n+ int i;\n+\n+ params.step_idx = -1;\n+ for (i = 0; i < argc; i++) {\n+ if (!strcmp(argv[i], \"benchmark\") ||\n+ !strcmp(argv[i], \"debug\")) {\n+ continue;\n+ } else if (!strcmp(argv[i], \"csv\")) {\n+ params.csv_format = true;\n+ } else if (!strncmp(argv[i], \"step=\", 5)) {\n+ if (!str_to_long(&argv[i][5], 10, &l)) {\n+ fprintf(stderr,\n+ \"Invalid parameter '%s', expected positive integer.\\n\",\n+ argv[i]);\n+ valid = false;\n+ goto out;\n+ }\n+\n+ params.step_idx = l;\n+ } else {\n+ if (!str_to_long(argv[i], 10, &l)) {\n+ fprintf(stderr,\n+ \"Invalid parameter '%s', expected positive integer.\\n\",\n+ argv[i]);\n+ valid = false;\n+ goto out;\n+ }\n+\n+ if (l_ids == 0) {\n+ l_ids = l;\n+ } else if (l_threads == 0) {\n+ l_threads = l;\n+ } else {\n+ fprintf(stderr,\n+ \"Invalid parameter '%s', too many integer values.\\n\",\n+ argv[i]);\n+ valid = false;\n+ goto out;\n+ }\n+ }\n+ }\n+\n+ if (l_ids != 0) {\n+ params.n_ids = l_ids;\n+ } else {\n+ fprintf(stderr, \"Invalid parameters: no number of elements given.\\n\");\n+ valid = false;\n+ }\n+\n+ if (l_threads != 0) {\n+ params.n_threads = l_threads;\n+ } else {\n+ fprintf(stderr, \"Invalid parameters: no number of threads given.\\n\");\n+ valid = false;\n+ }\n+\n+out:\n+ return valid;\n+}\n+\n+static void\n+run_benchmark(struct ovs_cmdl_context *ctx)\n+{\n+ pthread_t *threads;\n+ pthread_t clock;\n+ struct aux aux;\n+ size_t i;\n+\n+ if (!parse_benchmark_params(ctx->argc, ctx->argv)) {\n+ return;\n+ }\n+\n+ ids = xcalloc(params.n_ids, sizeof *ids);\n+ values = xcalloc(params.n_ids, sizeof *values);\n+ thread_working_ms = xcalloc(params.n_threads,\n+ sizeof *thread_working_ms);\n+ for (i = 0; i < params.n_threads; i++) {\n+ atomic_init(&thread_working_ms[i], 0);\n+ }\n+\n+ atomic_init(&stop, false);\n+\n+ clock = ovs_thread_create(\"clock\", clock_main, NULL);\n+\n+ ovsrcu_quiesce_start();\n+ ovs_barrier_init(&barrier_outer, params.n_threads + 1);\n+ ovs_barrier_init(&barrier_inner, params.n_threads + 1);\n+ threads = xmalloc(params.n_threads * sizeof *threads);\n+ for (i = 0; i < params.n_threads; i++) {\n+ threads[i] = ovs_thread_create(\"worker\",\n+ benchmark_thread_worker, &aux);\n+ }\n+\n+ print_header();\n+ for (i = 0; i < ARRAY_SIZE(test_cases); i++) {\n+ test_cases[i].idx = i;\n+ if (params.step_idx != -1 &&\n+ params.step_idx != i) {\n+ continue;\n+ }\n+ /* If we don't block workers from progressing now,\n+ * there would be a race for access to aux.test,\n+ * leading to some workers not respecting the schedule.\n+ */\n+ ovs_barrier_block(&barrier_outer);\n+ memcpy(&aux.test, &test_cases[i], sizeof aux.test);\n+ benchmark_thread_main(&aux);\n+ }\n+\n+ atomic_store(&stop, true);\n+ ovs_barrier_block(&barrier_outer);\n+\n+ for (i = 0; i < params.n_threads; i++) {\n+ xpthread_join(threads[i], NULL);\n+ }\n+\n+ free(threads);\n+\n+ ovs_barrier_destroy(&barrier_outer);\n+ ovs_barrier_destroy(&barrier_inner);\n+ free(ids);\n+ free(values);\n+ free(thread_working_ms);\n+ xpthread_join(clock, NULL);\n+}\n+\n+static const struct ovs_cmdl_command commands[] = {\n+ {\"check\", \"[debug]\", 0, 1, run_check, OVS_RO},\n+ {\"benchmark\", \"<nb elem> <nb threads> [step=<uint>] [csv]\", 0, 4,\n+ run_benchmark, OVS_RO},\n+ {NULL, NULL, 0, 0, NULL, OVS_RO},\n+};\n+\n+static void\n+parse_test_params(int argc, char *argv[])\n+{\n+ int i;\n+\n+ for (i = 0; i < argc; i++) {\n+ if (!strcmp(argv[i], \"debug\")) {\n+ params.debug = true;\n+ }\n+ }\n+}\n+\n+static void\n+refmap_test_main(int argc, char *argv[])\n+{\n+ struct ovs_cmdl_context ctx = {\n+ .argc = argc - optind,\n+ .argv = argv + optind,\n+ };\n+\n+ parse_test_params(argc - optind, argv + optind);\n+\n+ vlog_set_levels(NULL, VLF_ANY_DESTINATION, VLL_OFF);\n+ if (params.debug) {\n+ vlog_set_levels_from_string_assert(\"refmap:console:dbg\");\n+ }\n+\n+ /* Quiesce to start the RCU. */\n+ ovsrcu_quiesce();\n+\n+ set_program_name(argv[0]);\n+ ovs_cmdl_run_command(&ctx, commands);\n+\n+ ovsrcu_exit();\n+}\n+\n+OVSTEST_REGISTER(\"test-refmap\", refmap_test_main);\ndiff --git a/utilities/checkpatch_dict.txt b/utilities/checkpatch_dict.txt\nindex c1f43e5af..5ad599c1d 100644\n--- a/utilities/checkpatch_dict.txt\n+++ b/utilities/checkpatch_dict.txt\n@@ -107,6 +107,7 @@ icmp\n icmp4\n icmpv6\n idl\n+ie\n ifdef\n ifindex\n initializer\n@@ -232,6 +233,7 @@ rebased\n recirc\n recirculation\n recirculations\n+refmap\n revalidate\n revalidation\n revalidator\n", "prefixes": [ "ovs-dev", "v3", "02/11" ] }