get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139734,
    "url": "http://patches.dpdk.org/api/patches/139734/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240430120810.108928-4-mattias.ronnblom@ericsson.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240430120810.108928-4-mattias.ronnblom@ericsson.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240430120810.108928-4-mattias.ronnblom@ericsson.com",
    "date": "2024-04-30T12:08:07",
    "name": "[RFC,v5,3/6] eal: add exactly-once bit access functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a9a61e657f554571588d57efc9041affff169add",
    "submitter": {
        "id": 1077,
        "url": "http://patches.dpdk.org/api/people/1077/?format=api",
        "name": "Mattias Rönnblom",
        "email": "mattias.ronnblom@ericsson.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240430120810.108928-4-mattias.ronnblom@ericsson.com/mbox/",
    "series": [
        {
            "id": 31843,
            "url": "http://patches.dpdk.org/api/series/31843/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31843",
            "date": "2024-04-30T12:08:04",
            "name": "Improve EAL bit operations API",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/31843/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/139734/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/139734/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 09FB443F54;\n\tTue, 30 Apr 2024 14:18:48 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 082F1402C6;\n\tTue, 30 Apr 2024 14:18:37 +0200 (CEST)",
            "from EUR02-DB5-obe.outbound.protection.outlook.com\n (mail-db5eur02on2046.outbound.protection.outlook.com [40.107.249.46])\n by mails.dpdk.org (Postfix) with ESMTP id 9D7DE402AA\n for <dev@dpdk.org>; Tue, 30 Apr 2024 14:18:34 +0200 (CEST)",
            "from AS9PR06CA0077.eurprd06.prod.outlook.com (2603:10a6:20b:464::24)\n by PA4PR07MB7248.eurprd07.prod.outlook.com (2603:10a6:102:d7::7) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.36; Tue, 30 Apr\n 2024 12:18:32 +0000",
            "from AMS0EPF00000190.eurprd05.prod.outlook.com\n (2603:10a6:20b:464:cafe::1) by AS9PR06CA0077.outlook.office365.com\n (2603:10a6:20b:464::24) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34 via Frontend\n Transport; Tue, 30 Apr 2024 12:18:32 +0000",
            "from oa.msg.ericsson.com (192.176.1.74) by\n AMS0EPF00000190.mail.protection.outlook.com (10.167.16.213) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.7519.19 via Frontend Transport; Tue, 30 Apr 2024 12:18:32 +0000",
            "from seliicinfr00049.seli.gic.ericsson.se (153.88.142.248) by\n smtp-central.internal.ericsson.com (100.87.178.69) with Microsoft SMTP Server\n id 15.2.1544.9; Tue, 30 Apr 2024 14:18:32 +0200",
            "from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100])\n by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id\n 2DBDA380061; Tue, 30 Apr 2024 14:18:32 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=DE7Z3BeA6ZAW8lIbHh+cH56JW0LLZ5RpjfN/kFqvXbiBoAUIxhLpV1tVV5+GE+y/I13mcH8f95ChFa1qJHDO9Yj4QL2DMzCYXFMlnvQnMuDI9gP2Jkpqfsktmp8UvpZAewYVQYQFEG7qS+w6B97wC+lrn3qRYJwyudFi+PYLEZFH+IKZCkT91FZGCijGs8cBDJtJIO2OTdgVRWJVN+7WiSCir3jxzcK1zWwsTlykz6s78uNDG6L0BhLGIwuP705o2xvj2WN2ZxZQzeUQ84topsN9RUyZZEIZNjWFjYxxLwSQmAvlNr+eNN3sfAWyoyD2zV+A55LwTEqLrTc3vzDOPw==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\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=AvPWbCvgzyOJyxa/j0ge/ILRgogIdQ9NHvtGx46yEDw=;\n b=XYXnaM0gd32ROnKt02XBbNvPWZj2sKyOGoBi/nyn48Bs/kbNNloxP9j4YH4xfAwchT9ax4QrliA+2SCsDfT9EOoZMTRXUzpJ25v7/UixThMTko1ak/7zlSg96rlcO3F8i9obZk957t9G8ZGmlxS1GbpXbHK375NqAVGJ3pNoyDDXh4PxktGC3K230dCJf69Nw2bSD5KHrKmdldCHDpijX3yt1YBAbPzeLtztKNFx800DA2mpk5EJir1lVtvTTJfB26ZAZ6NrP4Idi3KRciO6NsJymubmRrbsl9n2x7uSwhRIMPBm4wwNNDfPcWPsfkJzs1RWXNQiDQbuR18LyZv3IA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com;\n dkim=none (message not signed); arc=none (0)",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=AvPWbCvgzyOJyxa/j0ge/ILRgogIdQ9NHvtGx46yEDw=;\n b=GhxTzfR57OMLb6lpoLvN47In+NBy0YohgLQCEj5xJCCbTyQnlHPWD6KfhmldHhE0rdFiYDXooX2ZRq7qf8st77Ff9HayVeqg1B9VoYn5Nx3djbHGPdUhHISKTmgvrfNz7SqwSpBXY+5fKHlkHTr/WHaQDkr5epSHzQu3PL1FSfLHtKe49FkmmRJZiCr/0HWqQ5mq8JOgw2EiWmNVGiwFixua4ocvH8vU/4FJjNEmGHB9vhv7cEYVX+IId0mA0Jrn+ZLqEu9A8nSFZiQ4L7fvgXaGZWhXmIWAleHBylsY00jLtHHChvdmCdYG8hEvLNvMVvzoCDCcou+1NfvSLqdmdQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 192.176.1.74)\n smtp.mailfrom=ericsson.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=ericsson.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of ericsson.com designates\n 192.176.1.74 as permitted sender)\n receiver=protection.outlook.com;\n client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C",
        "From": "=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<hofors@lysator.liu.se>, Heng Wang <heng.wang@ericsson.com>,\n \"Stephen Hemminger\" <stephen@networkplumber.org>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>,\n =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>, =?utf-8?q?Mattia?=\n\t=?utf-8?q?s_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "Subject": "[RFC v5 3/6] eal: add exactly-once bit access functions",
        "Date": "Tue, 30 Apr 2024 14:08:07 +0200",
        "Message-ID": "<20240430120810.108928-4-mattias.ronnblom@ericsson.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240430120810.108928-1-mattias.ronnblom@ericsson.com>",
        "References": "<20240430095523.108688-2-mattias.ronnblom@ericsson.com>\n <20240430120810.108928-1-mattias.ronnblom@ericsson.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Transfer-Encoding": "8bit",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "AMS0EPF00000190:EE_|PA4PR07MB7248:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "649f8bb2-bf90-4098-7ace-08dc690fa704",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;\n ARA:13230031|1800799015|82310400014|376005|36860700004;",
        "X-Microsoft-Antispam-Message-Info": "=?utf-8?q?SbWkFmMW9lCjpnxXZJlb1q2c9EkbsnF?=\n\t=?utf-8?q?5mgPd8ELPQw1rFaVt+g91VvWoKjekJvl7nDHSmaTR6RXSEUdOwved5N/3obBQkj9K?=\n\t=?utf-8?q?VMJxyZ1O8ELD2eTvI7kAOaGmdXLgcGb+dHDOGdNaHTVXKz6c0dupM34vjxovaVGMB?=\n\t=?utf-8?q?3JxCBc8+razn2Vq2T0OdV4NRCYusX3c17qdMjKME58rk/Z5RXDyqdsXew50l4cI4m?=\n\t=?utf-8?q?akzu/kDTsa6I+EqrUOQKVXJmDpe864xOW0JOFrzvoMhU/D9fAiaAKztZCTCbH0dwi?=\n\t=?utf-8?q?7y5TSTrS/qyZhA7V+2UXgxIem7nV9HW61Zo+0Be0GSfu4TGsXNTfTa9nTDRjWujv+?=\n\t=?utf-8?q?wLNmc6fncg7WHvJqbJ3ZmbWndfODVw/FG87O+qI+sttQTySe1LCl6MdszhMaUwj7J?=\n\t=?utf-8?q?Ufkp4LI+Q4WYVIVuSx/9N+RlxMw65nQo64VJY8FbipKcOWhfSakIqOUvbXf9Lvi/P?=\n\t=?utf-8?q?CEVAQUAxn4uJWlQ/z+uUM9UyXlGGbPFAzXOZSEcRbGcr8/IDoR6FVbZFAX4XmKLtl?=\n\t=?utf-8?q?95rEPwWx5Ldev+SXV5sUhgKx5gDWKmTl3CGbcvg/ws6KIO5rEyQlqsjzMKwDGDFcL?=\n\t=?utf-8?q?Uz/NQTs2ma9F/iox/GtPyWUrfUh4FC7iV75+2JAZ2uHf9armeFaFYPAhipBpd+5jT?=\n\t=?utf-8?q?HNUgbHyEDNwSoj7XVjnkNdIgYx4oje4hEqVEQ/+EfWgtRKcMIqDumtam5rWh3QFd7?=\n\t=?utf-8?q?dhEgiu4jy1fv9b7rwbmAtvCW8hET9YMdlgBmgjxciKSG+LBkCTx+Q+v1ydlBHgzwk?=\n\t=?utf-8?q?QbBC8rPojahx2K8DvD4cilgI/2xkuM/qFdhakpJ01VmXQiqIkQhKMquK9NLOrbWqd?=\n\t=?utf-8?q?kdWe0zNtEsIFVHPvYh68BlOVdciQa42q24Xwz7OP2rWMDX1bzaBAy53pcILpL3TQm?=\n\t=?utf-8?q?6Eaai3vrYIF2sjwAp66z2FMMI9+3NLOoyoNwdmxhoEQHVoMGDJ5LW3l2B40HuFaKC?=\n\t=?utf-8?q?WG4cN9XDEZrv3ufiAc8Yj3DDaSQUF3FRGlzAby/uNPT3E97B9MA0YXHqpxq1EUnfk?=\n\t=?utf-8?q?V5rmAtybII39bFMjlzt12ghv6bkCh+19lrNbJnX/GnAn57/MC8O21oSlGFqz8Y0z+?=\n\t=?utf-8?q?hbqHjVyCl8K8L+6swLiKoJMFGgY9e1X6tFixt0WbH6Z/vhGbGOqQkwZPSeVpGkgIj?=\n\t=?utf-8?q?hlCpiZO8BlfinSgkF7QVVXoHFXROiIzBjg2k7I01s86Ie485CDiXs8ew9zCIeAfqD?=\n\t=?utf-8?q?RKRvKLKMPqxYYfJ4dDIvIL2dnhzCYLAnBtI9QViUK2UXXOtVlJynocybiIpYeivSD?=\n\t=?utf-8?q?Sn7ULQ2OnPZy5N504JR0kn++jPVs5pRNCtjFF6eEgYfrvz2zO1Nm8e9o0vl0p/tBa?=\n\t=?utf-8?q?oXh/ZCA2QYKC?=",
        "X-Forefront-Antispam-Report": "CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net;\n CAT:NONE; SFS:(13230031)(1800799015)(82310400014)(376005)(36860700004);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "ericsson.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "30 Apr 2024 12:18:32.6813 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 649f8bb2-bf90-4098-7ace-08dc690fa704",
        "X-MS-Exchange-CrossTenant-Id": "92e84ceb-fbfd-47ab-be52-080c6b87953f",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74];\n Helo=[oa.msg.ericsson.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n AMS0EPF00000190.eurprd05.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PA4PR07MB7248",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Add bit test/set/clear/assign functions which prevents certain\ncompiler optimizations and guarantees that program-level memory loads\nand/or stores will actually occur.\n\nThese functions are useful when interacting with memory-mapped\nhardware devices.\n\nThe \"once\" family of functions does not promise atomicity and provides\nno memory ordering guarantees beyond the C11 relaxed memory model.\n\nRFC v3:\n    * Work around lack of C++ support for _Generic (Tyler Retzlaff).\n\nSigned-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\nAcked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n lib/eal/include/rte_bitops.h | 195 +++++++++++++++++++++++++++++++++++\n 1 file changed, 195 insertions(+)",
    "diff": "diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h\nindex 9d426f1602..f77bd83e97 100644\n--- a/lib/eal/include/rte_bitops.h\n+++ b/lib/eal/include/rte_bitops.h\n@@ -224,6 +224,177 @@ extern \"C\" {\n \t\t uint32_t *: __rte_bit_flip32,\t\t\t\t\\\n \t\t uint64_t *: __rte_bit_flip64)(addr, nr)\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Generic selection macro to test exactly once the value of a bit in\n+ * a 32-bit or 64-bit word. The type of operation depends on the type\n+ * of the @c addr parameter.\n+ *\n+ * This function is guaranteed to result in exactly one memory load\n+ * (e.g., it may not be eliminate or merged by the compiler).\n+ *\n+ * \\code{.c}\n+ * rte_bit_once_set(addr, 17);\n+ * if (rte_bit_once_test(addr, 17)) {\n+ *     ...\n+ * }\n+ * \\endcode\n+ *\n+ * In the above example, rte_bit_once_set() may not be removed by\n+ * the compiler, which would be allowed in case rte_bit_set() and\n+ * rte_bit_test() was used.\n+ *\n+ * \\code{.c}\n+ * while (rte_bit_once_test(addr, 17);\n+ *     ;\n+ * \\endcode\n+ *\n+ * In case rte_bit_test(addr, 17) was used instead, the resulting\n+ * object code could (and in many cases would be) replaced with\n+ * the equivalent to\n+ * \\code{.c}\n+ * if (rte_bit_test(addr, 17)) {\n+ *   for (;;) // spin forever\n+ *       ;\n+ * }\n+ * \\endcode\n+ *\n+ * rte_bit_once_test() does not give any guarantees in regards to\n+ * memory ordering or atomicity.\n+ *\n+ * The regular bit set operations (e.g., rte_bit_test()) should be\n+ * preferred over the \"once\" family of operations (e.g.,\n+ * rte_bit_once_test()) if possible, since the latter may prevent\n+ * optimizations crucial for run-time performance.\n+ *\n+ * @param addr\n+ *   A pointer to the word to query.\n+ * @param nr\n+ *   The index of the bit.\n+ * @return\n+ *   Returns true if the bit is set, and false otherwise.\n+ */\n+\n+#define rte_bit_once_test(addr, nr)\t\t\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\\\n+\t\t uint32_t *: __rte_bit_once_test32,\t\t\\\n+\t\t uint64_t *: __rte_bit_once_test64)(addr, nr)\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Set bit in word exactly once.\n+ *\n+ * Set bit specified by @c nr in the word pointed to by @c addr to '1'\n+ * exactly once.\n+ *\n+ * This function is guaranteed to result in exactly one memory load\n+ * and exactly one memory store, *or* an atomic bit set operation.\n+ *\n+ * See rte_bit_test_once32() for more information and uses cases for\n+ * the \"once\" class of functions.\n+ *\n+ * This macro does not give any guarantees in regards to memory\n+ * ordering or atomicity.\n+ *\n+ * @param addr\n+ *   A pointer to the word to modify.\n+ * @param nr\n+ *   The index of the bit.\n+ */\n+\n+#define rte_bit_once_set(addr, nr)\t\t\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\\\n+\t\t uint32_t *: __rte_bit_once_set32,\t\t\\\n+\t\t uint64_t *: __rte_bit_once_set64)(addr, nr)\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Clear bit in word exactly once.\n+ *\n+ * Set bit specified by @c nr in the word pointed to by @c addr to '0'\n+ * exactly once.\n+ *\n+ * This function is guaranteed to result in exactly one memory load\n+ * and exactly one memory store, *or* an atomic bit clear operation.\n+ *\n+ * See rte_bit_test_once32() for more information and uses cases for\n+ * the \"once\" class of functions.\n+ *\n+ * This macro does not give any guarantees in regards to memory\n+ * ordering or atomicity.\n+ *\n+ * @param addr\n+ *   A pointer to the word to modify.\n+ * @param nr\n+ *   The index of the bit.\n+ */\n+#define rte_bit_once_clear(addr, nr)\t\t\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\\\n+\t\t uint32_t *: __rte_bit_once_clear32,\t\t\\\n+\t\t uint64_t *: __rte_bit_once_clear64)(addr, nr)\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Assign a value to bit in a word exactly once.\n+ *\n+ * Set bit specified by @c nr in the word pointed to by @c addr to the\n+ * value indicated by @c value exactly once.\n+ *\n+ * This function is guaranteed to result in exactly one memory load\n+ * and exactly one memory store, *or* an atomic bit clear operation.\n+ *\n+ * This function does not give any guarantees in regards to memory\n+ * ordering or atomicity.\n+ *\n+ * @param addr\n+ *   A pointer to the word to modify.\n+ * @param nr\n+ *   The index of the bit.\n+ * @param value\n+ *   The new value of the bit - true for '1', or false for '0'.\n+ */\n+#define rte_bit_once_assign(addr, nr, value)\t\t\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\t\\\n+\t\t uint32_t *: __rte_bit_once_assign32,\t\t\t\\\n+\t\t uint64_t *: __rte_bit_once_assign64)(addr, nr, value)\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Flip bit in word, reading and writing exactly once.\n+ *\n+ * Change the value of a bit to '0' if '1' or '1' if '0' in a 32-bit\n+ * or 64-bit word. The type of operation depends on the type of the @c\n+ * addr parameter.\n+ *\n+ * This function is guaranteed to result in exactly one memory load\n+ * and exactly one memory store, *or* an atomic bit flip operation.\n+ *\n+ * See rte_bit_test_once32() for more information and uses cases for\n+ * the \"once\" class of functions.\n+ *\n+ * This macro does not give any guarantees in regards to memory\n+ * ordering or atomicity.\n+ *\n+ * @param addr\n+ *   A pointer to the word to modify.\n+ * @param nr\n+ *   The index of the bit.\n+ */\n+#define rte_bit_once_flip(addr, nr)\t\t\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\\\n+\t\t uint32_t *: __rte_bit_once_flip32,\t\t\\\n+\t\t uint64_t *: __rte_bit_once_flip64)(addr, nr)\n+\n #define __RTE_GEN_BIT_TEST(family, fun, qualifier, size)\t\t\\\n \t__rte_experimental\t\t\t\t\t\t\\\n \tstatic inline bool\t\t\t\t\t\t\\\n@@ -296,6 +467,18 @@ __RTE_GEN_BIT_CLEAR(, clear,, 64)\n __RTE_GEN_BIT_ASSIGN(, assign,, 64)\n __RTE_GEN_BIT_FLIP(, flip,, 64)\n \n+__RTE_GEN_BIT_TEST(once_, test, volatile, 32)\n+__RTE_GEN_BIT_SET(once_, set, volatile, 32)\n+__RTE_GEN_BIT_CLEAR(once_, clear, volatile, 32)\n+__RTE_GEN_BIT_ASSIGN(once_, assign, volatile, 32)\n+__RTE_GEN_BIT_FLIP(once_, flip, volatile, 32)\n+\n+__RTE_GEN_BIT_TEST(once_, test, volatile, 64)\n+__RTE_GEN_BIT_SET(once_, set, volatile, 64)\n+__RTE_GEN_BIT_CLEAR(once_, clear, volatile, 64)\n+__RTE_GEN_BIT_ASSIGN(once_, assign, volatile, 64)\n+__RTE_GEN_BIT_FLIP(once_, flip, volatile, 64)\n+\n /*------------------------ 32-bit relaxed operations ------------------------*/\n \n /**\n@@ -991,6 +1174,12 @@ rte_log2_u64(uint64_t v)\n #undef rte_bit_assign\n #undef rte_bit_flip\n \n+#undef rte_bit_once_test\n+#undef rte_bit_once_set\n+#undef rte_bit_once_clear\n+#undef rte_bit_once_assign\n+#undef rte_bit_once_flip\n+\n #define __RTE_BIT_OVERLOAD_SZ_2(fun, qualifier, size, arg1_type, arg1_name) \\\n \tstatic inline void\t\t\t\t\t\t\\\n \trte_bit_ ## fun(qualifier uint ## size ## _t *addr,\t\t\\\n@@ -1040,6 +1229,12 @@ __RTE_BIT_OVERLOAD_2(clear,, unsigned int, nr)\n __RTE_BIT_OVERLOAD_3(assign,, unsigned int, nr, bool, value)\n __RTE_BIT_OVERLOAD_2(flip,, unsigned int, nr)\n \n+__RTE_BIT_OVERLOAD_2R(once_test, const volatile, bool, unsigned int, nr)\n+__RTE_BIT_OVERLOAD_2(once_set, volatile, unsigned int, nr)\n+__RTE_BIT_OVERLOAD_2(once_clear, volatile, unsigned int, nr)\n+__RTE_BIT_OVERLOAD_3(once_assign, volatile, unsigned int, nr, bool, value)\n+__RTE_BIT_OVERLOAD_2(once_flip, volatile, unsigned int, nr)\n+\n #endif\n \n #endif /* _RTE_BITOPS_H_ */\n",
    "prefixes": [
        "RFC",
        "v5",
        "3/6"
    ]
}