From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0055.outbound.protection.outlook.com [104.47.38.55]) by dpdk.org (Postfix) with ESMTP id E8FC01B206 for ; Thu, 30 Nov 2017 14:13:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jbMmdafprC1esrJDi34p1eVTQFYNnQUfAnb3moCe/2g=; b=gku2EIBGCtr9MVANWU5v6cbMnTV2yMfSTnsVqTWrpkBu3oQZpaPqLF04EMyyVFcrf+GB48bTD3yJ8CdK9TYXeEZTdKAaheRlB7wuHmO1WC2/Iiy2aXKptmoJbuxtdYZJxnWpmrxfgAO1r0a/cIagAeg9IPd+cNodPshK6s5CPXg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by BN6PR12MB1508.namprd12.prod.outlook.com (10.172.24.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Thu, 30 Nov 2017 13:13:14 +0000 From: Ravi Kumar To: dev@dpdk.org Date: Thu, 30 Nov 2017 08:12:33 -0500 Message-Id: <1512047553-118101-11-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512047553-118101-1-git-send-email-Ravi1.kumar@amd.com> References: <1512047553-118101-1-git-send-email-Ravi1.kumar@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: MA1PR0101CA0047.INDPRD01.PROD.OUTLOOK.COM (52.134.137.33) To BN6PR12MB1508.namprd12.prod.outlook.com (10.172.24.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1bf9d28d-324f-425d-5e47-08d537f41d84 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603286); SRVR:BN6PR12MB1508; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1508; 3:jNsC7XE2bxPUypkh8mRGc0XfG98W5PS6Y3gpRiFgNxNdui+18O5SJHQ51Twon6DVkM99b1M3o4L5izkF5mgnVVmrCaWZAKIbvjakwI4GlJ3DSZNp/rdJ7CwLRHDDHS8zZvaMX8qKfCyowKxh00rn8P0qwbLUxPpEZeuH1cVL9cqwBJwpped3yQrXv49Q++hz9DBA4gMAdJxzOv59BuH9SLG+3aXgzVhaZRbhgEuXbOGpgjHYwl5gjCwN4ncCH//V; 25:U+QF2HOsWudDz61VXt9lIh9LzTK5sfHyrjUm8k+I+jRxN0XdZaWgxlgxPjwUIBhW/YsKRXnUHR8mmW5eKkK8A9vvjX143YRU3kV/z2nP5mS5DbZn7Y0Qn6U80+lRKTTyGp/hdbEO3kfYRWmj9lFPJUW+bJTHanKlOxEGdOMm9zEGKXt6nX54WJYYWfUXe5KAlEBlycW/txUU0cug33D/MVrn+204W37UNftEHIgVRr0OJPDcOZGxxZ9K2UakKe3eQNtJuRmiveJnwx6SHQz3mhult+555aF7H038eOxyaWteUO6k3q5+PZMijbAYz8D8kMdCBZyuX0ohSn39nV1rOA==; 31:sucYHhSnN5VwodfCK+sxV2J0Z0hWerCcM36ekuLXxPcNIjTJGvYK6CiiH1oN6thOJFpSxVPLHfB8LxhL6c+yDzPgK7dCTAfskCspfpwU8+WNb0Od9eQVs26khm/55e/4JrvCL3DmQ7f0BOCnfhMWLjeOAKqJo0+FERz9eh8/vWRFvlwWfpBEc0wGPq31L621aCMeEBdW792QrhaMAyigQyjpOMVQ7khKWtXkzC+23dQ= X-MS-TrafficTypeDiagnostic: BN6PR12MB1508: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1508; 20:Gisoed05F1+rN4D0rN//pJFcoUyRud96e1Mhw4s+TAbvTPl2933M+mRDbtBkNuG5e+AA+2XbqyvcHci2462pH6naFtW3KqoySv6VqvN7nZNqpNgPFrpjAYudIzGUsuM6Hhfg5p8n8rJSVMcXQFpwLAoe2wckhX0wlnXBHk2Bd3DOMoX+pEgTOROPYxzYY+bNGIHavIFEZG3CBAydXFDNgNZnqdYtlbdG/Hj0ujYxyh/fkx9Y8cbk3kclFoWJ/9YimF0F8cJeZVuikKCU8XKpGXyb4WikGhLgBRnNl4oMefKFVb8AX47o7CI434A3+tbKXF7m6n17rrcEpC6oZ8DH5BnZlRelk6/RbHPrcqtsetBDxXjodXBiFCrahbUU9h5fSVuHeC2i3yIEJO5QQyAR+AC8YSfSsaROg57HIDmAMRSIABcFtwy0Pk6llWc/X1akGsUGPBv1n3SyMcSYqYkhMccwRRvKFRL1UgV/2CKeDTdXpK+G4SXJAH7ASxha014y; 4:2TMY8BZWY+dm1ESqhNXrwAMjHVKPnJn+Oazv4rMk2CXllqoxwkGAfedsWzPrsvXSxovqInB4jGb7k1L1u5pnXzC94LO/JRtS6gOJ1OpIBCshq7xLGIQ3+SHIsK/nsCvOSOHzrwVCDhTJgasNAv7vDBZojvuDl/ppiYswPiNHW4JbfLN1kpfGfFGYw69nG2MQrEFVvjq0VNud6JwhyU9yCRGgY5xlY1r6S2OL8Iy9XKRPZxoE5IZ5Bsk5jSosSUPex/2CCXcpsHE3qEM8Qva/mYJbJY0oehdpSWt0TSnL2O51aGDKmJ8LjWtztrX14ymo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231022)(10201501046)(6055026)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011); SRVR:BN6PR12MB1508; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR12MB1508; X-Forefront-PRVS: 05079D8470 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(366004)(39860400002)(189002)(199003)(36756003)(72206003)(6486002)(16526018)(5660300001)(101416001)(50226002)(97736004)(8936002)(50986010)(76176010)(8676002)(81156014)(105586002)(81166006)(53936002)(53416004)(16586007)(6666003)(478600001)(106356001)(7736002)(6916009)(2906002)(50466002)(2950100002)(48376002)(52116002)(51416003)(2361001)(305945005)(2351001)(86362001)(68736007)(7696005)(47776003)(25786009)(316002)(3846002)(575784001)(6116002)(189998001)(66066001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1508; H:wallaby-smavila.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1508; 23:R4+urNTAj192p/FxZgcIP98uzgutaIBbAYhH2AXZG?= =?us-ascii?Q?vp71qsaeWyXLakQZISTdAz2ldeNd10K0hJ5WspgT2s7IFggvA/19GSjOMYn6?= =?us-ascii?Q?wSCKnoTVjXtwqPCJZKlgZ0qwH2tZcDUKR7aO2eBGJZdB4IJlRd6W6j+TOd3n?= =?us-ascii?Q?kQ1uFV6RgbO7+9gHHj+ulIC0rnB3mrGvYAnHDI4Ie/ier8+jvzcQP8jg6tPy?= =?us-ascii?Q?4813rxO8N0M8W43jS9ChPS0KJX0ugqnAG728ccOcCSqxEixUEPiMY6Cz4i9p?= =?us-ascii?Q?CfgRFCD7Bxxh8ZtSOjMkGZancWwPt3zQ7qBBI5GThavuO5pw9l2YdEEHtQYu?= =?us-ascii?Q?0xn0gfCXrWG6uvjdNM4jBCjlL/9K/F/CrlF2f2UyLE/c6CPGiXipkh4Y/RX/?= =?us-ascii?Q?fwE+4q4ZhjvpQ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uO5puNMnGsJ2Du7tzs7+zVGITCmW67ryyuSsQciORkgmYgTAzA57cpGVQvG7bdwYkMENm9EYVc5VOLPLu/4r1A7cygY5ArbHhYdWU5OZ7+Hs X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 13:13:14.0492 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1bf9d28d-324f-425d-5e47-08d537f41d84 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1508 Subject: [dpdk-dev] [PATCH 11/11] crypto/ccp: update CCP PMD code-base X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2017 13:13:16 -0000 Signed-off-by: Ravi Kumar --- drivers/crypto/ccp/ccp_dev.h | 1 + drivers/crypto/ccp/ccp_pci.h | 2 +- drivers/crypto/ccp/rte_ccp_pmd.c | 31 ++++++++++++++++++------------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/ccp/ccp_dev.h b/drivers/crypto/ccp/ccp_dev.h index 28eb68e..832407a 100644 --- a/drivers/crypto/ccp/ccp_dev.h +++ b/drivers/crypto/ccp/ccp_dev.h @@ -36,6 +36,7 @@ #include #include +#include #include #include #include diff --git a/drivers/crypto/ccp/ccp_pci.h b/drivers/crypto/ccp/ccp_pci.h index a0edf75..292234d 100644 --- a/drivers/crypto/ccp/ccp_pci.h +++ b/drivers/crypto/ccp/ccp_pci.h @@ -33,7 +33,7 @@ #include -#include +#include #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices" #define PROC_MODULES "/proc/modules" diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c index d46c07c..f1369be 100644 --- a/drivers/crypto/ccp/rte_ccp_pmd.c +++ b/drivers/crypto/ccp/rte_ccp_pmd.c @@ -28,12 +28,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include @@ -176,7 +178,7 @@ cryptodev_ccp_remove(struct rte_vdev_device *dev) static int cryptodev_ccp_create(const char *name, struct rte_vdev_device *vdev, - struct rte_crypto_vdev_init_params *init_params) + struct rte_cryptodev_pmd_init_params *init_params) { struct rte_cryptodev *dev; struct ccp_private *internals; @@ -186,10 +188,9 @@ cryptodev_ccp_create(const char *name, snprintf(init_params->name, sizeof(init_params->name), "%s", name); - dev = rte_cryptodev_vdev_pmd_init(init_params->name, - sizeof(struct ccp_private), - init_params->socket_id, - vdev); + dev = rte_cryptodev_pmd_create(init_params->name, + &vdev->device, + init_params); if (dev == NULL) { CCP_LOG_ERR("failed to create cryptodev vdev"); goto init_error; @@ -236,11 +237,12 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev) { int rc = 0; const char *name; - struct rte_crypto_vdev_init_params init_params = { - CCP_PMD_MAX_QUEUE_PAIRS, - RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS, + struct rte_cryptodev_pmd_init_params init_params = { + "", + sizeof(struct ccp_private), rte_socket_id(), - {0} + CCP_PMD_MAX_QUEUE_PAIRS, + RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS }; const char *input_args; @@ -253,7 +255,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev) return -EINVAL; input_args = rte_vdev_device_args(vdev); - rte_cryptodev_vdev_parse_init_params(&init_params, input_args); + rte_cryptodev_pmd_parse_input_args(&init_params, input_args); init_params.max_nb_queue_pairs = CCP_PMD_MAX_QUEUE_PAIRS; RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name, @@ -275,7 +277,10 @@ static struct rte_vdev_driver cryptodev_ccp_pmd_drv = { .remove = cryptodev_ccp_remove }; +static struct cryptodev_driver ccp_crypto_drv; + RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv); RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD, "max_nb_queue_pairs= max_nb_sessions= socket_id="); -RTE_PMD_REGISTER_CRYPTO_DRIVER(cryptodev_ccp_pmd_drv, ccp_cryptodev_driver_id); +RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv, + ccp_cryptodev_driver_id); -- 2.7.4