cryptodev: replace bus specific struct with generic dev
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 5 Jul 2018 02:07:50 +0000 (03:07 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 10 Jul 2018 22:57:51 +0000 (00:57 +0200)
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 <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
doc/guides/prog_guide/cryptodev_lib.rst
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_18_08.rst
drivers/crypto/qat/qat_sym_pmd.c
drivers/crypto/virtio/virtio_cryptodev.c
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_cryptodev/rte_cryptodev.h

index 30f0bcf..d02bb75 100644 (file)
@@ -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;
 
index 8df41cb..a96ce5f 100644 (file)
@@ -85,8 +85,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
index 9431634..0304b80 100644 (file)
@@ -82,6 +82,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``.
+
 * compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
   replaced with the following more explicit flags:
   - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
@@ -146,7 +149,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
index 1156390..0bc042a 100644 (file)
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
                info->capabilities = internals->qat_dev_capabilities;
                info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
                info->driver_id = cryptodev_qat_driver_id;
-               info->pci_dev = RTE_DEV_TO_PCI(dev->device);
        }
 }
 
index f9c890b..4f170cf 100644 (file)
@@ -1415,7 +1415,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 =
index 7e58212..457ac56 100644 (file)
@@ -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;
 }
 
 
index ccc0f73..6b5f32b 100644 (file)
@@ -334,9 +334,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
 
 /**  Crypto device information */
 struct rte_cryptodev_info {
-       const char *driver_name;                /**< Driver name. */
-       uint8_t driver_id;                      /**< Driver identifier */
-       struct rte_pci_device *pci_dev;         /**< PCI information. */
+       const char *driver_name;        /**< Driver name. */
+       uint8_t driver_id;              /**< Driver identifier */
+       struct rte_device *device;      /**< Generic device information. */
 
        uint64_t feature_flags;
        /**< Feature flags exposes HW/SW features for the given device */