Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/76466/?format=api
http://patchwork.dpdk.org/api/patches/76466/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200903170734.12066-1-akhil.goyal@nxp.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20200903170734.12066-1-akhil.goyal@nxp.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200903170734.12066-1-akhil.goyal@nxp.com", "date": "2020-09-03T17:07:33", "name": "[1/2] crypto/dpaa2_sec: increase supported anti replay win sz", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "96e29a8a8d76cc6b4bf189749c25026be0a4dc34", "submitter": { "id": 517, "url": "http://patchwork.dpdk.org/api/people/517/?format=api", "name": "Akhil Goyal", "email": "akhil.goyal@nxp.com" }, "delegate": { "id": 6690, "url": "http://patchwork.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200903170734.12066-1-akhil.goyal@nxp.com/mbox/", "series": [ { "id": 11933, "url": "http://patchwork.dpdk.org/api/series/11933/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=11933", "date": "2020-09-03T17:07:34", "name": "[1/2] crypto/dpaa2_sec: increase supported anti replay win sz", "version": 1, "mbox": "http://patchwork.dpdk.org/series/11933/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/76466/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/76466/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 095ADA04B1;\n\tThu, 3 Sep 2020 19:07:50 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 12DE71C0B9;\n\tThu, 3 Sep 2020 19:07:44 +0200 (CEST)", "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by dpdk.org (Postfix) with ESMTP id 82F4C1BEAF\n for <dev@dpdk.org>; Thu, 3 Sep 2020 19:07:41 +0200 (CEST)", "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 52E951A03C1;\n Thu, 3 Sep 2020 19:07:41 +0200 (CEST)", "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2B2D31A03D9;\n Thu, 3 Sep 2020 19:07:39 +0200 (CEST)", "from lsv03273.swis.in-blr01.nxp.com (lsv03273.swis.in-blr01.nxp.com\n [92.120.147.113])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4E16C402EB;\n Thu, 3 Sep 2020 19:07:36 +0200 (CEST)" ], "From": "akhil.goyal@nxp.com", "To": "dev@dpdk.org", "Cc": "hemant.agrawal@nxp.com, Akhil Goyal <akhil.goyal@nxp.com>,\n Yi Liu <yi.liu@nxp.com>", "Date": "Thu, 3 Sep 2020 22:37:33 +0530", "Message-Id": "<20200903170734.12066-1-akhil.goyal@nxp.com>", "X-Mailer": "git-send-email 2.17.1", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Subject": "[dpdk-dev] [PATCH 1/2] crypto/dpaa2_sec: increase supported anti\n\treplay win sz", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Akhil Goyal <akhil.goyal@nxp.com>\n\nIn case of LX2160 or SEC ERA >= 10, max anti replay window\nsize supported is 1024. For all other versions of SEC, the\nmaximum value is capped at 128 even if application gives\nmore than that.\n\nSigned-off-by: Akhil Goyal <akhil.goyal@nxp.com>\nSigned-off-by: Yi Liu <yi.liu@nxp.com>\n---\n drivers/common/dpaax/caamflib/desc/ipsec.h | 48 +++++++++++++++++++--\n drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 14 ++++++\n 2 files changed, 59 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/common/dpaax/caamflib/desc/ipsec.h b/drivers/common/dpaax/caamflib/desc/ipsec.h\nindex cf6fa4252..83dd93f58 100644\n--- a/drivers/common/dpaax/caamflib/desc/ipsec.h\n+++ b/drivers/common/dpaax/caamflib/desc/ipsec.h\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n *\n * Copyright 2008-2016 Freescale Semiconductor Inc.\n- * Copyright 2016,2019 NXP\n+ * Copyright 2016,2019-2020 NXP\n *\n */\n \n@@ -119,8 +119,15 @@\n \n /* IPSec ESP Decap PDB options */\n \n+/**\n+ * PDBOPTS_ESP_ARS_MASK_ERA10 - antireplay window mask\n+ * for SEC_ERA >= 10\n+ */\n+#define PDBOPTS_ESP_ARS_MASK_ERA10\t0xc8\n+\n /**\n * PDBOPTS_ESP_ARS_MASK - antireplay window mask\n+ * for SEC_ERA < 10\n */\n #define PDBOPTS_ESP_ARS_MASK\t0xc0\n \n@@ -141,6 +148,27 @@\n */\n #define PDBOPTS_ESP_ARS128\t0x80\n \n+/**\n+ * PDBOPTS_ESP_ARS256 - 256-entry antireplay window\n+ *\n+ * Valid only for IPsec new mode.\n+ */\n+#define PDBOPTS_ESP_ARS256\t0x08\n+\n+/**\n+ * PDBOPTS_ESP_ARS512 - 512-entry antireplay window\n+ *\n+ * Valid only for IPsec new mode.\n+ */\n+#define PDBOPTS_ESP_ARS512\t0x48\n+\n+/**\n+ * PDBOPTS_ESP_ARS1024 - 1024-entry antireplay window\n+ *\n+ * Valid only for IPsec new mode.\n+ */\n+#define PDBOPTS_ESP_ARS1024\t0x88\n+\n /**\n * PDBOPTS_ESP_ARS32 - 32-entry antireplay window\n */\n@@ -439,7 +467,7 @@ struct ipsec_decap_pdb {\n \t};\n \tuint32_t seq_num_ext_hi;\n \tuint32_t seq_num;\n-\tuint32_t anti_replay[4];\n+\tuint32_t anti_replay[32];\n };\n \n static inline unsigned int\n@@ -449,6 +477,7 @@ __rta_copy_ipsec_decap_pdb(struct program *program,\n {\n \tunsigned int start_pc = program->current_pc;\n \tunsigned int i, ars;\n+\tuint8_t mask;\n \n \t__rta_out32(program, pdb->options);\n \n@@ -486,7 +515,20 @@ __rta_copy_ipsec_decap_pdb(struct program *program,\n \t__rta_out32(program, pdb->seq_num_ext_hi);\n \t__rta_out32(program, pdb->seq_num);\n \n-\tswitch (pdb->options & PDBOPTS_ESP_ARS_MASK) {\n+\tif (rta_sec_era < RTA_SEC_ERA_10)\n+\t\tmask = PDBOPTS_ESP_ARS_MASK;\n+\telse\n+\t\tmask = PDBOPTS_ESP_ARS_MASK_ERA10;\n+\tswitch (pdb->options & mask) {\n+\tcase PDBOPTS_ESP_ARS1024:\n+\t\tars = 32;\n+\t\tbreak;\n+\tcase PDBOPTS_ESP_ARS512:\n+\t\tars = 16;\n+\t\tbreak;\n+\tcase PDBOPTS_ESP_ARS256:\n+\t\tars = 8;\n+\t\tbreak;\n \tcase PDBOPTS_ESP_ARS128:\n \t\tars = 4;\n \t\tbreak;\ndiff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\nindex 195c7d894..27c28804f 100644\n--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\n+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c\n@@ -2996,6 +2996,10 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,\n \t\t\tuint32_t win_sz;\n \t\t\twin_sz = rte_align32pow2(ipsec_xform->replay_win_sz);\n \n+\t\t\tif (rta_sec_era < RTA_SEC_ERA_10 && win_sz > 128) {\n+\t\t\t\tDPAA2_SEC_INFO(\"Max Anti replay Win sz = 128\");\n+\t\t\t\twin_sz = 128;\n+\t\t\t}\n \t\t\tswitch (win_sz) {\n \t\t\tcase 1:\n \t\t\tcase 2:\n@@ -3008,6 +3012,16 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,\n \t\t\tcase 64:\n \t\t\t\tdecap_pdb.options |= PDBOPTS_ESP_ARS64;\n \t\t\t\tbreak;\n+\t\t\tcase 256:\n+\t\t\t\tdecap_pdb.options |= PDBOPTS_ESP_ARS256;\n+\t\t\t\tbreak;\n+\t\t\tcase 512:\n+\t\t\t\tdecap_pdb.options |= PDBOPTS_ESP_ARS512;\n+\t\t\t\tbreak;\n+\t\t\tcase 1024:\n+\t\t\t\tdecap_pdb.options |= PDBOPTS_ESP_ARS1024;\n+\t\t\t\tbreak;\n+\t\t\tcase 128:\n \t\t\tdefault:\n \t\t\t\tdecap_pdb.options |= PDBOPTS_ESP_ARS128;\n \t\t\t}\n", "prefixes": [ "1/2" ] }{ "id": 76466, "url": "