Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/112289/?format=api
http://patches.dpdk.org/api/patches/112289/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220603071307.14360-3-adwivedi@marvell.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": "<20220603071307.14360-3-adwivedi@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220603071307.14360-3-adwivedi@marvell.com", "date": "2022-06-03T07:13:07", "name": "[2/2] crypto/cnxk: swap zuc-256 iv", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "7822fb6cb3c030c2043647ec6263d1ad96e7374b", "submitter": { "id": 1561, "url": "http://patches.dpdk.org/api/people/1561/?format=api", "name": "Ankur Dwivedi", "email": "adwivedi@marvell.com" }, "delegate": { "id": 6690, "url": "http://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220603071307.14360-3-adwivedi@marvell.com/mbox/", "series": [ { "id": 23315, "url": "http://patches.dpdk.org/api/series/23315/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23315", "date": "2022-06-03T07:13:05", "name": "add zuc-256 support", "version": 1, "mbox": "http://patches.dpdk.org/series/23315/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/112289/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/112289/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 EB700A0555;\n\tFri, 3 Jun 2022 09:13:40 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DCCAD427F2;\n\tFri, 3 Jun 2022 09:13:40 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 0A1624021E\n for <dev@dpdk.org>; Fri, 3 Jun 2022 09:13:39 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 2533rCl6000812\n for <dev@dpdk.org>; Fri, 3 Jun 2022 00:13:39 -0700", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3geu3ecbne-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Fri, 03 Jun 2022 00:13:39 -0700", "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Fri, 3 Jun 2022 00:13:36 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Fri, 3 Jun 2022 00:13:36 -0700", "from hyd1349.t110.caveonetworks.com.com (unknown [10.29.45.13])\n by maili.marvell.com (Postfix) with ESMTP id A9D1E3F706D;\n Fri, 3 Jun 2022 00:13:34 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=7vWBhA8z6pWYEmBYrhdcZRomUEN6ixkx1wUi2sSA5+8=;\n b=VG8vQY+JdJhiFmMMY6QbS9+f5arKnfwtQF0GuMaDWyVzrSWR6H8S4sqz++hAr2AFboAm\n FLJY9G+qItsHgtHbUBSGE7yGzf1dU7UajFduE7lKtz6eYhR6MJjHhaDcD7W+4nYTp1XP\n k4ljdLTbbyYL8F53pfwAtZGlhJUUTEASDLhwu5WQmp3w8MpXPkXn59dMvZHy5PVL2I/V\n ctMEIvnleA9A52GMsNPooI6wrOE4EwpbMvWY57vMl66FijTy1IXu1nAbIIj0vpcPNvtc\n IA4+KKD0zeLKzeyfszFO68pxq3P+ZzaZXMuSESDPlCJ2lJfQun1B8CM2EpXJD8v4KjZv tA==", "From": "Ankur Dwivedi <adwivedi@marvell.com>", "To": "<dev@dpdk.org>", "CC": "<anoobj@marvell.com>, <gakhil@marvell.com>, <ktejasree@marvell.com>,\n <jerinj@marvell.com>, Ankur Dwivedi <adwivedi@marvell.com>", "Subject": "[PATCH 2/2] crypto/cnxk: swap zuc-256 iv", "Date": "Fri, 3 Jun 2022 12:43:07 +0530", "Message-ID": "<20220603071307.14360-3-adwivedi@marvell.com>", "X-Mailer": "git-send-email 2.28.0", "In-Reply-To": "<20220603071307.14360-1-adwivedi@marvell.com>", "References": "<20220603071307.14360-1-adwivedi@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "2aXuykOzD_RXuSo67ieo-2bZBWfW1Ura", "X-Proofpoint-ORIG-GUID": "2aXuykOzD_RXuSo67ieo-2bZBWfW1Ura", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514\n definitions=2022-06-03_02,2022-06-02_01,2022-02-23_01", "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": "The microcode expects the iv to be in reverse of what is provided\nby dpdk test app. Also the first 8 bytes of reversed iv is\ncompressed to 6 bytes.\n\nSigned-off-by: Ankur Dwivedi <adwivedi@marvell.com>\nReviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>\n---\n drivers/crypto/cnxk/cnxk_se.h | 24 +++++++++++++-----------\n 1 file changed, 13 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h\nindex a339b80a87..8ed3a8b2ef 100644\n--- a/drivers/crypto/cnxk/cnxk_se.h\n+++ b/drivers/crypto/cnxk/cnxk_se.h\n@@ -44,17 +44,16 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess);\n static inline void\n cpt_pack_iv(uint8_t *iv_src, uint8_t *iv_dst)\n {\n-\tiv_dst[16] = iv_src[16];\n-\t/* pack the last 8 bytes of IV to 6 bytes.\n+\t/* pack the first 8 bytes of IV to 6 bytes.\n \t * discard the 2 MSB bits of each byte\n \t */\n-\tiv_dst[17] = (((iv_src[17] & 0x3f) << 2) | ((iv_src[18] >> 4) & 0x3));\n-\tiv_dst[18] = (((iv_src[18] & 0xf) << 4) | ((iv_src[19] >> 2) & 0xf));\n-\tiv_dst[19] = (((iv_src[19] & 0x3) << 6) | (iv_src[20] & 0x3f));\n+\tiv_dst[0] = (((iv_src[0] & 0x3f) << 2) | ((iv_src[1] >> 4) & 0x3));\n+\tiv_dst[1] = (((iv_src[1] & 0xf) << 4) | ((iv_src[2] >> 2) & 0xf));\n+\tiv_dst[2] = (((iv_src[2] & 0x3) << 6) | (iv_src[3] & 0x3f));\n \n-\tiv_dst[20] = (((iv_src[21] & 0x3f) << 2) | ((iv_src[22] >> 4) & 0x3));\n-\tiv_dst[21] = (((iv_src[22] & 0xf) << 4) | ((iv_src[23] >> 2) & 0xf));\n-\tiv_dst[22] = (((iv_src[23] & 0x3) << 6) | (iv_src[24] & 0x3f));\n+\tiv_dst[3] = (((iv_src[4] & 0x3f) << 2) | ((iv_src[5] >> 4) & 0x3));\n+\tiv_dst[4] = (((iv_src[5] & 0xf) << 4) | ((iv_src[6] >> 2) & 0xf));\n+\tiv_dst[5] = (((iv_src[6] & 0x3) << 6) | (iv_src[7] & 0x3f));\n }\n \n static inline void\n@@ -76,10 +75,11 @@ pdcp_iv_copy(uint8_t *iv_d, uint8_t *iv_s, const uint8_t pdcp_alg_type,\n \t\t\tiv_temp[j] = iv_s_temp[3 - j];\n \t\tmemcpy(iv_d, iv_temp, 16);\n \t} else if (pdcp_alg_type == ROC_SE_PDCP_ALG_TYPE_ZUC) {\n-\t\t/* ZUC doesn't need a swap */\n-\t\tmemcpy(iv_d, iv_s, 16);\n-\t\tif (pack_iv)\n+\t\tif (pack_iv) {\n \t\t\tcpt_pack_iv(iv_s, iv_d);\n+\t\t\tmemcpy(iv_d + 6, iv_s + 8, 17);\n+\t\t} else\n+\t\t\tmemcpy(iv_d, iv_s, 16);\n \t} else {\n \t\t/* AES-CMAC EIA2, microcode expects 16B zeroized IV */\n \t\tfor (j = 0; j < 4; j++)\n@@ -1037,6 +1037,7 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\t\tiv_len = params->auth_iv_len;\n \n \t\t\tif (iv_len == 25) {\n+\t\t\t\troc_se_zuc_bytes_swap(iv_s, iv_len);\n \t\t\t\tiv_len -= 2;\n \t\t\t\tpack_iv = 1;\n \t\t\t}\n@@ -1068,6 +1069,7 @@ cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,\n \t\tiv_len = params->cipher_iv_len;\n \n \t\tif (iv_len == 25) {\n+\t\t\troc_se_zuc_bytes_swap(iv_s, iv_len);\n \t\t\tiv_len -= 2;\n \t\t\tpack_iv = 1;\n \t\t}\n", "prefixes": [ "2/2" ] }{ "id": 112289, "url": "