get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 137806,
    "url": "http://patches.dpdk.org/api/patches/137806/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240302135328.531940-7-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": "<20240302135328.531940-7-mattias.ronnblom@ericsson.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240302135328.531940-7-mattias.ronnblom@ericsson.com",
    "date": "2024-03-02T13:53:27",
    "name": "[RFC,6/7] eal: add generic atomic bit operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "d12cf630491879f848585dffdb7b941cc8d19baf",
    "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/20240302135328.531940-7-mattias.ronnblom@ericsson.com/mbox/",
    "series": [
        {
            "id": 31345,
            "url": "http://patches.dpdk.org/api/series/31345/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31345",
            "date": "2024-03-02T13:53:21",
            "name": "Improve EAL bit operations API",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/31345/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/137806/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/137806/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 9E8E243C3A;\n\tSat,  2 Mar 2024 15:03:03 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3A34442DD0;\n\tSat,  2 Mar 2024 15:02:25 +0100 (CET)",
            "from EUR03-DBA-obe.outbound.protection.outlook.com\n (mail-dbaeur03on2050.outbound.protection.outlook.com [40.107.104.50])\n by mails.dpdk.org (Postfix) with ESMTP id 3233442DB1\n for <dev@dpdk.org>; Sat,  2 Mar 2024 15:02:20 +0100 (CET)",
            "from DU2PR04CA0299.eurprd04.prod.outlook.com (2603:10a6:10:28c::34)\n by PAXPR07MB8354.eurprd07.prod.outlook.com (2603:10a6:102:231::18)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Sat, 2 Mar\n 2024 14:02:18 +0000",
            "from DB1PEPF000509E9.eurprd03.prod.outlook.com\n (2603:10a6:10:28c:cafe::b6) by DU2PR04CA0299.outlook.office365.com\n (2603:10a6:10:28c::34) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.36 via Frontend\n Transport; Sat, 2 Mar 2024 14:02:18 +0000",
            "from oa.msg.ericsson.com (192.176.1.74) by\n DB1PEPF000509E9.mail.protection.outlook.com (10.167.242.59) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.7292.25 via Frontend Transport; Sat, 2 Mar 2024 14:02:18 +0000",
            "from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by\n smtp-central.internal.ericsson.com (100.87.178.67) with Microsoft SMTP Server\n id 15.2.1258.12; Sat, 2 Mar 2024 15:02:17 +0100",
            "from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100])\n by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id\n B15261C006A; Sat,  2 Mar 2024 15:02:17 +0100 (CET)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=eaJWIrPiyAydpno8MsDLWUzJaq16Qpd4Y0DzMgW673qyz1LH6DQkFUgr0mlMUONhsm6eVKDsrLdgbCDea+D6L0ng3g+TyL4xIj5DC1sge5TIQO55VMF1KohogFIdssq1vdVDp6/CztHYCOSvQLnOPDomhFZvj7Plp50EMmFQ3kDDHqzvOQs3iVNDFpmWCL8YICgKZPn8Mwahn3Xc0ib6MYrsjjWcsCDd47Op7nQCSsQzyHb39wxxf3zu3GrDmuNA5/ZxDRMsHPYHZkA1lryY+SJJT2BV3CQ4IJB86/j5+nCnHePbRdTu4diFEGLgnu+A6ugiIW0TgR5RiTdtJh3hwQ==",
        "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=FTvQZ77SCYs9OU2uyZYRE6OakPKdcGExXqaWXV/AEsM=;\n b=Z2oWH6nspqThr6qn+SPKk1UX2FgJo0dtNGbDz3S7LzSlB036FWNjq74jUdzpbyU0exPmDXj/ey9hZnN90QzrwNjH1pHhudlsbmp65xlFtjd2HDDzX9y/o/K1j8/JVWXRn8a7zY8IFS5+sRLmj9rIArmaH4usHUCEFxzI0dEH/wCHj5Y4+Gxtm7CZ8kWVPsB3fWdGenLkle/636XLQdAOExk8GrJkSSqyiNy+JxtuvfnbLsb9aVptR53c8OezNTJQLAsDwnHq+pKzeps+UYOnH2xk7Zi6lMKpWeSKmQPPIohTVfShbHdRmf7WGyKSGXASAeGve5oJeV1c1u8CavYDpQ==",
        "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=FTvQZ77SCYs9OU2uyZYRE6OakPKdcGExXqaWXV/AEsM=;\n b=WQ83tReaB9aJSQ6YBUBYrovmlJCKn+VG1GYE+q/TwaehmxLALt4BCgKyUTjK6YomCw+MA84pvWl//FyZZh5+tNUFYhg19n+QxOv2VX20hEiQFNv3ZRy2zqJDCCD5XRiPmIjBQRAer1mxyLqSdQdwPc8LhColMqZ4Kijuwa0Riyzx1155RROp/m5Qt3OopbBotP5DHPP+tfbtoUAULiO8Z/gVL8nsaElh2MinLko+Y3JMgGGUuTQDDY65Dhdb9RgV+cqA6A7B7yhipChZddyKcjaBXr7XtqzTrLxZlsd0CzUgKbMOSz1PkcBlwxLQRk8wMp9gnqPwhrWeFbDaTgdV1A==",
        "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>, =?utf-8?q?M?=\n\t=?utf-8?q?attias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "Subject": "[RFC 6/7] eal: add generic atomic bit operations",
        "Date": "Sat, 2 Mar 2024 14:53:27 +0100",
        "Message-ID": "<20240302135328.531940-7-mattias.ronnblom@ericsson.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240302135328.531940-1-mattias.ronnblom@ericsson.com>",
        "References": "<20240302135328.531940-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": "DB1PEPF000509E9:EE_|PAXPR07MB8354:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "813b511e-e7aa-419a-447d-08dc3ac15f73",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n nLuM9Q3j6+x9LybW1nfIPYm2HuDXCBtHuE8HxVHBOU7kPimvdG5APdqp+NIkjo0Qb8QiNKnliUTbHfzcxKRN/Rx925P8IOf7RcBWBvuvSseGNPeXHraBMivGp95wGWtkeeUdTTGj8AMLaBYrcqNobEj+/pchgXGm5T7k78HTEN/FIyTFubD1dRedvBJbSfEmqII3uaXjD13byTIZeJfCCF0ff5RAmt+1XjnGZvY+aOx3Uq79K6vVsq5aPPtQc+ijmJPQGB1w7zADS/h/M5GnU9P4S4hCvspYf0s2LTuMdDfqNT2JOmFY8LfKOE3GioFyuuydVlDhydL9g0gSs9ZE7f1USrSXYVoLagYbBd930eNa5tkidPl2U5qKjF0N1uqz8wzqW97RQtFZDrzQ2wpeyhorS5U167unqebOnefORLrT5QL/geJW9h1yCtirKrhTRMPtY60+nx4RH8qbsHHIm7LSkHvG6slKIZLL7O+NTgz9nV1WuVOZmC14psVpgQEnjcx7VL0jdImpgPh/7nn+FfbMBuFfhnuIXwlBN+4b6QRRzoI16lkc58pmo1kFLlLtnSlw7iGeMze1DrvclC8vhF4WoZ3tWMxz7bQWqA718EwDrRT5r1yHM9B9XdDIn4/Yxsk2omrkjP7XOv5kbXEpcxlr4Vnsp5FyO9H7u98jlWDbio9Ra4wZbmchsPNld4uwrg290Rs/LOhTArFlPwRnny06uirK1tmfesRJgqrIhw8xUHSl7Hl/CDyt42hPn1mv",
        "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)(376005)(36860700004)(82310400014); DIR:OUT;\n SFP:1101;",
        "X-OriginatorOrg": "ericsson.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "02 Mar 2024 14:02:18.3475 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 813b511e-e7aa-419a-447d-08dc3ac15f73",
        "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 DB1PEPF000509E9.eurprd03.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PAXPR07MB8354",
        "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 atomic bit-level test/set/clear/assign macros operating on both\n32-bit and 64-bit words by means of C11 generic selection.\n\nSigned-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>\n---\n lib/eal/include/rte_bitops.h | 125 +++++++++++++++++++++++++++++++++++\n 1 file changed, 125 insertions(+)",
    "diff": "diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h\nindex 7eb08bc768..b5a9df5930 100644\n--- a/lib/eal/include/rte_bitops.h\n+++ b/lib/eal/include/rte_bitops.h\n@@ -290,6 +290,131 @@ extern \"C\" {\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+ * Test if a particular bit in a word is set with a particular memory\n+ * order.\n+ *\n+ * Test a bit with the resulting memory load ordered as per the\n+ * specified memory order.\n+ *\n+ * @param addr\n+ *   A pointer to the word to query.\n+ * @param nr\n+ *   The index of the bit.\n+ * @param memory_order\n+ *   The memory order to use. See <rte_stdatomics.h> for details.\n+ * @return\n+ *   Returns true if the bit is set, and false otherwise.\n+ */\n+#define rte_bit_atomic_test(addr, nr, memory_order)\t\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\t\\\n+\t\t uint32_t *: rte_bit_atomic_test32,\t\t\t\\\n+\t\t uint64_t *: rte_bit_atomic_test64)(addr, nr, memory_order)\n+\n+/**\n+ * Atomically set bit in word.\n+ *\n+ * Atomically set bit specified by @c nr in the word pointed to by @c\n+ * addr to '1', with the memory ordering as specified by @c\n+ * memory_order.\n+ *\n+ * @param addr\n+ *   A pointer to the word to modify.\n+ * @param nr\n+ *   The index of the bit.\n+ * @param memory_order\n+ *   The memory order to use. See <rte_stdatomics.h> for details.\n+ */\n+#define rte_bit_atomic_set(addr, nr, memory_order)\t\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\t\\\n+\t\t uint32_t *: rte_bit_atomic_set32,\t\t\t\\\n+\t\t uint64_t *: rte_bit_atomic_set64)(addr, nr, memory_order)\n+\n+/**\n+ * Atomically clear bit in word.\n+ *\n+ * Atomically set bit specified by @c nr in the word pointed to by @c\n+ * addr to '0', with the memory ordering as specified by @c\n+ * memory_order.\n+ *\n+ * @param addr\n+ *   A pointer to the word to modify.\n+ * @param nr\n+ *   The index of the bit.\n+ * @param memory_order\n+ *   The memory order to use. See <rte_stdatomics.h> for details.\n+ */\n+#define rte_bit_atomic_clear(addr, nr, memory_order)\t\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\t\\\n+\t\t uint32_t *: rte_bit_atomic_clear32,\t\t\t\\\n+\t\t uint64_t *: rte_bit_atomic_clear64)(addr, nr, memory_order)\n+\n+/**\n+ * Atomically assign a value to bit in word.\n+ *\n+ * Atomically set bit specified by @c nr in the word pointed to by @c\n+ * addr to the value indicated by @c value, with the memory ordering\n+ * as specified with @c memory_order.\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+ * @param memory_order\n+ *   The memory order to use. See <rte_stdatomics.h> for details.\n+ */\n+#define rte_bit_atomic_assign(addr, nr, value, memory_order)\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\t\\\n+\t\t uint32_t *: rte_bit_atomic_assign32,\t\t\t\\\n+\t\t uint64_t *: rte_bit_atomic_assign64)(addr, nr, value,\t\\\n+\t\t\t\t\t\t      memory_order)\n+\n+/**\n+ * Atomically test and set a bit in word.\n+ *\n+ * Atomically test and set bit specified by @c nr in the word pointed\n+ * to by @c addr to '1', with the memory ordering as specified with @c\n+ * memory_order.\n+ *\n+ * @param addr\n+ *   A pointer to the word to modify.\n+ * @param nr\n+ *   The index of the bit.\n+ * @param memory_order\n+ *   The memory order to use. See <rte_stdatomics.h> for details.\n+ * @return\n+ *   Returns true if the bit was set, and false otherwise.\n+ */\n+#define rte_bit_atomic_test_and_set(addr, nr, memory_order)\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\t\\\n+\t\t uint32_t *: rte_bit_atomic_test_and_set32,\t\t\\\n+\t\t uint64_t *: rte_bit_atomic_test_and_set64)(addr, nr,\t\\\n+\t\t\t\t\t\t\t    memory_order))\n+\n+/**\n+ * Atomically test and clear a bit in word.\n+ *\n+ * Atomically test and clear bit specified by @c nr in the word\n+ * pointed to by @c addr to '0', with the memory ordering as specified\n+ * with @c memory_order.\n+ *\n+ * @param addr\n+ *   A pointer to the word to modify.\n+ * @param nr\n+ *   The index of the bit.\n+ * @param memory_order\n+ *   The memory order to use. See <rte_stdatomics.h> for details.\n+ * @return\n+ *   Returns true if the bit was set, and false otherwise.\n+ */\n+#define rte_bit_atomic_test_and_clear(addr, nr, memory_order)\t\t\\\n+\t_Generic((addr),\t\t\t\t\t\t\\\n+\t\t uint32_t *: rte_bit_atomic_test_and_clear32,\t\t\\\n+\t\t uint64_t *: rte_bit_atomic_test_and_clear64)(addr, nr, \\\n+\t\t\t\t\t\t\t      memory_order))\n+\n /**\n  * Test if a particular bit in a 32-bit word is set.\n  *\n",
    "prefixes": [
        "RFC",
        "6/7"
    ]
}