Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/138648/?format=api
http://patches.dpdk.org/api/patches/138648/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1710970416-27841-3-git-send-email-roretzla@linux.microsoft.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": "<1710970416-27841-3-git-send-email-roretzla@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1710970416-27841-3-git-send-email-roretzla@linux.microsoft.com", "date": "2024-03-20T21:33:36", "name": "[2/2] mempool: use rte constant macro instead of GCC builtin", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "465d45d63a6bab8e6f5c7f32b2617e1146260d84", "submitter": { "id": 2077, "url": "http://patches.dpdk.org/api/people/2077/?format=api", "name": "Tyler Retzlaff", "email": "roretzla@linux.microsoft.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/1710970416-27841-3-git-send-email-roretzla@linux.microsoft.com/mbox/", "series": [ { "id": 31578, "url": "http://patches.dpdk.org/api/series/31578/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31578", "date": "2024-03-20T21:33:34", "name": "provide toolchain abstracted __builtin_constant_p", "version": 1, "mbox": "http://patches.dpdk.org/series/31578/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/138648/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/138648/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 BDA2943D0A;\n\tWed, 20 Mar 2024 22:33:50 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8E31442E52;\n\tWed, 20 Mar 2024 22:33:43 +0100 (CET)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 4842342DF0\n for <dev@dpdk.org>; Wed, 20 Mar 2024 22:33:40 +0100 (CET)", "by linux.microsoft.com (Postfix, from userid 1086)\n id 926DC20B74C2; Wed, 20 Mar 2024 14:33:39 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 926DC20B74C2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1710970419;\n bh=Xgnxw5kbPdpr/6stM/xRxTFlKKcRaOPYkWsLcHCrk/E=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=KNXgTlNApC24evIHmtCjeTY+JHoUisCItD27zZnnhkct8GiAUoJtH4y7/OsAIgI6n\n FT812OTw1fHoTAOV8O/F7aTdT21k2Nwyp2m6J1POP/SnhOgCmRSm0EF6p84pHDMv3q\n H8l4tLssB/8/L+bfsLwvCA6rjMUvDJAM7+SkP8Q0=", "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>", "To": "dev@dpdk.org", "Cc": "=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>", "Subject": "[PATCH 2/2] mempool: use rte constant macro instead of GCC builtin", "Date": "Wed, 20 Mar 2024 14:33:36 -0700", "Message-Id": "<1710970416-27841-3-git-send-email-roretzla@linux.microsoft.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1710970416-27841-1-git-send-email-roretzla@linux.microsoft.com>", "References": "<1710970416-27841-1-git-send-email-roretzla@linux.microsoft.com>", "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": "Use newly introduced __rte_constant(e) macro instead of directly using\n__builtin_constant_p() allowing mempool to be built by MSVC.\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n lib/mempool/rte_mempool.h | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h\nindex 23fd5c8..a3564fb 100644\n--- a/lib/mempool/rte_mempool.h\n+++ b/lib/mempool/rte_mempool.h\n@@ -1521,7 +1521,7 @@ struct rte_mempool_cache *\n \t/* The cache is a stack, so copy will be in reverse order. */\n \tcache_objs = &cache->objs[cache->len];\n \n-\tif (__extension__(__builtin_constant_p(n)) && n <= cache->len) {\n+\tif (__rte_constant(n) && n <= cache->len) {\n \t\t/*\n \t\t * The request size is known at build time, and\n \t\t * the entire request can be satisfied from the cache,\n@@ -1542,8 +1542,7 @@ struct rte_mempool_cache *\n \t * If the request size 'n' is known at build time, the above comparison\n \t * ensures that n > cache->len here, so omit RTE_MIN().\n \t */\n-\tlen = __extension__(__builtin_constant_p(n)) ? cache->len :\n-\t\t\tRTE_MIN(n, cache->len);\n+\tlen = __rte_constant(n) ? cache->len : RTE_MIN(n, cache->len);\n \tcache->len -= len;\n \tremaining = n - len;\n \tfor (index = 0; index < len; index++)\n@@ -1554,7 +1553,7 @@ struct rte_mempool_cache *\n \t * where the entire request can be satisfied from the cache\n \t * has already been handled above, so omit handling it here.\n \t */\n-\tif (!__extension__(__builtin_constant_p(n)) && remaining == 0) {\n+\tif (!__rte_constant(n) && remaining == 0) {\n \t\t/* The entire request is satisfied from the cache. */\n \n \t\tRTE_MEMPOOL_CACHE_STAT_ADD(cache, get_success_bulk, 1);\n", "prefixes": [ "2/2" ] }{ "id": 138648, "url": "