Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/74496/?format=api
https://patches.dpdk.org/api/patches/74496/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200720121621.23628-3-david.coyle@intel.com/", "project": { "id": 1, "url": "https://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": "<20200720121621.23628-3-david.coyle@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200720121621.23628-3-david.coyle@intel.com", "date": "2020-07-20T12:16:21", "name": "[v2,2/2] crypto/aesni-mb: improve security instance setup", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "5f62fd493ae3704f79cfa6c6fe7cf3cff4eabc0e", "submitter": { "id": 961, "url": "https://patches.dpdk.org/api/people/961/?format=api", "name": "Coyle, David", "email": "david.coyle@intel.com" }, "delegate": { "id": 6690, "url": "https://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200720121621.23628-3-david.coyle@intel.com/mbox/", "series": [ { "id": 11171, "url": "https://patches.dpdk.org/api/series/11171/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11171", "date": "2020-07-20T12:16:19", "name": "improve security instance setup", "version": 2, "mbox": "https://patches.dpdk.org/series/11171/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/74496/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/74496/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 0DDC0A0540;\n\tMon, 20 Jul 2020 14:41:19 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 79E092D13;\n\tMon, 20 Jul 2020 14:41:06 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id 9CDDB2C30\n for <dev@dpdk.org>; Mon, 20 Jul 2020 14:41:01 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Jul 2020 05:41:00 -0700", "from silpixa00399912.ir.intel.com (HELO\n silpixa00399912.ger.corp.intel.com) ([10.237.223.64])\n by fmsmga008.fm.intel.com with ESMTP; 20 Jul 2020 05:40:58 -0700" ], "IronPort-SDR": [ "\n bAS2oHICxR9UX1UDnWhTr5c40mMRVk9vXRrVsT7jerC7riKCqKuY38SiXdM9GYV6DkF7hLod4q\n zswCtjJS30fQ==", "\n YYOzv2Aoou0G+0W2yTkQ5Y9mQ1LTKAJbgEdHhPAXn5Rw+lIANekjHvBmHmXQK4Vn0EqFCyHZPY\n xKKS4Nl7MyTQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9687\"; a=\"214578335\"", "E=Sophos;i=\"5.75,375,1589266800\"; d=\"scan'208\";a=\"214578335\"", "E=Sophos;i=\"5.75,375,1589266800\"; d=\"scan'208\";a=\"271422852\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "David Coyle <david.coyle@intel.com>", "To": "akhil.goyal@nxp.com, declan.doherty@intel.com,\n pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com", "Cc": "dev@dpdk.org, brendan.ryan@intel.com, mairtin.oloingsigh@intel.com,\n David Coyle <david.coyle@intel.com>", "Date": "Mon, 20 Jul 2020 13:16:21 +0100", "Message-Id": "<20200720121621.23628-3-david.coyle@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200720121621.23628-1-david.coyle@intel.com>", "References": "<20200716153600.66071-1-david.coyle@intel.com>\n <20200720121621.23628-1-david.coyle@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 2/2] crypto/aesni-mb: improve security\n\tinstance setup", "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": "This patch makes some improvements to the security instance setup for\nthe AESNI-MB PMD, as follows:\n- fix potential memory leak where the security instance was not freed if\n an error occurred later in the device creation\n- tidy-up security instance initialization code by moving it all,\n including enabling the RTE_CRYPTODEV_FF_SECURITY feature, into one\n '#ifdef AESNI_MB_DOCSIS_SEC_ENABLED' block\n\nFixes: fda5216fba55 (\"crypto/aesni_mb: support DOCSIS protocol\")\n\nSigned-off-by: David Coyle <david.coyle@intel.com>\n---\n drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)", "diff": "diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c\nindex b54c57f86..1bddbcf74 100644\n--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c\n+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c\n@@ -1881,9 +1881,6 @@ cryptodev_aesni_mb_create(const char *name,\n \tstruct aesni_mb_private *internals;\n \tenum aesni_mb_vector_mode vector_mode;\n \tMB_MGR *mb_mgr;\n-#ifdef AESNI_MB_DOCSIS_SEC_ENABLED\n-\tstruct rte_security_ctx *security_instance;\n-#endif\n \n \tdev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);\n \tif (dev == NULL) {\n@@ -1912,13 +1909,10 @@ cryptodev_aesni_mb_create(const char *name,\n \t\t\tRTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |\n \t\t\tRTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |\n \t\t\tRTE_CRYPTODEV_FF_SYM_CPU_CRYPTO |\n-\t\t\tRTE_CRYPTODEV_FF_SYM_SESSIONLESS\n-#ifdef AESNI_MB_DOCSIS_SEC_ENABLED\n-\t\t\t| RTE_CRYPTODEV_FF_SECURITY\n-#endif\n-\t\t\t;\n+\t\t\tRTE_CRYPTODEV_FF_SYM_SESSIONLESS;\n \n #ifdef AESNI_MB_DOCSIS_SEC_ENABLED\n+\tstruct rte_security_ctx *security_instance;\n \tsecurity_instance = rte_malloc(\"aesni_mb_sec\",\n \t\t\t\tsizeof(struct rte_security_ctx),\n \t\t\t\tRTE_CACHE_LINE_SIZE);\n@@ -1932,6 +1926,7 @@ cryptodev_aesni_mb_create(const char *name,\n \tsecurity_instance->ops = rte_aesni_mb_pmd_sec_ops;\n \tsecurity_instance->sess_cnt = 0;\n \tdev->security_ctx = security_instance;\n+\tdev->feature_flags |= RTE_CRYPTODEV_FF_SECURITY;\n #endif\n \n \t/* Check CPU for support for AES instruction set */\n@@ -1944,6 +1939,10 @@ cryptodev_aesni_mb_create(const char *name,\n \n \tmb_mgr = alloc_init_mb_mgr(vector_mode);\n \tif (mb_mgr == NULL) {\n+#ifdef AESNI_MB_DOCSIS_SEC_ENABLED\n+\t\trte_free(dev->security_ctx);\n+\t\tdev->security_ctx = NULL;\n+#endif\n \t\trte_cryptodev_pmd_destroy(dev);\n \t\treturn -ENOMEM;\n \t}\n@@ -2011,8 +2010,9 @@ cryptodev_aesni_mb_remove(struct rte_vdev_device *vdev)\n \t\tRTE_PER_LCORE(sync_mb_mgr) = NULL;\n \t}\n \n-#ifdef RTE_LIBRTE_SECURITY\n+#ifdef AESNI_MB_DOCSIS_SEC_ENABLED\n \trte_free(cryptodev->security_ctx);\n+\tcryptodev->security_ctx = NULL;\n #endif\n \n \treturn rte_cryptodev_pmd_destroy(cryptodev);\n", "prefixes": [ "v2", "2/2" ] }{ "id": 74496, "url": "