From: Fan Zhang Date: Tue, 16 Oct 2018 09:45:54 +0000 (+0100) Subject: crypto/aesni_mb: fix queue pair free X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1fd1aa0c91bf138a4e7f6f7ce60c8d850da73564;p=dpdk.git crypto/aesni_mb: fix queue pair free This patch fixes the queue pair free for AESNI-MB PMD. Originally the queue pair ring name are different than the object name, caused the aesni_mb_pmd_qp_release() cannot find the ring to release. This patch uses the same name between queue pair object name and ring name. Fixes: a831c318c54d ("crypto/aesni_mb: free ring memory on queue release") Cc: stable@dpdk.org Signed-off-by: Fan Zhang --- diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c index 43f6c26edf..f3eff2685f 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c @@ -535,14 +535,12 @@ aesni_mb_pmd_qp_set_unique_name(struct rte_cryptodev *dev, /** Create a ring to place processed operations on */ static struct rte_ring * aesni_mb_pmd_qp_create_processed_ops_ring(struct aesni_mb_qp *qp, - const char *str, unsigned int ring_size, int socket_id) + unsigned int ring_size, int socket_id) { struct rte_ring *r; char ring_name[RTE_CRYPTODEV_NAME_MAX_LEN]; - unsigned int n = snprintf(ring_name, sizeof(ring_name), - "%s_%s", - qp->name, str); + unsigned int n = snprintf(ring_name, sizeof(ring_name), "%s", qp->name); if (n >= sizeof(ring_name)) return NULL; @@ -600,7 +598,7 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, qp->op_fns = &job_ops[internals->vector_mode]; qp->ingress_queue = aesni_mb_pmd_qp_create_processed_ops_ring(qp, - "ingress", qp_conf->nb_descriptors, socket_id); + qp_conf->nb_descriptors, socket_id); if (qp->ingress_queue == NULL) { ret = -1; goto qp_setup_cleanup;