From patchwork Fri Jun 8 22:02:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "De Lara Guarch, Pablo" X-Patchwork-Id: 40959 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E9541CD9F; Sat, 9 Jun 2018 00:02:21 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C4AE31CD9F for ; Sat, 9 Jun 2018 00:02:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2018 15:02:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,491,1520924400"; d="scan'208";a="61618409" Received: from silpixa00399464.ir.intel.com (HELO silpixa00399464.ger.corp.intel.com) ([10.237.222.157]) by fmsmga004.fm.intel.com with ESMTP; 08 Jun 2018 15:02:14 -0700 From: Pablo de Lara To: declan.doherty@intel.com, akhil.goyal@nxp.com, ravi1.kumar@amd.com, jerin.jacob@caviumnetworks.com, roy.fan.zhang@intel.com, fiona.trahe@intel.com, tdu@semihalf.com, jianjay.zhou@huawei.com Cc: dev@dpdk.org, Pablo de Lara Date: Fri, 8 Jun 2018 23:02:29 +0100 Message-Id: <20180608220234.10170-2-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180608220234.10170-1-pablo.de.lara.guarch@intel.com> References: <20180608220234.10170-1-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Structure rte_cryptodev_info has currently PCI device information ("struct rte_pci_device") in it. This information is not generic to all devices, so this gets replaced with the generic "rte_device" structure, compatible with all crypto devices. Signed-off-by: Pablo de Lara Acked-by: Akhil Goyal --- doc/guides/prog_guide/cryptodev_lib.rst | 2 +- doc/guides/rel_notes/deprecation.rst | 2 -- doc/guides/rel_notes/release_18_08.rst | 5 ++++- drivers/crypto/qat/qat_crypto.c | 1 - drivers/crypto/virtio/virtio_cryptodev.c | 1 - lib/librte_cryptodev/rte_cryptodev.c | 1 + lib/librte_cryptodev/rte_cryptodev.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst index 30f0bcf7a..d02bb7514 100644 --- a/doc/guides/prog_guide/cryptodev_lib.rst +++ b/doc/guides/prog_guide/cryptodev_lib.rst @@ -269,7 +269,7 @@ relevant information for the device. struct rte_cryptodev_info { const char *driver_name; uint8_t driver_id; - struct rte_pci_device *pci_dev; + struct rte_device *device; uint64_t feature_flags; diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 1ce692eac..b71080bb8 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -104,8 +104,6 @@ Deprecation Notices - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure, containing fields not relevant anymore since the session mempool is not internal in the crypto device anymore. - - Replacement of ``pci_dev`` field with the more generic ``rte_device`` - structure. - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from 18.05 and removed in 18.08, as there are no drivers doing anything useful diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index 5bc23c537..ba710e845 100644 --- a/doc/guides/rel_notes/release_18_08.rst +++ b/doc/guides/rel_notes/release_18_08.rst @@ -55,6 +55,9 @@ API Changes Also, make sure to start the actual text at the margin. ========================================================= +* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev`` + has been replaced with field ``struct rte_device *device``. + ABI Changes ----------- @@ -113,7 +116,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_cmdline.so.2 librte_common_octeontx.so.1 librte_compressdev.so.1 - librte_cryptodev.so.4 + + librte_cryptodev.so.5 librte_distributor.so.1 librte_eal.so.7 librte_ethdev.so.9 diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c index d9ce2a136..768dcbae0 100644 --- a/drivers/crypto/qat/qat_crypto.c +++ b/drivers/crypto/qat/qat_crypto.c @@ -1656,7 +1656,6 @@ void qat_dev_info_get(struct rte_cryptodev *dev, info->capabilities = internals->qat_dev_capabilities; info->sym.max_nb_sessions = internals->max_nb_sessions; info->driver_id = cryptodev_qat_driver_id; - info->pci_dev = RTE_DEV_TO_PCI(dev->device); } } diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c index df88953f6..482edea1a 100644 --- a/drivers/crypto/virtio/virtio_cryptodev.c +++ b/drivers/crypto/virtio/virtio_cryptodev.c @@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev, if (info != NULL) { info->driver_id = cryptodev_virtio_driver_id; - info->pci_dev = RTE_DEV_TO_PCI(dev->device); info->feature_flags = dev->feature_flags; info->max_nb_queue_pairs = hw->max_dataqueues; info->sym.max_nb_sessions = diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 7e5821246..457ac5670 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info) (*dev->dev_ops->dev_infos_get)(dev, dev_info); dev_info->driver_name = dev->device->driver->name; + dev_info->device = dev->device; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 92ce6d49a..80cd6b474 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -371,7 +371,7 @@ rte_cryptodev_get_feature_name(uint64_t flag); struct rte_cryptodev_info { const char *driver_name; /**< Driver name. */ uint8_t driver_id; /**< Driver identifier */ - struct rte_pci_device *pci_dev; /**< PCI information. */ + struct rte_device *device; /**< Generic device information. */ uint64_t feature_flags; /**< Feature flags exposes HW/SW features for the given device */