Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/112288/?format=api
http://patches.dpdk.org/api/patches/112288/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220603071307.14360-2-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-2-adwivedi@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220603071307.14360-2-adwivedi@marvell.com", "date": "2022-06-03T07:13:06", "name": "[1/2] common/cnxk: swap zuc-256 key", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "8ab2bdab00de1a64ac99351c1d6d4a1dc2865ac5", "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-2-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/112288/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/112288/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 09B48A0555;\n\tFri, 3 Jun 2022 09:13:35 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EFF4C427F3;\n\tFri, 3 Jun 2022 09:13:34 +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 5C8084021E\n for <dev@dpdk.org>; Fri, 3 Jun 2022 09:13:33 +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 2533qIm2032524\n for <dev@dpdk.org>; Fri, 3 Jun 2022 00:13:32 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3geu3ecbmv-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:32 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Fri, 3 Jun 2022 00:13:30 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Fri, 3 Jun 2022 00:13:30 -0700", "from hyd1349.t110.caveonetworks.com.com (unknown [10.29.45.13])\n by maili.marvell.com (Postfix) with ESMTP id 54CF43F7065;\n Fri, 3 Jun 2022 00:13:28 -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=MubRLGiUcId56UNnyCnRQeHdKMdiGAID60ckigr3FJM=;\n b=i5OTj1OGEiey/GYVowmdHxVjbsnHb5PUZLpjREfKP2hWEVzPNwvrjzLe9MdK/nRXspwB\n VVTaOX55Wyc/ppVzgQAh71/8i31+BZ5BsWPTwkuE6CXILUtDoyNltyeAMmNQRA3j6joy\n kFr0lNZhuPSMZAAlICHia316tl41hV8miNhW7cPqHwgvJcxwQ73QmaJd9jKZHJQl44El\n vYlWiLW/pv/lYlQtAYWreSThJsFuxbh7hyeUF+lNCQKHFvhCrE+m/r/mKyVE9L/shSBW\n XpgtP+MTvRPU6zOion3k8pA1zXFSS1ZwAaAOhn4/lOGxINYMd37vPqqgPk4QV0i0lIcP tg==", "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 1/2] common/cnxk: swap zuc-256 key", "Date": "Fri, 3 Jun 2022 12:43:06 +0530", "Message-ID": "<20220603071307.14360-2-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": "gbINHZp-2lZYOeKFuGOm1nqVGuSpcj4d", "X-Proofpoint-ORIG-GUID": "gbINHZp-2lZYOeKFuGOm1nqVGuSpcj4d", "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 zuc-256 key to be in reverse of what is\nprovided by dpdk test app. This patch swaps the zuc-256 key.\n\nSigned-off-by: Ankur Dwivedi <adwivedi@marvell.com>\nReviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>\n---\n drivers/common/cnxk/roc_se.c | 7 +++++--\n drivers/common/cnxk/roc_se.h | 22 ++++++++++++++++++++++\n 2 files changed, 27 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/common/cnxk/roc_se.c b/drivers/common/cnxk/roc_se.c\nindex ffe537af30..3f0821e400 100644\n--- a/drivers/common/cnxk/roc_se.c\n+++ b/drivers/common/cnxk/roc_se.c\n@@ -283,6 +283,8 @@ roc_se_auth_key_set(struct roc_se_ctx *se_ctx, roc_se_auth_type type,\n \t\t\t\treturn ret;\n \t\t\tse_ctx->pdcp_alg_type = ROC_SE_PDCP_ALG_TYPE_ZUC;\n \t\t\tmemcpy(ci_key, key, key_len);\n+\t\t\tif (key_len == 32)\n+\t\t\t\troc_se_zuc_bytes_swap(ci_key, key_len);\n \t\t\tcpt_pdcp_update_zuc_const(zuc_const, key_len, mac_len);\n \t\t\tse_ctx->fc_type = ROC_SE_PDCP;\n \t\t\tse_ctx->zsk_flags = 0x1;\n@@ -459,9 +461,10 @@ roc_se_ciph_key_set(struct roc_se_ctx *se_ctx, roc_se_cipher_type type,\n \t\tzs_ctx->zuc.otk_ctx.w0.s.alg_type = ROC_SE_PDCP_ALG_TYPE_ZUC;\n \t\tse_ctx->pdcp_alg_type = ROC_SE_PDCP_ALG_TYPE_ZUC;\n \t\tmemcpy(ci_key, key, key_len);\n-\t\tif (key_len == 32)\n+\t\tif (key_len == 32) {\n+\t\t\troc_se_zuc_bytes_swap(ci_key, key_len);\n \t\t\tmemcpy(zuc_const, zuc_key256, 16);\n-\t\telse\n+\t\t} else\n \t\t\tmemcpy(zuc_const, zuc_key128, 32);\n \n \t\tse_ctx->zsk_flags = 0;\ndiff --git a/drivers/common/cnxk/roc_se.h b/drivers/common/cnxk/roc_se.h\nindex 145a1825bd..fde69ceb9e 100644\n--- a/drivers/common/cnxk/roc_se.h\n+++ b/drivers/common/cnxk/roc_se.h\n@@ -301,6 +301,27 @@ struct roc_se_ctx {\n \tuint8_t *auth_key;\n };\n \n+static inline void\n+roc_se_zuc_bytes_swap(uint8_t *arr, int len)\n+{\n+\tint start, end;\n+\tuint8_t tmp;\n+\n+\tif (len <= 0)\n+\t\treturn;\n+\n+\tstart = 0;\n+\tend = len - 1;\n+\n+\twhile (start < end) {\n+\t\ttmp = arr[start];\n+\t\tarr[start] = arr[end];\n+\t\tarr[end] = tmp;\n+\t\tstart++;\n+\t\tend--;\n+\t}\n+}\n+\n int __roc_api roc_se_auth_key_set(struct roc_se_ctx *se_ctx,\n \t\t\t\t roc_se_auth_type type, const uint8_t *key,\n \t\t\t\t uint16_t key_len, uint16_t mac_len);\n@@ -310,4 +331,5 @@ int __roc_api roc_se_ciph_key_set(struct roc_se_ctx *se_ctx,\n \t\t\t\t uint16_t key_len, uint8_t *salt);\n \n void __roc_api roc_se_ctx_swap(struct roc_se_ctx *se_ctx);\n+\n #endif /* __ROC_SE_H__ */\n", "prefixes": [ "1/2" ] }{ "id": 112288, "url": "