get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139733,
    "url": "http://patchwork.dpdk.org/api/patches/139733/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240430120810.108928-3-mattias.ronnblom@ericsson.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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-3-mattias.ronnblom@ericsson.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240430120810.108928-3-mattias.ronnblom@ericsson.com",
    "date": "2024-04-30T12:08:06",
    "name": "[RFC,v5,2/6] eal: add unit tests for bit operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a1b8b101fc9915d4642a305db68db83760c5e247",
    "submitter": {
        "id": 1077,
        "url": "http://patchwork.dpdk.org/api/people/1077/?format=api",
        "name": "Mattias Rönnblom",
        "email": "mattias.ronnblom@ericsson.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240430120810.108928-3-mattias.ronnblom@ericsson.com/mbox/",
    "series": [
        {
            "id": 31843,
            "url": "http://patchwork.dpdk.org/api/series/31843/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31843",
            "date": "2024-04-30T12:08:04",
            "name": "Improve EAL bit operations API",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/31843/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/139733/comments/",
    "check": "pending",
    "checks": "http://patchwork.dpdk.org/api/patches/139733/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 9D41C43F54;\n\tTue, 30 Apr 2024 14:18:40 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CD974402BF;\n\tTue, 30 Apr 2024 14:18:35 +0200 (CEST)",
            "from EUR04-VI1-obe.outbound.protection.outlook.com\n (mail-vi1eur04on2080.outbound.protection.outlook.com [40.107.8.80])\n by mails.dpdk.org (Postfix) with ESMTP id 1457D400EF\n for <dev@dpdk.org>; Tue, 30 Apr 2024 14:18:34 +0200 (CEST)",
            "from DB7PR05CA0040.eurprd05.prod.outlook.com (2603:10a6:10:2e::17)\n by PA4PR07MB7263.eurprd07.prod.outlook.com (2603:10a6:102:d0::20) 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 DU2PEPF00028D08.eurprd03.prod.outlook.com\n (2603:10a6:10:2e:cafe::6a) by DB7PR05CA0040.outlook.office365.com\n (2603:10a6:10:2e::17) 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 DU2PEPF00028D08.mail.protection.outlook.com (10.167.242.168) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.7544.18 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.60) with Microsoft SMTP Server\n id 15.2.1544.9; Tue, 30 Apr 2024 14:18:31 +0200",
            "from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100])\n by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id\n B6756380061; Tue, 30 Apr 2024 14:18:31 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=hL/8cZ/o7dtJsiwFi7aAo4IhGWf7Umo2RcuMhU0iQO3jhGB5i1GovLQRtKFeNLlc47p5p/gr8tvJIcIO3V6noDTR9k87b6v5kZJ3H+0e6DfnL41Q8Tqj/A/A3IDBoHa42a+Vl3cu5LMvmtO7K9Fojy2VGxfRabr/IrCabp1f1bAkhIVZuqJRkMV773A0UP+OH0lAmIJKfC6CeyK/uSBbBkLTacVBUSt6ENUpZetqZweUpBS2IFlxzrun+BZ2WgGP/fMozExEiUW+a3cMKXDF/sg0gbtWTARJ959o91FX8PCDogG3UHo78gg0EwOY8yKkJkZ5BnCtAEFv4a7Dtqk4Gw==",
        "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=70JPJO0XF4kc1nFz9IBwmvdNoabAvqTSzlYxlf9/jws=;\n b=AKLCj0QO2OfLYDg+BOGI4tq2nFpH6aDvVED+L9/ETChoVv6QES+Bae/KRzR8EyJz/8EDmJ7+mtizwnDt7HovAB/YQUT3xBqYKTfha6j9CTzc7WasqT8s3SbXYfubAAae2SLgzHfiGhgh4QmLzolRIhrT9rt7E7SB/plB7M+0ALR82vI+iUXKGXLnZkZB93w/S8+VeHjUYgtpXrjdmqvY9Ot6CKnOjM87lBXjnon3Jpmvh6aujkz67Uu52ZJz9tkHgzNwrqg/MhYE+MiG9C6O//IhvBnJTVD2C8CBpAPV+5ia85AxXAVBDyrZYWrJ9a/AQE1cpVRUQW++hd3yjfZ71Q==",
        "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=70JPJO0XF4kc1nFz9IBwmvdNoabAvqTSzlYxlf9/jws=;\n b=Eue3ToxeOcMcNJMz6wqA/b9fJ+GqoLTYSwHTE5xpUDsKxZhvl8hJLTddJcCW3/68FQgPQlfTe6TRvPQBlbaWZLS89umUg/HyBcCXeeQ9lKMhaZyOs5dEt9FF8BNmuUuG6/MUQQV+V8wqZJpfwfC0/F/JsWCBltDt/X7y0z26nB9S81vL1JuORS21bIqPq4FlG/mLEiuuPQVrk8WggWeL3HG1DxrsPFSPs8EJDcEINnn7wPJDwi6lFsyEeOeeBiMm1HvFZqdHDFXEjdnwRaeev++flPL3tN4DpUyVzuLpUm+x3v4wVZzuADMv/aqIr9PcZMaxN665do5hUI4YVaU+dQ==",
        "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 2/6] eal: add unit tests for bit operations",
        "Date": "Tue, 30 Apr 2024 14:08:06 +0200",
        "Message-ID": "<20240430120810.108928-3-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": "DU2PEPF00028D08:EE_|PA4PR07MB7263:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "87ff3429-9400-482f-942b-08dc690fa6d7",
        "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?N2KJb6P0qvoUWwlQXQI4HWV3CuFK8SX?=\n\t=?utf-8?q?58jQSi360GaMx0wzpYrxnBU00EGb9n5z01DNUYGM4uifeosyV4B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?utf-8?q?d+k5gOyRcSeibyrt2hg6HFt2y6YMFZ+2XHXHZ41eT8bQYnBi0/lC154f4OS4GNH7t?=\n\t=?utf-8?q?D7jz5wNQra4ggQO9fq7siX/k8VQbDVyiEdbfLffCLNJkWmIwt7O8u9Jrrn2nGo4tf?=\n\t=?utf-8?q?2MgoYwVNrfLSTrAgL92cdMS1jM7W9yGosCxoIiKMGqmIQcMArNCTXQu9+WnYKk7Rt?=\n\t=?utf-8?q?HgyPB06d0J8Usn4dMCxfgkSEAtBP9e+9MK5R1/9YyG0a/UNZbwvJt4NXzqPJXSGdt?=\n\t=?utf-8?q?E4LIYpphxwTsLB11lrxqhb/zH3PWGS5TVJuI/f61KPEt+K7MZfQq3P/lHTmGUEExs?=\n\t=?utf-8?q?XSuclmHlXpRx9VVpksf5SoWNHdImGDL681zQFJMXeuyB++PwC3l59VSJe30GmerTr?=\n\t=?utf-8?q?OVlG+iI8+qE0EdvOY2Jmm/ZVsIDijyxyQu2LnbaBMA/iy8JpC56jevSDFtUFhky0A?=\n\t=?utf-8?q?Yg6B5bKkTzCb?=",
        "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.3558 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 87ff3429-9400-482f-942b-08dc690fa6d7",
        "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 DU2PEPF00028D08.eurprd03.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PA4PR07MB7263",
        "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": "Extend bitops tests to cover the rte_bit_[set|clear|assign|test]()\nfamily of functions.\n\nThe tests are converted to use the test suite runner framework.\n\nRFC v4:\n * Remove redundant line continuations.\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 app/test/test_bitops.c | 80 ++++++++++++++++++++++++++++++++++--------\n 1 file changed, 65 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/app/test/test_bitops.c b/app/test/test_bitops.c\nindex 0d4ccfb468..111f9b328e 100644\n--- a/app/test/test_bitops.c\n+++ b/app/test/test_bitops.c\n@@ -1,13 +1,63 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n  * Copyright(c) 2019 Arm Limited\n+ * Copyright(c) 2024 Ericsson AB\n  */\n \n+#include <stdbool.h>\n+\n #include <rte_launch.h>\n #include <rte_bitops.h>\n+#include <rte_random.h>\n #include \"test.h\"\n \n-uint32_t val32;\n-uint64_t val64;\n+#define GEN_TEST_BIT_ACCESS(test_name, set_fun, clear_fun, assign_fun,\t\\\n+\t\t\t    flip_fun, test_fun, size)\t\t\t\\\n+\tstatic int\t\t\t\t\t\t\t\\\n+\ttest_name(void)\t\t\t\t\t\t\t\\\n+\t{\t\t\t\t\t\t\t\t\\\n+\t\tuint ## size ## _t reference = (uint ## size ## _t)rte_rand(); \\\n+\t\tunsigned int bit_nr;\t\t\t\t\t\\\n+\t\tuint ## size ## _t word = (uint ## size ## _t)rte_rand(); \\\n+\t\t\t\t\t\t\t\t\t\\\n+\t\tfor (bit_nr = 0; bit_nr < size; bit_nr++) {\t\t\\\n+\t\t\tbool reference_bit = (reference >> bit_nr) & 1;\t\\\n+\t\t\tbool assign = rte_rand() & 1;\t\t\t\\\n+\t\t\tif (assign)\t\t\t\t\t\\\n+\t\t\t\tassign_fun(&word, bit_nr, reference_bit); \\\n+\t\t\telse {\t\t\t\t\t\t\\\n+\t\t\t\tif (reference_bit)\t\t\t\\\n+\t\t\t\t\tset_fun(&word, bit_nr);\t\t\\\n+\t\t\t\telse\t\t\t\t\t\\\n+\t\t\t\t\tclear_fun(&word, bit_nr);\t\\\n+\t\t\t\t\t\t\t\t\t\\\n+\t\t\t}\t\t\t\t\t\t\\\n+\t\t\tTEST_ASSERT(test_fun(&word, bit_nr) == reference_bit, \\\n+\t\t\t\t    \"Bit %d had unexpected value\", bit_nr); \\\n+\t\t\tflip_fun(&word, bit_nr);\t\t\t\\\n+\t\t\tTEST_ASSERT(test_fun(&word, bit_nr) != reference_bit, \\\n+\t\t\t\t    \"Bit %d had unflipped value\", bit_nr); \\\n+\t\t\tflip_fun(&word, bit_nr);\t\t\t\\\n+\t\t}\t\t\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\t\\\n+\t\tfor (bit_nr = 0; bit_nr < size; bit_nr++) {\t\t\\\n+\t\t\tbool reference_bit = (reference >> bit_nr) & 1;\t\\\n+\t\t\tTEST_ASSERT(test_fun(&word, bit_nr) == reference_bit, \\\n+\t\t\t\t    \"Bit %d had unexpected value\", bit_nr); \\\n+\t\t}\t\t\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\t\\\n+\t\tTEST_ASSERT(reference == word, \"Word had unexpected value\"); \\\n+\t\t\t\t\t\t\t\t\t\\\n+\t\treturn TEST_SUCCESS;\t\t\t\t\t\\\n+\t}\n+\n+GEN_TEST_BIT_ACCESS(test_bit_access32, rte_bit_set, rte_bit_clear,\n+\t\t    rte_bit_assign, rte_bit_flip, rte_bit_test, 32)\n+\n+GEN_TEST_BIT_ACCESS(test_bit_access64, rte_bit_set, rte_bit_clear,\n+\t\t    rte_bit_assign, rte_bit_flip, rte_bit_test, 64)\n+\n+static uint32_t val32;\n+static uint64_t val64;\n \n #define MAX_BITS_32 32\n #define MAX_BITS_64 64\n@@ -117,22 +167,22 @@ test_bit_relaxed_test_set_clear(void)\n \treturn TEST_SUCCESS;\n }\n \n+static struct unit_test_suite test_suite = {\n+\t.suite_name = \"Bitops test suite\",\n+\t.unit_test_cases = {\n+\t\tTEST_CASE(test_bit_access32),\n+\t\tTEST_CASE(test_bit_access64),\n+\t\tTEST_CASE(test_bit_relaxed_set),\n+\t\tTEST_CASE(test_bit_relaxed_clear),\n+\t\tTEST_CASE(test_bit_relaxed_test_set_clear),\n+\t\tTEST_CASES_END()\n+\t}\n+};\n+\n static int\n test_bitops(void)\n {\n-\tval32 = 0;\n-\tval64 = 0;\n-\n-\tif (test_bit_relaxed_set() < 0)\n-\t\treturn TEST_FAILED;\n-\n-\tif (test_bit_relaxed_clear() < 0)\n-\t\treturn TEST_FAILED;\n-\n-\tif (test_bit_relaxed_test_set_clear() < 0)\n-\t\treturn TEST_FAILED;\n-\n-\treturn TEST_SUCCESS;\n+\treturn unit_test_suite_runner(&test_suite);\n }\n \n REGISTER_FAST_TEST(bitops_autotest, true, true, test_bitops);\n",
    "prefixes": [
        "RFC",
        "v5",
        "2/6"
    ]
}