From 933270eafd095540ae0e948ae9f62a05d0f9d9c1 Mon Sep 17 00:00:00 2001 From: paul luse Date: Tue, 23 Apr 2019 19:07:13 -0400 Subject: [PATCH] bdev/crypto: add new uninit call needed for dpdk 19.02 This patch won't fix issues related to the need for the latest ipsec with 19.02 but it is needed for that patch to pass. Change-Id: I8e2d984d85b355d88edfb9c90c159c8aa0a5362d Signed-off-by: paul luse Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451788 Reviewed-by: Jim Harris Reviewed-by: Ben Walker Tested-by: SPDK CI Jenkins --- lib/bdev/crypto/vbdev_crypto.c | 6 +++++- test/unit/lib/bdev/crypto.c/crypto_ut.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/bdev/crypto/vbdev_crypto.c b/lib/bdev/crypto/vbdev_crypto.c index 8ffed5424c..39b3e88c04 100644 --- a/lib/bdev/crypto/vbdev_crypto.c +++ b/lib/bdev/crypto/vbdev_crypto.c @@ -1345,6 +1345,7 @@ vbdev_crypto_finish(void) struct vbdev_dev *device; struct device_qp *dev_qp; unsigned i; + int rc; while ((name = TAILQ_FIRST(&g_bdev_names))) { TAILQ_REMOVE(&g_bdev_names, name, link); @@ -1369,9 +1370,12 @@ vbdev_crypto_finish(void) rte_dev->dev_ops->queue_pair_release(rte_dev, i); } } - free(device); } + rc = rte_vdev_uninit(AESNI_MB); + if (rc) { + SPDK_ERRLOG("%d from rte_vdev_uninit\n", rc); + } while ((dev_qp = TAILQ_FIRST(&g_device_qp))) { TAILQ_REMOVE(&g_device_qp, dev_qp, link); diff --git a/test/unit/lib/bdev/crypto.c/crypto_ut.c b/test/unit/lib/bdev/crypto.c/crypto_ut.c index fdf8d8de40..792fb38d7e 100644 --- a/test/unit/lib/bdev/crypto.c/crypto_ut.c +++ b/test/unit/lib/bdev/crypto.c/crypto_ut.c @@ -202,6 +202,7 @@ DEFINE_STUB(rte_cryptodev_sym_session_init, int, (uint8_t dev_id, struct rte_crypto_sym_xform *xforms, struct rte_mempool *mempool), 0); DEFINE_STUB(rte_vdev_init, int, (const char *name, const char *args), 0); DEFINE_STUB(rte_cryptodev_sym_session_free, int, (struct rte_cryptodev_sym_session *sess), 0); +DEFINE_STUB(rte_vdev_uninit, int, (const char *name), 0); struct rte_cryptodev *rte_cryptodevs;