Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/133948/?format=api
http://patches.dpdk.org/api/patches/133948/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1699384205-12999-6-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": "<1699384205-12999-6-git-send-email-roretzla@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1699384205-12999-6-git-send-email-roretzla@linux.microsoft.com", "date": "2023-11-07T19:10:05", "name": "[v2,5/5] table: use abstracted bit count functions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "bb6795636d287d45dc1e8ba4493a944354a9c711", "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/1699384205-12999-6-git-send-email-roretzla@linux.microsoft.com/mbox/", "series": [ { "id": 30189, "url": "http://patches.dpdk.org/api/series/30189/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30189", "date": "2023-11-07T19:10:00", "name": "use abstracted bit count functions", "version": 2, "mbox": "http://patches.dpdk.org/series/30189/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/133948/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/133948/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 3CE84432CA;\n\tTue, 7 Nov 2023 20:10:40 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8F0F842D55;\n\tTue, 7 Nov 2023 20:10:16 +0100 (CET)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id B3B21402CF\n for <dev@dpdk.org>; Tue, 7 Nov 2023 20:10:08 +0100 (CET)", "by linux.microsoft.com (Postfix, from userid 1086)\n id 8D98220B74C5; Tue, 7 Nov 2023 11:10:07 -0800 (PST)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 8D98220B74C5", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1699384207;\n bh=dXQh8d8l8NiW4U15uSUx5ROEy+ZqLMK2x6jawCf6ZOI=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=L5Nq7n3otqp3wULTkt6BLIZKsSnTcmZnVHPR1Pf/dFK4MYA3XI/PweReKWTe0ShYr\n bOwccPHLMhegVomhY3mHnSQ5Nsxx+HC/3Yagn5jDM7OvAPaTcvWv0bbrrq176s4xeE\n IBD3N35/azNzgviEU+4gDCd24dQ/PAhk5FqBU4Bo=", "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n Cristian Dumitrescu <cristian.dumitrescu@intel.com>,\n David Hunt <david.hunt@intel.com>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,\n Ruifeng Wang <ruifeng.wang@arm.com>,\n Sameh Gobriel <sameh.gobriel@intel.com>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>,\n Vladimir Medvedkin <vladimir.medvedkin@intel.com>,\n Yipeng Wang <yipeng1.wang@intel.com>, mb@smartsharesystems.com", "Subject": "[PATCH v2 5/5] table: use abstracted bit count functions", "Date": "Tue, 7 Nov 2023 11:10:05 -0800", "Message-Id": "<1699384205-12999-6-git-send-email-roretzla@linux.microsoft.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1699384205-12999-1-git-send-email-roretzla@linux.microsoft.com>", "References": "<1698887132-5347-1-git-send-email-roretzla@linux.microsoft.com>\n <1699384205-12999-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 rte_clz32 or rte_clz64 respectively instead of __builtin_clzl\ndepending on the resultant type of the expression passed as an argument\n\nUse rte_ctz32 or rte_ctz64 respectively instead of __builtin_ctzl\ndepending on the resultant type of the expression passed as an argument\n\nFixes: 18898c4d06f9 (\"eal: use abstracted bit count functions\")\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n lib/table/rte_lru_arm64.h | 2 +-\n lib/table/rte_swx_table_em.c | 4 ++--\n lib/table/rte_table_hash_ext.c | 4 ++--\n lib/table/rte_table_hash_lru.c | 4 ++--\n 4 files changed, 7 insertions(+), 7 deletions(-)", "diff": "diff --git a/lib/table/rte_lru_arm64.h b/lib/table/rte_lru_arm64.h\nindex add889a..ddfd841 100644\n--- a/lib/table/rte_lru_arm64.h\n+++ b/lib/table/rte_lru_arm64.h\n@@ -33,7 +33,7 @@\n \tuint16x4_t min_vec = vmov_n_u16(vminv_u16(lru_vec));\n \tuint64_t mask = vget_lane_u64(vreinterpret_u64_u16(\n \t\t\tvceq_u16(min_vec, lru_vec)), 0);\n-\treturn __builtin_clzl(mask) >> 4;\n+\treturn rte_clz64(mask) >> 4;\n }\n #define lru_pos(bucket) f_lru_pos(bucket->lru_list)\n \ndiff --git a/lib/table/rte_swx_table_em.c b/lib/table/rte_swx_table_em.c\nindex 84837c8..2f042d7 100644\n--- a/lib/table/rte_swx_table_em.c\n+++ b/lib/table/rte_swx_table_em.c\n@@ -260,8 +260,8 @@ struct table {\n \tif (!params->hash_func)\n \t\tt->params.hash_func = rte_hash_crc;\n \n-\tt->key_size_shl = __builtin_ctzl(key_size);\n-\tt->data_size_shl = __builtin_ctzl(key_data_size);\n+\tt->key_size_shl = rte_ctz32(key_size);\n+\tt->data_size_shl = rte_ctz32(key_data_size);\n \tt->n_buckets = n_buckets;\n \tt->n_buckets_ext = n_buckets_ext;\n \tt->total_size = total_size;\ndiff --git a/lib/table/rte_table_hash_ext.c b/lib/table/rte_table_hash_ext.c\nindex 51a20ac..9f0220d 100644\n--- a/lib/table/rte_table_hash_ext.c\n+++ b/lib/table/rte_table_hash_ext.c\n@@ -243,8 +243,8 @@ struct rte_table_hash {\n \n \t/* Internal */\n \tt->bucket_mask = t->n_buckets - 1;\n-\tt->key_size_shl = __builtin_ctzl(p->key_size);\n-\tt->data_size_shl = __builtin_ctzl(entry_size);\n+\tt->key_size_shl = rte_ctz32(p->key_size);\n+\tt->data_size_shl = rte_ctz32(entry_size);\n \n \t/* Tables */\n \tkey_mask_offset = 0;\ndiff --git a/lib/table/rte_table_hash_lru.c b/lib/table/rte_table_hash_lru.c\nindex a4e1a05..758ec4f 100644\n--- a/lib/table/rte_table_hash_lru.c\n+++ b/lib/table/rte_table_hash_lru.c\n@@ -220,8 +220,8 @@ struct rte_table_hash {\n \n \t/* Internal */\n \tt->bucket_mask = t->n_buckets - 1;\n-\tt->key_size_shl = __builtin_ctzl(p->key_size);\n-\tt->data_size_shl = __builtin_ctzl(entry_size);\n+\tt->key_size_shl = rte_ctz32(p->key_size);\n+\tt->data_size_shl = rte_ctz32(entry_size);\n \n \t/* Tables */\n \tkey_mask_offset = 0;\n", "prefixes": [ "v2", "5/5" ] }{ "id": 133948, "url": "