From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0082.outbound.protection.outlook.com [104.47.32.82]) by dpdk.org (Postfix) with ESMTP id 121841BE0 for ; Tue, 4 Sep 2018 06:03:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IzSeT5pOcDyoYevVdcu9TGkPd/Mci3BqMMll6cYeebs=; b=UukYBQQs8XsJI5kwJAvgUeMOCjq9on68FrglpWKNxcd4p1WzyjBFODq50pSfRfwCpazuUmMCsqGZ1BZnMNRL6i3h4rnCBew89jR4MvkxKnLZP8duSTsp2D9xjNZV8z64xV/VIhfYv25knFMPIjqQHbdPIfofHNr2TUCEnZ9BXzg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.com (115.113.156.2) by BYAPR07MB4902.namprd07.prod.outlook.com (2603:10b6:a02:ef::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.15; Tue, 4 Sep 2018 04:01:53 +0000 From: Anoob Joseph To: Akhil Goyal , Pablo de Lara , Thomas Monjalon Cc: Ankur Dwivedi , Jerin Jacob , Narayana Prasad , dev@dpdk.org, Anoob Joseph , Murthy NSSR , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian S , Tejasree Kondoj Date: Tue, 4 Sep 2018 09:28:50 +0530 Message-Id: <1536033560-21541-4-git-send-email-ajoseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: BMXPR01CA0023.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::33) To BYAPR07MB4902.namprd07.prod.outlook.com (2603:10b6:a02:ef::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cdcbd2d8-ddbc-4797-8df2-08d6121b28c0 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4902; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4902; 3:Cw50DMczpwRLAJ//4DYDs9/8ObTkk60FrL3Gd9V3L+kAqh7tPzOCmDtAWW22EtF1K96R3UNkkhBA6SGtvfbnk9Xhyy3rzxtw8l3fDcMvCc3cjamFHSzAKGNoEfhprQBTSp+IYg0zkwwkl247eNRqA9t+63AUv+BsC0ItAUBkEnZ/9ovBcPZ4f5qhgJx62uI/tg/WCTAjD30xIFfMAa/KlCMP5kGtqQbUJ3UaC5+EGI6yRQkfjQaYxTI09UHI/y8N; 25:FrZWaBtDixwsQ5EnEVaZINZnAD4U6NkSKRnmqMyMc0/9HBb8NbZt7TVCfGNzSWDEp6eLbi7RpzyleCjpYEdoF2f6dni2D60wvHzL8UR3fsenydPoaQTraAoayh5p4qzIXvWH4ilJ42mRJKyo5K9IITmw6EiZ6kxChPQLoik32O8IUNpbAmSV1CoYpAxfcUM2R6zyyH+EE3DR5UgVy9Q+eZf+iRD4pTI1kK0sf7aCiFinYnwc6S/l/0bg45iWlQS4gHPTL4Y/Q42Zj9oKe9rqozpH4JlVP/Cf2eQ4bZn7c/b1cpA2x8kcdRIBVjwcOYCW5bSekgBK/h3pnQcBu9BsTg==; 31:ASDqCDfUZvgo4XpNd0+KIIucQo/TYz5octLJThN69UVeN3L1nUeEJiPaQG8hfB0uC/3o4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ymHu65a6scahykfrZkfR5BIEGCcVMBEGQnZWE1Evi0BJINDfqFq0APoTHtbFOgOqavADaj6jg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699016); SRVR:BYAPR07MB4902; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4902; X-Forefront-PRVS: 0785459C39 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(136003)(346002)(376002)(39860400002)(199004)(189003)(26005)(51416003)(52116002)(76176011)(81166006)(305945005)(81156014)(7736002)(105586002)(316002)(6506007)(106356001)(6512007)(8936002)(446003)(54906003)(25786009)(68736007)(50226002)(110136005)(53936002)(16586007)(42882007)(386003)(5660300001)(2906002)(72206003)(50466002)(6486002)(36756003)(6116002)(107886003)(2616005)(14444005)(186003)(3846002)(478600001)(66066001)(476003)(8676002)(47776003)(5024004)(486006)(956004)(48376002)(11346002)(4326008)(97736004)(16526019); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4902; H:ajoseph83.caveonetworks.com.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4902; 23:mISaCqt52GJ6yv/hTkF4au4mwHEAsi9NPHMdaYMy3?= =?us-ascii?Q?OWYNqVsUE/ai8Ir2OW2HqUFPMWCzNyHfmqwGXE/pNJbTfL8mRwqLQK9WvmgO?= =?us-ascii?Q?t+iL9hy7jGYO6kBRty2asAZCcT7fdiDr78D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fyEdV2J8O3Wc30JFkIIQVWMs01Rzj0Bfm79NF2/xJchd2EuYuX9Sn/gyOhqmdAz3zmyo11HvIyzz0q+nn89XYVTAUen+nuRFSQ6PZjBnQ1SQW+JTk1pSXBKe1tfhtdPg==; 5:NE6dHs/puQAJsA97OVVIRWzjG12qyyAJzUuerp58KxD0xWKpBL7J7JxkBI08/4EsCaxFnxHKhvbel2neSaY1OXDuegVg58u5mDbhlKRTk4T9EkQ+DZwVXrxWgEJdNHC5nxsDoQeXBc6kZRMXdkeHuEome5RDUsIon1/nFhcPoW8=; 7:njvdSrVNIv5QmafuGyMrBSAA8LW27vSCGPGyjw7cCB56ohwpXWidAcwPHEJnNNwwYQxYtFVTdUONRqr1xXzLrl5fT9KHRL0cbYVIkOibPRxDlWxGRKHuyYvrQCYIWkBROD7ROIQcYwKDVUFDVOROsxBp8+a6Hd46GDOmq3fhNt4iUEOdP4sCzaclYZ5sl9xVjx+LEEgnN+qF/obPd06OHHzEBBs8aPBGAFSal/jjvfXKbgXxaKq6aaGnv1DDXBjd SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2018 04:01:53.7878 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cdcbd2d8-ddbc-4797-8df2-08d6121b28c0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4902 Subject: [dpdk-dev] [PATCH v2 03/33] crypto/octeontx: add PCI probe and remove 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: Tue, 04 Sep 2018 04:03:05 -0000 From: Ankur Dwivedi Adding basic PCI probe/remove functions for OcteonTX crypto device. Initialization function for logging is also added. Signed-off-by: Ankur Dwivedi Signed-off-by: Anoob Joseph Signed-off-by: Murthy NSSR Signed-off-by: Nithin Dabilpuram Signed-off-by: Ragothaman Jayaraman Signed-off-by: Srisivasubramanian S Signed-off-by: Tejasree Kondoj --- drivers/crypto/octeontx/Makefile | 5 ++ drivers/crypto/octeontx/meson.build | 4 +- drivers/crypto/octeontx/otx_cryptodev.c | 132 ++++++++++++++++++++++++++++ drivers/crypto/octeontx/otx_cryptodev.h | 20 +++++ drivers/crypto/octeontx/otx_cryptodev_ops.c | 15 ++++ drivers/crypto/octeontx/otx_cryptodev_ops.h | 11 +++ 6 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 drivers/crypto/octeontx/otx_cryptodev.c create mode 100644 drivers/crypto/octeontx/otx_cryptodev.h create mode 100644 drivers/crypto/octeontx/otx_cryptodev_ops.c create mode 100644 drivers/crypto/octeontx/otx_cryptodev_ops.h diff --git a/drivers/crypto/octeontx/Makefile b/drivers/crypto/octeontx/Makefile index 65bd02f..12fec75 100644 --- a/drivers/crypto/octeontx/Makefile +++ b/drivers/crypto/octeontx/Makefile @@ -20,6 +20,11 @@ LDLIBS += -lrte_pci -lrte_bus_pci VPATH += $(RTE_SDK)/drivers/crypto/octeontx CFLAGS += -O3 -DCPT_MODEL=CRYPTO_OCTEONTX +CFLAGS += -I$(RTE_SDK)/drivers/common/cpt + +# PMD code +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_CRYPTO) += otx_cryptodev.c +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_CRYPTO) += otx_cryptodev_ops.c # export include files SYMLINK-y-include += diff --git a/drivers/crypto/octeontx/meson.build b/drivers/crypto/octeontx/meson.build index 261bb77..6564090 100644 --- a/drivers/crypto/octeontx/meson.build +++ b/drivers/crypto/octeontx/meson.build @@ -7,6 +7,8 @@ endif deps += ['bus_pci'] name = 'octeontx_crypto' -sources = files() +sources = files('otx_cryptodev.c', + 'otx_cryptodev_ops.c') cflags += '-DCPT_MODEL=CRYPTO_OCTEONTX' +includes += include_directories('../../common/cpt') diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c new file mode 100644 index 0000000..df88a84 --- /dev/null +++ b/drivers/crypto/octeontx/otx_cryptodev.c @@ -0,0 +1,132 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018 Cavium, Inc + */ + +#include +#include +#include +#include +#include +#include + +/* CPT common headers */ +#include "cpt_pmd_logs.h" + +#include "otx_cryptodev.h" +#include "otx_cryptodev_ops.h" + +static int otx_cryptodev_logtype; + +static struct rte_pci_id pci_id_cpt_table[] = { + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, CPT_81XX_PCI_VF_DEVICE_ID), + }, + /* sentinel */ + { + .device_id = 0 + }, +}; + +static void +otx_cpt_init_log(void) +{ + /* Bus level logs */ + otx_cryptodev_logtype = rte_log_register("pmd.crypto.octeontx"); + if (otx_cryptodev_logtype >= 0) + rte_log_set_level(otx_cryptodev_logtype, RTE_LOG_NOTICE); +} + +static void +otx_cpt_logtype_init(void) +{ + cpt_logtype = otx_cryptodev_logtype; +} + +static int +otx_cpt_pci_probe(struct rte_pci_driver *pci_drv, + struct rte_pci_device *pci_dev) +{ + struct rte_cryptodev *cryptodev; + char name[RTE_CRYPTODEV_NAME_MAX_LEN]; + int retval; + + if (pci_drv == NULL) + return -ENODEV; + + rte_pci_device_name(&pci_dev->addr, name, sizeof(name)); + + cryptodev = rte_cryptodev_pmd_allocate(name, rte_socket_id()); + if (cryptodev == NULL) + return -ENOMEM; + + cryptodev->device = &pci_dev->device; + cryptodev->device->driver = &pci_drv->driver; + cryptodev->driver_id = otx_cryptodev_driver_id; + + /* init user callbacks */ + TAILQ_INIT(&(cryptodev->link_intr_cbs)); + + /* init logtype used in common */ + otx_cpt_logtype_init(); + + /* Invoke PMD device initialization function */ + retval = otx_cpt_dev_create(cryptodev); + if (retval == 0) + return 0; + + CPT_LOG_ERR("[DRV %s]: Failed to create device " + "(vendor_id: 0x%x device_id: 0x%x", + pci_drv->driver.name, + (unsigned int) pci_dev->id.vendor_id, + (unsigned int) pci_dev->id.device_id); + + cryptodev->attached = RTE_CRYPTODEV_DETACHED; + + return -ENXIO; +} + +static int +otx_cpt_pci_remove(struct rte_pci_device *pci_dev) +{ + struct rte_cryptodev *cryptodev; + char name[RTE_CRYPTODEV_NAME_MAX_LEN]; + + if (pci_dev == NULL) + return -EINVAL; + + rte_pci_device_name(&pci_dev->addr, name, sizeof(name)); + + cryptodev = rte_cryptodev_pmd_get_named_dev(name); + if (cryptodev == NULL) + return -ENODEV; + + if (pci_dev->driver == NULL) + return -ENODEV; + + /* free crypto device */ + rte_cryptodev_pmd_release_device(cryptodev); + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + rte_free(cryptodev->data->dev_private); + + cryptodev->device = NULL; + cryptodev->device->driver = NULL; + cryptodev->data = NULL; + + return 0; +} + +static struct rte_pci_driver otx_cryptodev_pmd = { + .id_table = pci_id_cpt_table, + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, + .probe = otx_cpt_pci_probe, + .remove = otx_cpt_pci_remove, +}; + +static struct cryptodev_driver otx_cryptodev_drv; + +RTE_INIT(otx_cpt_init_log); +RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_OCTEONTX_PMD, otx_cryptodev_pmd); +RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table); +RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver, + otx_cryptodev_driver_id); diff --git a/drivers/crypto/octeontx/otx_cryptodev.h b/drivers/crypto/octeontx/otx_cryptodev.h new file mode 100644 index 0000000..99d3346 --- /dev/null +++ b/drivers/crypto/octeontx/otx_cryptodev.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018 Cavium, Inc + */ + +#ifndef _OTX_CRYPTODEV_H_ +#define _OTX_CRYPTODEV_H_ + +/* Cavium OcteonTX Crypto PMD device name */ +#define CRYPTODEV_NAME_OCTEONTX_PMD crypto_octeontx + +/* Device ID */ +#define PCI_VENDOR_ID_CAVIUM 0x177d +#define CPT_81XX_PCI_VF_DEVICE_ID 0xa041 + +/* + * Crypto device driver ID + */ +uint8_t otx_cryptodev_driver_id; + +#endif /* _OTX_CRYPTODEV_H_ */ diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c new file mode 100644 index 0000000..1b5f108 --- /dev/null +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018 Cavium, Inc + */ + +#include + +#include "otx_cryptodev.h" +#include "otx_cryptodev_ops.h" + +int +otx_cpt_dev_create(struct rte_cryptodev *c_dev) +{ + RTE_SET_USED(c_dev); + return 0; +} diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.h b/drivers/crypto/octeontx/otx_cryptodev_ops.h new file mode 100644 index 0000000..3f2d829 --- /dev/null +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018 Cavium, Inc + */ + +#ifndef _OTX_CRYPTODEV_OPS_H_ +#define _OTX_CRYPTODEV_OPS_H_ + +int +otx_cpt_dev_create(struct rte_cryptodev *c_dev); + +#endif /* _OTX_CRYPTODEV_OPS_H_ */ -- 2.7.4