Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/138963/?format=api
http://patches.dpdk.org/api/patches/138963/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1711642446-6880-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": "<1711642446-6880-3-git-send-email-roretzla@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1711642446-6880-3-git-send-email-roretzla@linux.microsoft.com", "date": "2024-03-28T16:14:06", "name": "[v2,2/2] net: stop using mmx intrinsics", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "d1e04c1d5102658e4014638596af06ae72223909", "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/1711642446-6880-3-git-send-email-roretzla@linux.microsoft.com/mbox/", "series": [ { "id": 31643, "url": "http://patches.dpdk.org/api/series/31643/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31643", "date": "2024-03-28T16:14:04", "name": "stop using mmx intrinsics", "version": 2, "mbox": "http://patches.dpdk.org/series/31643/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/138963/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/138963/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 6B6BE43D6D;\n\tThu, 28 Mar 2024 17:14:20 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B6A6841144;\n\tThu, 28 Mar 2024 17:14:12 +0100 (CET)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 8057E402E7\n for <dev@dpdk.org>; Thu, 28 Mar 2024 17:14:09 +0100 (CET)", "by linux.microsoft.com (Postfix, from userid 1086)\n id B03BE20E6AF2; Thu, 28 Mar 2024 09:14:08 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com B03BE20E6AF2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1711642448;\n bh=WeABwgMf57lNfLc0pZ3X9gqVhKEyKqKD63ATchDdl1w=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=UDdRti3e22ftW0IZxoeql82rsNm57pJpMTMitM230gEOwjuz2/Yk12nEtLPtcBSWh\n Tm1QF0m4kTs7PD1n1BGoVKMrk0DQvO52dsp5/yIcrqULiLIQn+2BH+VMYeBlznqEXJ\n LsIbjRigXgFQTGl+CPQ/xlKvR/bob6JIm8U+Fsyo=", "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n Jasvinder Singh <jasvinder.singh@intel.com>,\n Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>", "Subject": "[PATCH v2 2/2] net: stop using mmx intrinsics", "Date": "Thu, 28 Mar 2024 09:14:06 -0700", "Message-Id": "<1711642446-6880-3-git-send-email-roretzla@linux.microsoft.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1711642446-6880-1-git-send-email-roretzla@linux.microsoft.com>", "References": "<1710969121-18503-1-git-send-email-roretzla@linux.microsoft.com>\n <1711642446-6880-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": "Update code to use only avx/sse intrinsics as mmx is not supported on\nMSVC.\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n lib/net/net_crc_avx512.c | 27 +++++++--------------------\n lib/net/net_crc_sse.c | 27 +++++++--------------------\n 2 files changed, 14 insertions(+), 40 deletions(-)", "diff": "diff --git a/lib/net/net_crc_avx512.c b/lib/net/net_crc_avx512.c\nindex 0f0dee4..d18eb96 100644\n--- a/lib/net/net_crc_avx512.c\n+++ b/lib/net/net_crc_avx512.c\n@@ -5,11 +5,10 @@\n #include <stdalign.h>\n \n #include <rte_common.h>\n+#include <rte_vect.h>\n \n #include \"net_crc.h\"\n \n-#include <x86intrin.h>\n-\n /* VPCLMULQDQ CRC computation context structure */\n struct crc_vpclmulqdq_ctx {\n \t__m512i rk1_rk2;\n@@ -331,13 +330,10 @@ static const alignas(16) uint32_t mask2[4] = {\n \t\t\tc9, c10, c11);\n \tcrc32_eth.fold_3x128b = _mm512_setr_epi64(c12, c13, c14, c15,\n \t\t\tc16, c17, 0, 0);\n-\tcrc32_eth.fold_1x128b = _mm_setr_epi64(_mm_cvtsi64_m64(c16),\n-\t\t\t_mm_cvtsi64_m64(c17));\n+\tcrc32_eth.fold_1x128b = _mm_set_epi64x(c17, c16);\n \n-\tcrc32_eth.rk5_rk6 = _mm_setr_epi64(_mm_cvtsi64_m64(c18),\n-\t\t\t_mm_cvtsi64_m64(c19));\n-\tcrc32_eth.rk7_rk8 = _mm_setr_epi64(_mm_cvtsi64_m64(c20),\n-\t\t\t_mm_cvtsi64_m64(c21));\n+\tcrc32_eth.rk5_rk6 = _mm_set_epi64x(c19, c18);\n+\tcrc32_eth.rk7_rk8 = _mm_set_epi64x(c21, c20);\n }\n \n static void\n@@ -378,13 +374,10 @@ static const alignas(16) uint32_t mask2[4] = {\n \t\t\tc9, c10, c11);\n \tcrc16_ccitt.fold_3x128b = _mm512_setr_epi64(c12, c13, c14, c15,\n \t\t\tc16, c17, 0, 0);\n-\tcrc16_ccitt.fold_1x128b = _mm_setr_epi64(_mm_cvtsi64_m64(c16),\n-\t\t\t_mm_cvtsi64_m64(c17));\n+\tcrc16_ccitt.fold_1x128b = _mm_set_epi64x(c17, c16);\n \n-\tcrc16_ccitt.rk5_rk6 = _mm_setr_epi64(_mm_cvtsi64_m64(c18),\n-\t\t\t_mm_cvtsi64_m64(c19));\n-\tcrc16_ccitt.rk7_rk8 = _mm_setr_epi64(_mm_cvtsi64_m64(c20),\n-\t\t\t_mm_cvtsi64_m64(c21));\n+\tcrc16_ccitt.rk5_rk6 = _mm_set_epi64x(c19, c18);\n+\tcrc16_ccitt.rk7_rk8 = _mm_set_epi64x(c21, c20);\n }\n \n void\n@@ -392,12 +385,6 @@ static const alignas(16) uint32_t mask2[4] = {\n {\n \tcrc32_load_init_constants();\n \tcrc16_load_init_constants();\n-\n-\t/*\n-\t * Reset the register as following calculation may\n-\t * use other data types such as float, double, etc.\n-\t */\n-\t_mm_empty();\n }\n \n uint32_t\ndiff --git a/lib/net/net_crc_sse.c b/lib/net/net_crc_sse.c\nindex d673ae3..112dc94 100644\n--- a/lib/net/net_crc_sse.c\n+++ b/lib/net/net_crc_sse.c\n@@ -6,12 +6,11 @@\n #include <string.h>\n \n #include <rte_common.h>\n+#include <rte_vect.h>\n #include <rte_branch_prediction.h>\n \n #include \"net_crc.h\"\n \n-#include <x86intrin.h>\n-\n /** PCLMULQDQ CRC computation context structure */\n struct crc_pclmulqdq_ctx {\n \t__m128i rk1_rk2;\n@@ -272,12 +271,9 @@ static const alignas(16) uint8_t crc_xmm_shift_tab[48] = {\n \tp = 0x10811LLU;\n \n \t/** Save the params in context structure */\n-\tcrc16_ccitt_pclmulqdq.rk1_rk2 =\n-\t\t_mm_setr_epi64(_mm_cvtsi64_m64(k1), _mm_cvtsi64_m64(k2));\n-\tcrc16_ccitt_pclmulqdq.rk5_rk6 =\n-\t\t_mm_setr_epi64(_mm_cvtsi64_m64(k5), _mm_cvtsi64_m64(k6));\n-\tcrc16_ccitt_pclmulqdq.rk7_rk8 =\n-\t\t_mm_setr_epi64(_mm_cvtsi64_m64(q), _mm_cvtsi64_m64(p));\n+\tcrc16_ccitt_pclmulqdq.rk1_rk2 = _mm_set_epi64x(k2, k1);\n+\tcrc16_ccitt_pclmulqdq.rk5_rk6 = _mm_set_epi64x(k6, k5);\n+\tcrc16_ccitt_pclmulqdq.rk7_rk8 = _mm_set_epi64x(p, q);\n \n \t/** Initialize CRC32 data */\n \tk1 = 0xccaa009eLLU;\n@@ -288,18 +284,9 @@ static const alignas(16) uint8_t crc_xmm_shift_tab[48] = {\n \tp = 0x1db710641LLU;\n \n \t/** Save the params in context structure */\n-\tcrc32_eth_pclmulqdq.rk1_rk2 =\n-\t\t_mm_setr_epi64(_mm_cvtsi64_m64(k1), _mm_cvtsi64_m64(k2));\n-\tcrc32_eth_pclmulqdq.rk5_rk6 =\n-\t\t_mm_setr_epi64(_mm_cvtsi64_m64(k5), _mm_cvtsi64_m64(k6));\n-\tcrc32_eth_pclmulqdq.rk7_rk8 =\n-\t\t_mm_setr_epi64(_mm_cvtsi64_m64(q), _mm_cvtsi64_m64(p));\n-\n-\t/**\n-\t * Reset the register as following calculation may\n-\t * use other data types such as float, double, etc.\n-\t */\n-\t_mm_empty();\n+\tcrc32_eth_pclmulqdq.rk1_rk2 = _mm_set_epi64x(k2, k1);\n+\tcrc32_eth_pclmulqdq.rk5_rk6 = _mm_set_epi64x(k6, k5);\n+\tcrc32_eth_pclmulqdq.rk7_rk8 = _mm_set_epi64x(p, q);\n }\n \n uint32_t\n", "prefixes": [ "v2", "2/2" ] }{ "id": 138963, "url": "