DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/aesni_mb: fix queue pair free
@ 2018-10-16  9:45 Fan Zhang
  2018-11-12 12:50 ` Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Fan Zhang @ 2018-10-16  9:45 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, stable

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 <roy.fan.zhang@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

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 43f6c26ed..f3eff2685 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;
-- 
2.13.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/aesni_mb: fix queue pair free
  2018-10-16  9:45 [dpdk-dev] [PATCH] crypto/aesni_mb: fix queue pair free Fan Zhang
@ 2018-11-12 12:50 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2018-11-12 12:50 UTC (permalink / raw)
  To: Fan Zhang, dev; +Cc: stable



On 10/16/2018 3:15 PM, Fan Zhang wrote:
> 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 <roy.fan.zhang@intel.com>
> ---
>   drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
>
> 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 43f6c26ed..f3eff2685 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;
Applied to dpdk-next-crypto
Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-12 12:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16  9:45 [dpdk-dev] [PATCH] crypto/aesni_mb: fix queue pair free Fan Zhang
2018-11-12 12:50 ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).