From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: [PATCH v3 2/4] cryptodev: move initialization Date: Fri, 6 Oct 2017 10:39:32 +0200 Message-ID: <20171006083934.34819-3-jblunck@infradead.org> References: <20171006083934.34819-1-jblunck@infradead.org> Cc: declan.doherty@intel.com, pablo.de.lara.guarch@intel.com To: dev@dpdk.org Return-path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id EE9F71B294 for ; Fri, 6 Oct 2017 10:40:17 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id 131so4597671wmk.3 for ; Fri, 06 Oct 2017 01:40:17 -0700 (PDT) In-Reply-To: <20171006083934.34819-1-jblunck@infradead.org> In-Reply-To: <20170712195846.65286-1-jblunck@infradead.org> References: <20170712195846.65286-1-jblunck@infradead.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Jan Blunck --- 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