Signed-off-by: Jan Blunck <jblu...@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 327d7e846..5e8f7f4fe 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -583,6 +583,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