Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/135011/?format=api
http://patches.dpdk.org/api/patches/135011/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231211095110.18946-2-fengchengwen@huawei.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": "<20231211095110.18946-2-fengchengwen@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231211095110.18946-2-fengchengwen@huawei.com", "date": "2023-12-11T09:50:59", "name": "[RFC,v3,01/12] eal: introduce more macro for bit definition", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "79d4cb4248929edf629ea71c9c9ffb926680bafe", "submitter": { "id": 2146, "url": "http://patches.dpdk.org/api/people/2146/?format=api", "name": "fengchengwen", "email": "fengchengwen@huawei.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231211095110.18946-2-fengchengwen@huawei.com/mbox/", "series": [ { "id": 30506, "url": "http://patches.dpdk.org/api/series/30506/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30506", "date": "2023-12-11T09:50:58", "name": "add argparse library", "version": 3, "mbox": "http://patches.dpdk.org/series/30506/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/135011/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/135011/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 7491A436C8;\n\tMon, 11 Dec 2023 10:54:51 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C1BA7410ED;\n\tMon, 11 Dec 2023 10:54:30 +0100 (CET)", "from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])\n by mails.dpdk.org (Postfix) with ESMTP id 5A61640EDF\n for <dev@dpdk.org>; Mon, 11 Dec 2023 10:54:24 +0100 (CET)", "from mail.maildlp.com (unknown [172.19.163.252])\n by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SpcXS6Ztxz14M22;\n Mon, 11 Dec 2023 17:54:16 +0800 (CST)", "from dggpeml500024.china.huawei.com (unknown [7.185.36.10])\n by mail.maildlp.com (Postfix) with ESMTPS id 3DA95180069;\n Mon, 11 Dec 2023 17:54:22 +0800 (CST)", "from localhost.localdomain (10.50.165.33) by\n dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.35; Mon, 11 Dec 2023 17:54:22 +0800" ], "From": "Chengwen Feng <fengchengwen@huawei.com>", "To": "<dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@amd.com>,\n <stephen@networkplumber.org>", "CC": "<tangkunshan@huawei.com>", "Subject": "[RFC v3 01/12] eal: introduce more macro for bit definition", "Date": "Mon, 11 Dec 2023 09:50:59 +0000", "Message-ID": "<20231211095110.18946-2-fengchengwen@huawei.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20231211095110.18946-1-fengchengwen@huawei.com>", "References": "<20231121122651.7078-1-fengchengwen@huawei.com>\n <20231211095110.18946-1-fengchengwen@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.50.165.33]", "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n dggpeml500024.china.huawei.com (7.185.36.10)", "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": "Introduce macros: RTE_MBIT64/RTE_MBIT32, RTE_GENMASK64/RTE_GENMASK32,\nand RTE_FIELD_GET64/RTE_FIELD_GET32.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n lib/eal/include/rte_bitops.h | 64 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 64 insertions(+)", "diff": "diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h\nindex 6bd8bae21a..e1f3c4b195 100644\n--- a/lib/eal/include/rte_bitops.h\n+++ b/lib/eal/include/rte_bitops.h\n@@ -39,6 +39,70 @@ extern \"C\" {\n */\n #define RTE_BIT32(nr) (UINT32_C(1) << (nr))\n \n+/**\n+ * Get the uint64_t value for a multiple bits set.\n+ *\n+ * @param val\n+ * The value may not all 1s.\n+ * @param nr\n+ * The bit number in range of 0 to (64 - width of val).\n+ */\n+#define RTE_MBIT64(val, nr) (UINT64_C(val) << (nr))\n+\n+/**\n+ * Get the uint32_t value for a multiple bits set.\n+ *\n+ * @param val\n+ * The value may not all 1s.\n+ * @param nr\n+ * The bit number in range of 0 to (32 - width of val).\n+ */\n+#define RTE_MBIT32(val, nr) (UINT32_C(val) << (nr))\n+\n+/**\n+ * Generate a contiguous 64bit bitmask starting at bit position low\n+ * and ending at position high.\n+ *\n+ * @param high\n+ * High bit position.\n+ * @param low\n+ * Low bit position.\n+ */\n+#define RTE_GENMASK64(high, low) (((~UINT64_C(0)) << (low)) & (~UINT64_C(0) >> (63u - (high))))\n+\n+/**\n+ * Generate a contiguous 32bit bitmask starting at bit position low\n+ * and ending at position high.\n+ *\n+ * @param high\n+ * High bit position.\n+ * @param low\n+ * Low bit position.\n+ */\n+#define RTE_GENMASK32(high, low) (((~UINT32_C(0)) << (low)) & (~UINT32_C(0) >> (31u - (high))))\n+\n+/**\n+ * Extract a 64bit field element.\n+ *\n+ * @param mask\n+ * shifted mask.\n+ * @param reg\n+ * value of entire bitfield.\n+ */\n+#define RTE_FIELD_GET64(mask, reg) \\\n+\t\t(typeof(mask))(((reg) & (mask)) >> rte_ctz64(mask))\n+\n+/**\n+ * Extract a 32bit field element.\n+ *\n+ * @param mask\n+ * shifted mask.\n+ * @param reg\n+ * value of entire bitfield.\n+ */\n+#define RTE_FIELD_GET32(mask, reg) \\\n+\t\t(typeof(mask))(((reg) & (mask)) >> rte_ctz32(mask))\n+\n /*------------------------ 32-bit relaxed operations ------------------------*/\n \n /**\n", "prefixes": [ "RFC", "v3", "01/12" ] }{ "id": 135011, "url": "