From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0063.outbound.protection.outlook.com [104.47.42.63]) by dpdk.org (Postfix) with ESMTP id 31D51F60C for ; Thu, 19 Jan 2017 14:24:15 +0100 (CET) Received: from CY1PR03CA0023.namprd03.prod.outlook.com (10.174.128.33) by DM2PR0301MB0751.namprd03.prod.outlook.com (10.160.97.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Thu, 19 Jan 2017 13:24:13 +0000 Received: from BN1AFFO11FD007.protection.gbl (2a01:111:f400:7c10::192) by CY1PR03CA0023.outlook.office365.com (2603:10b6:600::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13 via Frontend Transport; Thu, 19 Jan 2017 13:24:13 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD007.mail.protection.outlook.com (10.58.52.67) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Thu, 19 Jan 2017 13:24:12 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v0JDO4eb015351; Thu, 19 Jan 2017 06:24:09 -0700 From: Hemant Agrawal To: CC: , , , , , , Hemant Agrawal Date: Thu, 19 Jan 2017 18:53:26 +0530 Message-ID: <1484832240-2048-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> References: <1484679174-4174-1-git-send-email-hemant.agrawal@nxp.com> <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131293058526478747; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39850400002)(39400400002)(39860400002)(39380400002)(39410400002)(39840400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(110136003)(86362001)(5660300001)(5890100001)(4326007)(305945005)(33646002)(6916009)(2950100002)(6666003)(106466001)(2351001)(356003)(626004)(2906002)(92566002)(104016004)(85426001)(5003940100001)(50226002)(47776003)(8676002)(81166006)(81156014)(50986999)(50466002)(76176999)(97736004)(8936002)(77096006)(53936002)(54906002)(189998001)(68736007)(105606002)(8656002)(48376002)(36756003)(38730400001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0751; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD007; 1:bqVNdy+ypbUIQ2VSnuBWIgf5k/2cv4YE91tcva3lqAPceY7GX9YRBH8iDOqAu52BHdTzdwYIizQYUOkEm2kTUfz9uIJFVgDxDFNOQiuYCKSufnCVYJSmDYzW1IDqEHxh9VRPl6LVBHeVpVvsdJbPC1jd2JumJlxbkWO9nOa02+hcbiIbQoc3q8WH5o7NY8IOyUbI2CzniQn7c1TK0vR3IfQhNOR7GU+B0TJ/qZrSsSNY3EglGjZbXS/Vcg0CnVNMr8PkpkZQnzwv2Rji8C8jepzAJ6HhGsnsw6pAoW0ImDBincC4ZWSE8hWd8UPYXBzJZes+OHkilD8D/0FNlZNNUfq/PlVtZ5zs3c12UlHKIBAJj2vr45TsLTZF3O+Q/O8Jo3fJ/COi5k9s7WybEGGq+a+ehfxowmF5C2rWr68ByTMfQPV7h4iGS/pfD3mLjZySKokiANeMXDNGSq1PnmC3kiD2sbY8fwpCbbLSRDC6KkH/j12qGYgyk81Dp5Axq7khvC7x9uBgDaSr91WePf8TYvRoW11ivSc2KkxbM/itKmAW179KIBGFhTdHSCdRyZ7cN3kMR4XY3xrscUGlKJID7JFuWuRXqrNJ0bZeeYwH3op7UZYe/QM4mUWdvMx7LsuI//j3zDV8jDWPdQTVoN2ghwI0g6M0NnTvcOS9bu9STuGsY2NZe6Li3f3U3ExBSnURsN4TfNrLcku0Xiratz4C85GiFavVbmr1UqVHS3qst21WfKoK7BYNUu1eJ1RBq7f4 MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 2dc36e0c-d6b3-4c85-a03c-08d4406e7566 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM2PR0301MB0751; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 3:Hjcsjkhfv3pYtTjGJWAWYz3UmLfZ8Hjj7m/Fb8ZuwSRko6QWoWYFwuOW5GJXCSaejEjJXTPHkfMZ9hBjvCOodFPPYqiMrCGhFX+a8whfem/Z470UFMynS7CPQPYMBqvB1RX3Ue16JQdieB/7opWXOEjEYsxn1XLD6h3n2rRh7byT0GBj1Q4XEsHqu3ZP74RtSWFCP4frJdArKqnQkij9nEvfRMTG14FLXK/i7hOFJ1CwMA9aExC940rq2HftWZvwL5wqr2ONZJEPlemreL++GTSRW5ExnD5vTQRSLDsW9cMa/17bYOsCzNYJWNITmhGZl9VBxmyvmB7MtuGZodkLhKs+HbKvhLqXB7IINu48iVh1TTJGZNBsEz4gGNsxzLj2 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 25:bA1uhNjk7KHMWGKMhO7a/efsd27kBY9tCzHv2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ispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(5005006)(13018025)(13015025)(13017025)(13023025)(13024025)(10201501046)(3002001)(6055026)(6096035)(20161123559025)(20161123561025)(20161123556025)(20161123563025)(20161123565025); SRVR:DM2PR0301MB0751; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0751; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 4:t3gQu5gg2jsG7SmyHlFXyx+xSuykXAj4sKLTOVOHdL4ZIOpBTnQnJ1/1l/tTk3Hl3qf/cEaTd3NKXeg6hgPo09iwrxzsYrNVG2Uegklt78xMJJmgSXDqi3aPbOT716LC5+tjXQ88R1k4koFjW8jEKMEikTsc9u8AXpAIkttCVbKgXdqNFSaWsG5WsXwfBfboaRNTMdvKxSkSOqBbrSlGDS1vCbwbU/0Abpmto3qldLb7PP0njQz9VLMAkMGLGlwlsI0jAnRZ3qvYZq320M7uphFWmyPADMYmLDtCplpGlP+eOgeQe4yLuVOKLPwntVYzruIIUWPo3b7p83iAwuiFIvDy3jW7cA6VbYjGXRjYd2+YdIoM0ZFNAbdqcoKiZQzAwIKsASYSBCZt38/RxlNTtM9kwMwC4DwUD4fmG1aDDYOmDUZ+ylhhDDEYmahVWPnCvGhclpDPveI14utkVLwUqEBCGYiG+liu2UffL35/whX6nWIOnSeDH8ZiAinseQRX754mW3Skr6kpR1F1zlvU91cNOfZG9AV3MSnhD6XrTG3rH/tklAaW6BCCG07UJ+NTMWKkM6Rp8Z0aoZG7es2tOeaxufbmxxkoedvOWkemcNomCvDG+6aGjMNSHN1CaDFp/S8RhHarSAnIp6Lkc7B3XGFNYAmj5OtcqqJqmKa2s+BPEGdKMjuGZC+BHvudVWEKc6qMnbs2wQxhXljmxX0B0l2bK/NVYw1rC+oH/ukYuHiJu8muPRKlvoyf30JHHKRS X-Forefront-PRVS: 0192E812EC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0751; 23:rHlwPQKqbgmTWWg50f20vVencmsRA0yCQGTMoje?= =?us-ascii?Q?8qJje2ayOCChMuzGocv6gF/Ocq5862oebubTitX154vaFmT1N2M9i5Y+kolv?= =?us-ascii?Q?jZm8hUyjtAG8nQJZN7HDR74G+LEpHyAHGiZTKhkR1XJsjmFWGkNvNtj7RT3N?= =?us-ascii?Q?eEcothNECix831/kJosymfLVBvgECVuicr8oL8nC1SfKN0c7xunHWlvD5mEu?= =?us-ascii?Q?Mh4DlCUusGYu+N9aH/8iPtCmwKPYxb+KFUqZ9+vv2PohjFpAXmKTc+X6woHV?= =?us-ascii?Q?hS8JkF3i6nvJk/hgDuTIulA1wqhlaHR2UffqUMg3BaiiN/mqWAiwhTCR/06X?= =?us-ascii?Q?zOLu2mHAtnNXvF8KPMNZorLfZxt1XDrhXZj59GNw0L6Tn/gJjfqVwz7OdcAa?= =?us-ascii?Q?a2AQR46p+xKZxLoI0LTxsAE8Abrn92yXmYd+BZ4LZfyaUaX3uOzM9F5bcxNo?= =?us-ascii?Q?cJoKGu3S4qWrMVvTiCvEY67RSiVmcdgiCYsa2wVIffFJQ8xXWsoqc8Mq66r8?= =?us-ascii?Q?2EiD75rPU9fkNxl4BhItfRvV6bXkhbfL+QiQu4NLwUthIOs4XvNnsfK7uW3l?= =?us-ascii?Q?0Jx5DZ3+AS+LAf1PqQXLZeH4cxicwYP6tKJd+ejQQasUX434qdnZclqwzbs1?= =?us-ascii?Q?JI7XPvgaVjkWbRL1o7US/Bz2hEDFR2vakhAnBLhFRF/JTINtbWjYaTM+agTu?= =?us-ascii?Q?jtLR7LnUDAhrag5Y9G8uKKmwj7KUfKxyb7bkOsbwLd7zRvYYgT/3ec4g1VTn?= =?us-ascii?Q?RZqmy6cKWgWqt3LGk3Az02d5R2FCDFoPRthJbXjG6hdj4ybKkVqTQ4R+NtCb?= =?us-ascii?Q?emY3Vsz23ZKB0LAFM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WDPUrQmzziAraDWB5/cr5V+XTX6; 5:fCwebuNbFEQcjFiNVos9BKl7b/iXQxq556XKWsnsg7yjrZ534EydPXkQXIuO4n2HuOMnD+OVLYiSlVgEvxm6kvOP6aI3fbtF3pT4dk9EdVSi13PdVhhq/qPncYzGn8HWGggXT/D/LmovS6PuTikLTqz9SjbD7xf0f1vzVchjF7pd9Aei7BBlQVqlQnw4xrRm; 24:uQefPzutD8PC3ygflC/CQBy2q91IUkqawWKOlmAmEC/nE/RkooP4MOyEaQ7FX0yuFNmZXuGt0KvSjzBpabX6kx4gAVnuP+OVkRrJinfXz38= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 7:tDtfsfzFE3xJrxPn1+b0josbfuXB/neTC7IRBB4s76x2GjJLdRKUjK3T/6r6oRVOXi5dHXNHNMf0iQKNocxx1whWDoOpnGAjR//9swG5lM6Ng7B6XKu4Hw0+xOhqEMnBjbTKpc6Mfq6iJ5HtQIIXyAq4IbDNEMIvlB2vbSWF0rENs2tVuj+vrls5omSy4WA74hfXmrkm4OhkmO2kl7ECjMr2AuxM/HHo4phj9/OCwvnNHrLLdTXzKzXodRvlKzjKNHTQjSyO46VgxhzKdnCJPwpAuCpkLz+GiHXk0MXUqlMapmJ9//LK4YlCEN0pM2OERx3qAREzEwYpT9UPcsBsu9DIid8BlGsqld9sCB1TDUyaGs1uTr6yAtvOuWEqnuzuxBwnO5+ttH1vVFGd3uw51QbdPD5TrVgko6Z+F83LnhDm5oXfivDQCyDJJpykNu3hf4Iba6iOqMvPotLJa93D4Q== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2017 13:24:12.4450 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0751 Subject: [dpdk-dev] [PATCH] cryptodev: decouple from PCI device 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, 19 Jan 2017 13:24:15 -0000 This makes struct rte_cryptodev independent of struct rte_pci_device by replacing it with a pointer to the generic struct rte_device. This is inline with the recent changes in ethdev Signed-off-by: Hemant Agrawal --- drivers/crypto/qat/qat_qp.c | 12 +++++++++--- drivers/crypto/qat/rte_qat_cryptodev.c | 6 +++--- lib/librte_cryptodev/rte_cryptodev.c | 6 +++--- lib/librte_cryptodev/rte_cryptodev.h | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/crypto/qat/qat_qp.c b/drivers/crypto/qat/qat_qp.c index 2e7188b..07e63fc 100644 --- a/drivers/crypto/qat/qat_qp.c +++ b/drivers/crypto/qat/qat_qp.c @@ -135,6 +135,7 @@ int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id, int socket_id) { struct qat_qp *qp; + struct rte_pci_device *pci_dev; int ret; PMD_INIT_FUNC_TRACE(); @@ -153,7 +154,9 @@ int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id, return -EINVAL; } - if (dev->pci_dev->mem_resource[0].addr == NULL) { + pci_dev = RTE_DEV_TO_PCI(dev->device); + + if (pci_dev->mem_resource[0].addr == NULL) { PMD_DRV_LOG(ERR, "Could not find VF config space " "(UIO driver attached?)."); return -EINVAL; @@ -174,7 +177,7 @@ int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id, PMD_DRV_LOG(ERR, "Failed to alloc mem for qp struct"); return -ENOMEM; } - qp->mmap_bar_addr = dev->pci_dev->mem_resource[0].addr; + qp->mmap_bar_addr = pci_dev->mem_resource[0].addr; rte_atomic16_init(&qp->inflights16); if (qat_tx_queue_create(dev, &(qp->tx_q), @@ -289,6 +292,7 @@ static void qat_queue_delete(struct qat_queue *queue) void *io_addr; const struct rte_memzone *qp_mz; uint32_t queue_size_bytes = nb_desc*desc_size; + struct rte_pci_device *pci_dev; PMD_INIT_FUNC_TRACE(); if (desc_size > ADF_MSG_SIZE_TO_BYTES(ADF_MAX_MSG_SIZE)) { @@ -349,7 +353,9 @@ static void qat_queue_delete(struct qat_queue *queue) queue_base = BUILD_RING_BASE_ADDR(queue->base_phys_addr, queue->queue_size); - io_addr = dev->pci_dev->mem_resource[0].addr; + pci_dev = RTE_DEV_TO_PCI(dev->device); + + io_addr = pci_dev->mem_resource[0].addr; WRITE_CSR_RING_BASE(io_addr, queue->hw_bundle_number, queue->hw_queue_number, queue_base); diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c index 1e7ee61..840d828 100644 --- a/drivers/crypto/qat/rte_qat_cryptodev.c +++ b/drivers/crypto/qat/rte_qat_cryptodev.c @@ -88,9 +88,9 @@ PMD_INIT_FUNC_TRACE(); PMD_DRV_LOG(DEBUG, "Found crypto device at %02x:%02x.%x", - cryptodev->pci_dev->addr.bus, - cryptodev->pci_dev->addr.devid, - cryptodev->pci_dev->addr.function); + RTE_DEV_TO_PCI(cryptodev->device)->addr.bus, + RTE_DEV_TO_PCI(cryptodev->device)->addr.devid, + RTE_DEV_TO_PCI(cryptodev->device)->addr.function); cryptodev->dev_type = RTE_CRYPTODEV_QAT_SYM_PMD; cryptodev->dev_ops = &crypto_qat_ops; diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 127e8d0..8402b6a 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -446,7 +446,7 @@ struct rte_cryptodev * "device data"); } - cryptodev->pci_dev = pci_dev; + cryptodev->device = &pci_dev->device; cryptodev->driver = cryptodrv; /* init user callbacks */ @@ -506,7 +506,7 @@ struct rte_cryptodev * if (rte_eal_process_type() == RTE_PROC_PRIMARY) rte_free(cryptodev->data->dev_private); - cryptodev->pci_dev = NULL; + cryptodev->device = NULL; cryptodev->driver = NULL; cryptodev->data = NULL; @@ -867,7 +867,7 @@ struct rte_cryptodev * RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get); (*dev->dev_ops->dev_infos_get)(dev, dev_info); - dev_info->pci_dev = dev->pci_dev; + dev_info->pci_dev = RTE_DEV_TO_PCI(dev->device); if (dev->driver) dev_info->driver_name = dev->driver->pci_drv.driver.name; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 8f63e8f..ef072d2 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -621,8 +621,8 @@ struct rte_cryptodev { /**< Functions exported by PMD */ uint64_t feature_flags; /**< Supported features */ - struct rte_pci_device *pci_dev; - /**< PCI info. supplied by probing */ + struct rte_device *device; + /**< Backing device */ enum rte_cryptodev_type dev_type; /**< Crypto device type */ -- 1.9.1