[dpdk-dev] [PATCH v2 2/4] cryptodev: move initialization
Jan Blunck
jblunck at infradead.org
Wed Jul 12 21:58:44 CEST 2017
Signed-off-by: Jan Blunck <jblunck at infradead.org>
---
lib/librte_cryptodev/rte_cryptodev.c | 3 +++
lib/librte_cryptodev/rte_cryptodev_pmd.c | 6 ------
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 8ee5d47a9..09e4671be 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -587,6 +587,9 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id)
cryptodev->data->socket_id = socket_id;
cryptodev->data->dev_started = 0;
+ /* init user callbacks */
+ TAILQ_INIT(&(cryptodev->link_intr_cbs));
+
cryptodev->attached = RTE_CRYPTODEV_ATTACHED;
cryptodev_globals.nb_devs++;
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index a57faadcf..ec6eeffa1 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -101,9 +101,6 @@ rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
cryptodev->device = &vdev->device;
- /* initialise user call-back tail queue */
- TAILQ_INIT(&(cryptodev->link_intr_cbs));
-
return cryptodev;
}
@@ -188,9 +185,6 @@ rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,
cryptodev->device = &pci_dev->device;
- /* init user callbacks */
- TAILQ_INIT(&(cryptodev->link_intr_cbs));
-
/* Invoke PMD device initialization function */
RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);
retval = dev_init(cryptodev);
--
2.13.2
More information about the dev
mailing list