Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/27988/?format=api
http://patches.dpdk.org/api/patches/27988/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1503673046-30651-4-git-send-email-radu.nicolau@intel.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": "<1503673046-30651-4-git-send-email-radu.nicolau@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1503673046-30651-4-git-send-email-radu.nicolau@intel.com", "date": "2017-08-25T14:57:24", "name": "[dpdk-dev,RFC,3/5] rte_security: updates and enabled security operations for ethdev", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "eb0008eee49c6a49dfdd54b4be52486e0e097daa", "submitter": { "id": 743, "url": "http://patches.dpdk.org/api/people/743/?format=api", "name": "Radu Nicolau", "email": "radu.nicolau@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1503673046-30651-4-git-send-email-radu.nicolau@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/27988/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/27988/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 95CC87D77;\n\tFri, 25 Aug 2017 17:01:22 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 108457D62\n\tfor <dev@dpdk.org>; Fri, 25 Aug 2017 17:01:18 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga105.jf.intel.com with ESMTP; 25 Aug 2017 08:01:18 -0700", "from silpixa00383879.ir.intel.com (HELO\n\tsilpixa00383879.ger.corp.intel.com) ([10.237.223.127])\n\tby fmsmga005.fm.intel.com with ESMTP; 25 Aug 2017 08:01:16 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.41,426,1498546800\"; d=\"scan'208\";a=\"143898972\"", "From": "Radu Nicolau <radu.nicolau@intel.com>", "To": "dev@dpdk.org", "Cc": "Radu Nicolau <radu.nicolau@intel.com>", "Date": "Fri, 25 Aug 2017 15:57:24 +0100", "Message-Id": "<1503673046-30651-4-git-send-email-radu.nicolau@intel.com>", "X-Mailer": "git-send-email 2.7.5", "In-Reply-To": "<1503673046-30651-1-git-send-email-radu.nicolau@intel.com>", "References": "<1503673046-30651-1-git-send-email-radu.nicolau@intel.com>", "Subject": "[dpdk-dev] [RFC PATCH 3/5] rte_security: updates and enabled\n\tsecurity operations for ethdev", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>\n---\n lib/Makefile | 1 +\n lib/librte_cryptodev/rte_cryptodev_pmd.h | 4 +--\n lib/librte_cryptodev/rte_cryptodev_version.map | 10 ++++++++\n lib/librte_cryptodev/rte_security.c | 34 +++++++++++++++++---------\n lib/librte_cryptodev/rte_security.h | 12 ++++++---\n 5 files changed, 44 insertions(+), 17 deletions(-)", "diff": "diff --git a/lib/Makefile b/lib/Makefile\nindex 86caba1..08a1767 100644\n--- a/lib/Makefile\n+++ b/lib/Makefile\n@@ -51,6 +51,7 @@ DEPDIRS-librte_ether += librte_mbuf\n DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += librte_cryptodev\n DEPDIRS-librte_cryptodev := librte_eal librte_mempool librte_ring librte_mbuf\n DEPDIRS-librte_cryptodev += librte_kvargs\n+DEPDIRS-librte_cryptodev += librte_ether\n DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += librte_eventdev\n DEPDIRS-librte_eventdev := librte_eal librte_ring\n DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += librte_vhost\ndiff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h\nindex 219fba6..ab3ecf7 100644\n--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h\n+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h\n@@ -371,7 +371,7 @@ struct rte_cryptodev_ops {\n * - Returns -ENOTSUP if crypto device does not support the crypto transform.\n * - Returns -ENOMEM if the private session could not be allocated.\n */\n-typedef int (*security_configure_session_t)(struct rte_cryptodev *dev,\n+typedef int (*security_configure_session_t)(void *dev,\n \t\tstruct rte_security_sess_conf *conf,\n \t\tstruct rte_security_session *sess,\n \t\tstruct rte_mempool *mp);\n@@ -382,7 +382,7 @@ typedef int (*security_configure_session_t)(struct rte_cryptodev *dev,\n * @param\tdev\t\tCrypto device pointer\n * @param\tsess\t\tSecurity session structure\n */\n-typedef void (*security_free_session_t)(struct rte_cryptodev *dev,\n+typedef void (*security_free_session_t)(void *dev,\n \t\tstruct rte_security_session *sess);\n \n /** Security operations function pointer table */\ndiff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map\nindex e9ba88a..20b553e 100644\n--- a/lib/librte_cryptodev/rte_cryptodev_version.map\n+++ b/lib/librte_cryptodev/rte_cryptodev_version.map\n@@ -79,3 +79,13 @@ DPDK_17.08 {\n \trte_crypto_aead_operation_strings;\n \n } DPDK_17.05;\n+\n+DPDK_17.11 {\n+\tglobal:\n+\n+\trte_security_session_create;\n+\trte_security_session_init;\n+\trte_security_attach_session;\n+\trte_security_session_free;\n+\n+} DPDK_17.08;\ndiff --git a/lib/librte_cryptodev/rte_security.c b/lib/librte_cryptodev/rte_security.c\nindex 7c73c93..5f35355 100644\n--- a/lib/librte_cryptodev/rte_security.c\n+++ b/lib/librte_cryptodev/rte_security.c\n@@ -86,8 +86,12 @@ rte_security_session_init(uint16_t dev_id,\n \t\t\treturn -EINVAL;\n \t\tcdev = rte_cryptodev_pmd_get_dev(dev_id);\n \t\tindex = cdev->driver_id;\n+\t\tif (cdev == NULL || sess == NULL || cdev->sec_ops == NULL\n+\t\t\t\t|| cdev->sec_ops->session_configure == NULL)\n+\t\t\treturn -EINVAL;\n \t\tif (sess->sess_private_data[index] == NULL) {\n-\t\t\tret = cdev->sec_ops->session_configure(cdev, conf, sess, mp);\n+\t\t\tret = cdev->sec_ops->session_configure((void *)cdev,\n+\t\t\t\t\tconf, sess, mp);\n \t\t\tif (ret < 0) {\n \t\t\t\tCDEV_LOG_ERR(\n \t\t\t\t\t\"cdev_id %d failed to configure session details\",\n@@ -100,14 +104,18 @@ rte_security_session_init(uint16_t dev_id,\n \tcase RTE_SECURITY_SESS_ETH_PROTO_OFFLOAD:\n \t\tdev = &rte_eth_devices[dev_id];\n \t\tindex = dev->data->port_id;\n+\t\tif (dev == NULL || sess == NULL || dev->sec_ops == NULL\n+\t\t\t\t|| dev->sec_ops->session_configure == NULL)\n+\t\t\treturn -EINVAL;\n \t\tif (sess->sess_private_data[index] == NULL) {\n-//\t\t\tret = dev->sec_ops->session_configure(dev, conf, sess, mp);\n-//\t\t\tif (ret < 0) {\n-//\t\t\t\tCDEV_LOG_ERR(\n-//\t\t\t\t\t\"dev_id %d failed to configure session details\",\n-//\t\t\t\t\tdev_id);\n-//\t\t\t\treturn ret;\n-//\t\t\t}\n+\t\t\tret = dev->sec_ops->session_configure((void *)dev,\n+\t\t\t\t\tconf, sess, mp);\n+\t\t\tif (ret < 0) {\n+\t\t\t\tCDEV_LOG_ERR(\n+\t\t\t\t\t\"dev_id %d failed to configure session details\",\n+\t\t\t\t\tdev_id);\n+\t\t\t\treturn ret;\n+\t\t\t}\n \t\t}\n \t\tbreak;\n \tdefault:\n@@ -152,16 +160,18 @@ rte_security_session_clear(uint8_t dev_id,\n \tswitch (action_type) {\n \tcase RTE_SECURITY_SESS_CRYPTO_PROTO_OFFLOAD:\n \t\tcdev = rte_cryptodev_pmd_get_dev(dev_id);\n-\t\tif (cdev == NULL || sess == NULL)\n+\t\tif (cdev == NULL || sess == NULL || cdev->sec_ops == NULL\n+\t\t\t\t|| cdev->sec_ops->session_clear == NULL)\n \t\t\treturn -EINVAL;\n-\t\tcdev->sec_ops->session_clear(cdev, sess);\n+\t\tcdev->sec_ops->session_clear((void *)cdev, sess);\n \t\tbreak;\n \tcase RTE_SECURITY_SESS_ETH_INLINE_CRYPTO:\n \tcase RTE_SECURITY_SESS_ETH_PROTO_OFFLOAD:\n \t\tdev = &rte_eth_devices[dev_id];\n-\t\tif (dev == NULL || sess == NULL)\n+\t\tif (dev == NULL || sess == NULL || dev->sec_ops == NULL\n+\t\t\t\t|| dev->sec_ops->session_clear == NULL)\n \t\t\treturn -EINVAL;\n-//\t\tdev->dev_ops->session_clear(dev, sess);\n+\t\tdev->sec_ops->session_clear((void *)dev, sess);\n \t\tbreak;\n \tdefault:\n \t\treturn -EINVAL;\ndiff --git a/lib/librte_cryptodev/rte_security.h b/lib/librte_cryptodev/rte_security.h\nindex 9747d5e..0c8b358 100644\n--- a/lib/librte_cryptodev/rte_security.h\n+++ b/lib/librte_cryptodev/rte_security.h\n@@ -20,7 +20,7 @@ extern \"C\" {\n #include <rte_memory.h>\n #include <rte_mempool.h>\n #include <rte_common.h>\n-#include <rte_crypto.h>\n+#include \"rte_crypto.h\"\n \n /** IPSec protocol mode */\n enum rte_security_conf_ipsec_sa_mode {\n@@ -70,9 +70,9 @@ struct rte_security_ipsec_tunnel_param {\n \t\t} ipv4; /**< IPv4 header parameters */\n \n \t\tstruct {\n-\t\t\tstruct in6_addr *src_addr;\n+\t\t\tstruct in6_addr src_addr;\n \t\t\t/**< IPv6 source address */\n-\t\t\tstruct in6_addr *dst_addr;\n+\t\t\tstruct in6_addr dst_addr;\n \t\t\t/**< IPv6 destination address */\n \t\t\tuint8_t dscp;\n \t\t\t/**< IPv6 Differentiated Services Code Point */\n@@ -171,6 +171,12 @@ struct rte_security_ipsec_xform {\n \t\tuint8_t *data; /**< pointer to key data */\n \t\tsize_t length; /**< key length in bytes */\n \t} auth_key;\n+\tenum rte_crypto_aead_algorithm aead_alg;\n+\t/**< AEAD Algorithm */\n+\tstruct {\n+\t\tuint8_t *data; /**< pointer to key data */\n+\t\tsize_t length; /**< key length in bytes */\n+\t} aead_key;\n \tuint32_t salt;\t/**< salt for this SA */\n \tenum rte_security_conf_ipsec_sa_mode mode;\n \t/**< IPsec SA Mode - transport/tunnel */\n", "prefixes": [ "dpdk-dev", "RFC", "3/5" ] }{ "id": 27988, "url": "