Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/138223/?format=api
http://patches.dpdk.org/api/patches/138223/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240312154215.802374-5-yoan.picchi@arm.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": "<20240312154215.802374-5-yoan.picchi@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240312154215.802374-5-yoan.picchi@arm.com", "date": "2024-03-12T15:42:15", "name": "[v7,4/4] hash: add SVE support for bulk key lookup", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "df5e5f7cd9d89ee801a66cfdc3d13b04a124c363", "submitter": { "id": 3196, "url": "http://patches.dpdk.org/api/people/3196/?format=api", "name": "Yoan Picchi", "email": "yoan.picchi@arm.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/20240312154215.802374-5-yoan.picchi@arm.com/mbox/", "series": [ { "id": 31481, "url": "http://patches.dpdk.org/api/series/31481/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31481", "date": "2024-03-12T15:42:11", "name": "hash: add SVE support for bulk key lookup", "version": 7, "mbox": "http://patches.dpdk.org/series/31481/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/138223/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/138223/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 CD4B443C93;\n\tTue, 12 Mar 2024 16:43:00 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D150142D2A;\n\tTue, 12 Mar 2024 16:42:36 +0100 (CET)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 7F3A440F1A\n for <dev@dpdk.org>; Tue, 12 Mar 2024 16:42:31 +0100 (CET)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5742115DB;\n Tue, 12 Mar 2024 08:43:08 -0700 (PDT)", "from octeon10-1.usa.Arm.com (unknown [10.118.91.161])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E728F3F762;\n Tue, 12 Mar 2024 08:42:30 -0700 (PDT)" ], "From": "Yoan Picchi <yoan.picchi@arm.com>", "To": "Yipeng Wang <yipeng1.wang@intel.com>,\n Sameh Gobriel <sameh.gobriel@intel.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Vladimir Medvedkin <vladimir.medvedkin@intel.com>", "Cc": "dev@dpdk.org, nd@arm.com, Yoan Picchi <yoan.picchi@arm.com>,\n Harjot Singh <harjot.singh@arm.com>, Nathan Brown <nathan.brown@arm.com>,\n Ruifeng Wang <ruifeng.wang@arm.com>", "Subject": "[PATCH v7 4/4] hash: add SVE support for bulk key lookup", "Date": "Tue, 12 Mar 2024 15:42:15 +0000", "Message-Id": "<20240312154215.802374-5-yoan.picchi@arm.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20240312154215.802374-1-yoan.picchi@arm.com>", "References": "<20231020165159.1649282-1-yoan.picchi@arm.com>\n <20240312154215.802374-1-yoan.picchi@arm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "- Implemented SVE code for comparing signatures in bulk lookup.\n- New SVE code is ~5% slower than optimized NEON for N2 processor for\n128b vectors.\n\nSigned-off-by: Yoan Picchi <yoan.picchi@arm.com>\nSigned-off-by: Harjot Singh <harjot.singh@arm.com>\nReviewed-by: Nathan Brown <nathan.brown@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\n---\n lib/hash/arch/arm/compare_signatures.h | 58 ++++++++++++++++++++++++++\n lib/hash/rte_cuckoo_hash.c | 7 +++-\n lib/hash/rte_cuckoo_hash.h | 1 +\n 3 files changed, 65 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/hash/arch/arm/compare_signatures.h b/lib/hash/arch/arm/compare_signatures.h\nindex b5a457f936..8a0627e119 100644\n--- a/lib/hash/arch/arm/compare_signatures.h\n+++ b/lib/hash/arch/arm/compare_signatures.h\n@@ -47,6 +47,64 @@ compare_signatures_dense(uint16_t *hitmask_buffer,\n \t\t*hitmask_buffer = vaddvq_u16(hit2);\n \t\t}\n \t\tbreak;\n+#endif\n+#if defined(RTE_HAS_SVE_ACLE)\n+\tcase RTE_HASH_COMPARE_SVE: {\n+\t\tsvuint16_t vsign, shift, sv_matches;\n+\t\tsvbool_t pred, match, bucket_wide_pred;\n+\t\tint i = 0;\n+\t\tuint64_t vl = svcnth();\n+\n+\t\tvsign = svdup_u16(sig);\n+\t\tshift = svindex_u16(0, 1);\n+\n+\t\tif (vl >= 2 * RTE_HASH_BUCKET_ENTRIES && RTE_HASH_BUCKET_ENTRIES <= 8) {\n+\t\t\tsvuint16_t primary_array_vect, secondary_array_vect;\n+\t\t\tbucket_wide_pred = svwhilelt_b16(0, RTE_HASH_BUCKET_ENTRIES);\n+\t\t\tprimary_array_vect = svld1_u16(bucket_wide_pred, prim_bucket_sigs);\n+\t\t\tsecondary_array_vect = svld1_u16(bucket_wide_pred, sec_bucket_sigs);\n+\n+\t\t\t/* We merged the two vectors so we can do both comparison at once */\n+\t\t\tprimary_array_vect = svsplice_u16(bucket_wide_pred,\n+\t\t\t\tprimary_array_vect,\n+\t\t\t\tsecondary_array_vect);\n+\t\t\tpred = svwhilelt_b16(0, 2*RTE_HASH_BUCKET_ENTRIES);\n+\n+\t\t\t/* Compare all signatures in the buckets */\n+\t\t\tmatch = svcmpeq_u16(pred, vsign, primary_array_vect);\n+\t\t\tif (svptest_any(svptrue_b16(), match)) {\n+\t\t\t\tsv_matches = svdup_u16(1);\n+\t\t\t\tsv_matches = svlsl_u16_z(match, sv_matches, shift);\n+\t\t\t\t*hitmask_buffer = svorv_u16(svptrue_b16(), sv_matches);\n+\t\t\t}\n+\t\t} else {\n+\t\t\tdo {\n+\t\t\t\tpred = svwhilelt_b16(i, RTE_HASH_BUCKET_ENTRIES);\n+\t\t\t\tuint16_t lower_half = 0;\n+\t\t\t\tuint16_t upper_half = 0;\n+\t\t\t\t/* Compare all signatures in the primary bucket */\n+\t\t\t\tmatch = svcmpeq_u16(pred, vsign, svld1_u16(pred,\n+\t\t\t\t\t\t\t&prim_bucket_sigs[i]));\n+\t\t\t\tif (svptest_any(svptrue_b16(), match)) {\n+\t\t\t\t\tsv_matches = svdup_u16(1);\n+\t\t\t\t\tsv_matches = svlsl_u16_z(match, sv_matches, shift);\n+\t\t\t\t\tlower_half = svorv_u16(svptrue_b16(), sv_matches);\n+\t\t\t\t}\n+\t\t\t\t/* Compare all signatures in the secondary bucket */\n+\t\t\t\tmatch = svcmpeq_u16(pred, vsign, svld1_u16(pred,\n+\t\t\t\t\t\t\t&sec_bucket_sigs[i]));\n+\t\t\t\tif (svptest_any(svptrue_b16(), match)) {\n+\t\t\t\t\tsv_matches = svdup_u16(1);\n+\t\t\t\t\tsv_matches = svlsl_u16_z(match, sv_matches, shift);\n+\t\t\t\t\tupper_half = svorv_u16(svptrue_b16(), sv_matches)\n+\t\t\t\t\t\t<< RTE_HASH_BUCKET_ENTRIES;\n+\t\t\t\t}\n+\t\t\t\thitmask_buffer[i/8] = upper_half | lower_half;\n+\t\t\t\ti += vl;\n+\t\t\t} while (i < RTE_HASH_BUCKET_ENTRIES);\n+\t\t}\n+\t\t}\n+\t\tbreak;\n #endif\n \tdefault:\n \t\tfor (unsigned int i = 0; i < RTE_HASH_BUCKET_ENTRIES; i++) {\ndiff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c\nindex 0697743cdf..75f555ba2c 100644\n--- a/lib/hash/rte_cuckoo_hash.c\n+++ b/lib/hash/rte_cuckoo_hash.c\n@@ -450,8 +450,13 @@ rte_hash_create(const struct rte_hash_parameters *params)\n \t\th->sig_cmp_fn = RTE_HASH_COMPARE_SSE;\n \telse\n #elif defined(RTE_ARCH_ARM64)\n-\tif (rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON))\n+\tif (rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON)) {\n \t\th->sig_cmp_fn = RTE_HASH_COMPARE_NEON;\n+#if defined(RTE_HAS_SVE_ACLE)\n+\t\tif (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SVE))\n+\t\t\th->sig_cmp_fn = RTE_HASH_COMPARE_SVE;\n+#endif\n+\t}\n \telse\n #endif\n \t\th->sig_cmp_fn = RTE_HASH_COMPARE_SCALAR;\ndiff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h\nindex a528f1d1a0..01ad01c258 100644\n--- a/lib/hash/rte_cuckoo_hash.h\n+++ b/lib/hash/rte_cuckoo_hash.h\n@@ -139,6 +139,7 @@ enum rte_hash_sig_compare_function {\n \tRTE_HASH_COMPARE_SCALAR = 0,\n \tRTE_HASH_COMPARE_SSE,\n \tRTE_HASH_COMPARE_NEON,\n+\tRTE_HASH_COMPARE_SVE,\n \tRTE_HASH_COMPARE_NUM\n };\n \n", "prefixes": [ "v7", "4/4" ] }{ "id": 138223, "url": "