DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] mempool/cnxk: fix bug in batch alloc issue failure path
@ 2022-02-10 11:52 Ashwin Sekhar T K
  2022-02-11  7:24 ` Jerin Jacob
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ashwin Sekhar T K @ 2022-02-10 11:52 UTC (permalink / raw)
  To: dev
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil

Fix bug in batch alloc issue failure path.

Fixes: 91531e63f4 ("mempool/cnxk: add cn10k batch dequeue")

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
---
 drivers/mempool/cnxk/cn10k_mempool_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c
index 4c669b878f..6ebbf91de5 100644
--- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
+++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
@@ -202,7 +202,7 @@ cn10k_mempool_deq(struct rte_mempool *mp, void **obj_table, unsigned int n)
 						    BATCH_ALLOC_SZ, 0, 1);
 		/* If issue fails, try falling back to default alloc */
 		if (unlikely(rc))
-			return cn10k_mempool_enq(mp, obj_table, n);
+			return cnxk_mempool_deq(mp, obj_table, n);
 		mem->status = BATCH_ALLOC_OP_ISSUED;
 	}
 
-- 
2.32.0


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

* Re: [PATCH] mempool/cnxk: fix bug in batch alloc issue failure path
  2022-02-10 11:52 [PATCH] mempool/cnxk: fix bug in batch alloc issue failure path Ashwin Sekhar T K
@ 2022-02-11  7:24 ` Jerin Jacob
  2022-02-18  6:40 ` [PATCH v2] " Ashwin Sekhar T K
  2022-02-18  7:27 ` [PATCH v3] " Ashwin Sekhar T K
  2 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2022-02-11  7:24 UTC (permalink / raw)
  To: Ashwin Sekhar T K
  Cc: dpdk-dev, Jerin Jacob, Sunil Kumar Kori,
	Satha Koteswara Rao Kottidi, Pavan Nikhilesh, Kiran Kumar K,
	Satheesh Paul, Anoob Joseph, Akhil Goyal

On Thu, Feb 10, 2022 at 5:19 PM Ashwin Sekhar T K <asekhar@marvell.com> wrote:
>
> Fix bug in batch alloc issue failure path.

Please specify what is the bug and what is the fix.

>
> Fixes: 91531e63f4 ("mempool/cnxk: add cn10k batch dequeue")
>
> Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
> ---
>  drivers/mempool/cnxk/cn10k_mempool_ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c
> index 4c669b878f..6ebbf91de5 100644
> --- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
> +++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
> @@ -202,7 +202,7 @@ cn10k_mempool_deq(struct rte_mempool *mp, void **obj_table, unsigned int n)
>                                                     BATCH_ALLOC_SZ, 0, 1);
>                 /* If issue fails, try falling back to default alloc */
>                 if (unlikely(rc))
> -                       return cn10k_mempool_enq(mp, obj_table, n);
> +                       return cnxk_mempool_deq(mp, obj_table, n);
>                 mem->status = BATCH_ALLOC_OP_ISSUED;
>         }
>
> --
> 2.32.0
>

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

* [PATCH v2] mempool/cnxk: fix bug in batch alloc issue failure path
  2022-02-10 11:52 [PATCH] mempool/cnxk: fix bug in batch alloc issue failure path Ashwin Sekhar T K
  2022-02-11  7:24 ` Jerin Jacob
@ 2022-02-18  6:40 ` Ashwin Sekhar T K
  2022-02-18  7:27 ` [PATCH v3] " Ashwin Sekhar T K
  2 siblings, 0 replies; 5+ messages in thread
From: Ashwin Sekhar T K @ 2022-02-18  6:40 UTC (permalink / raw)
  To: dev
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil

Fix bug in batch alloc issue failure path where it was
enqueing invalid pointers back to the pool. The code
should rightly be falling back to default dequeue path
in such cases.

Fixes: 91531e63f4 ("mempool/cnxk: add cn10k batch dequeue")

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
---
 drivers/mempool/cnxk/cn10k_mempool_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c
index 4c669b878f..6ebbf91de5 100644
--- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
+++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
@@ -202,7 +202,7 @@ cn10k_mempool_deq(struct rte_mempool *mp, void **obj_table, unsigned int n)
 						    BATCH_ALLOC_SZ, 0, 1);
 		/* If issue fails, try falling back to default alloc */
 		if (unlikely(rc))
-			return cn10k_mempool_enq(mp, obj_table, n);
+			return cnxk_mempool_deq(mp, obj_table, n);
 		mem->status = BATCH_ALLOC_OP_ISSUED;
 	}
 
-- 
2.32.0


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

* [PATCH v3] mempool/cnxk: fix bug in batch alloc issue failure path
  2022-02-10 11:52 [PATCH] mempool/cnxk: fix bug in batch alloc issue failure path Ashwin Sekhar T K
  2022-02-11  7:24 ` Jerin Jacob
  2022-02-18  6:40 ` [PATCH v2] " Ashwin Sekhar T K
@ 2022-02-18  7:27 ` Ashwin Sekhar T K
  2022-02-18  8:37   ` Jerin Jacob
  2 siblings, 1 reply; 5+ messages in thread
From: Ashwin Sekhar T K @ 2022-02-18  7:27 UTC (permalink / raw)
  To: dev
  Cc: jerinj, skori, skoteshwar, pbhagavatula, kirankumark, psatheesh,
	asekhar, anoobj, gakhil

Fix bug in batch alloc issue failure path where it was
enqueuing invalid pointers back to the pool. The code
should rightly be falling back to default dequeue path
in such cases.

Fixes: 91531e63f4 ("mempool/cnxk: add cn10k batch dequeue")

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
---
 drivers/mempool/cnxk/cn10k_mempool_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c
index 4c669b878f..6ebbf91de5 100644
--- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
+++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
@@ -202,7 +202,7 @@ cn10k_mempool_deq(struct rte_mempool *mp, void **obj_table, unsigned int n)
 						    BATCH_ALLOC_SZ, 0, 1);
 		/* If issue fails, try falling back to default alloc */
 		if (unlikely(rc))
-			return cn10k_mempool_enq(mp, obj_table, n);
+			return cnxk_mempool_deq(mp, obj_table, n);
 		mem->status = BATCH_ALLOC_OP_ISSUED;
 	}
 
-- 
2.32.0


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

* Re: [PATCH v3] mempool/cnxk: fix bug in batch alloc issue failure path
  2022-02-18  7:27 ` [PATCH v3] " Ashwin Sekhar T K
@ 2022-02-18  8:37   ` Jerin Jacob
  0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2022-02-18  8:37 UTC (permalink / raw)
  To: Ashwin Sekhar T K, Ferruh Yigit
  Cc: dpdk-dev, Jerin Jacob, Sunil Kumar Kori,
	Satha Koteswara Rao Kottidi, Pavan Nikhilesh, Kiran Kumar K,
	Satheesh Paul, Anoob Joseph, Akhil Goyal

On Fri, Feb 18, 2022 at 12:54 PM Ashwin Sekhar T K <asekhar@marvell.com> wrote:
>
> Fix bug in batch alloc issue failure path where it was
> enqueuing invalid pointers back to the pool. The code
> should rightly be falling back to default dequeue path
> in such cases.
>
> Fixes: 91531e63f4 ("mempool/cnxk: add cn10k batch dequeue")
Cc: stable@dpdk.org


>
> Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
> ---

Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks

>  drivers/mempool/cnxk/cn10k_mempool_ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c
> index 4c669b878f..6ebbf91de5 100644
> --- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
> +++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
> @@ -202,7 +202,7 @@ cn10k_mempool_deq(struct rte_mempool *mp, void **obj_table, unsigned int n)
>                                                     BATCH_ALLOC_SZ, 0, 1);
>                 /* If issue fails, try falling back to default alloc */
>                 if (unlikely(rc))
> -                       return cn10k_mempool_enq(mp, obj_table, n);
> +                       return cnxk_mempool_deq(mp, obj_table, n);
>                 mem->status = BATCH_ALLOC_OP_ISSUED;
>         }
>
> --
> 2.32.0
>

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

end of thread, other threads:[~2022-02-18  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 11:52 [PATCH] mempool/cnxk: fix bug in batch alloc issue failure path Ashwin Sekhar T K
2022-02-11  7:24 ` Jerin Jacob
2022-02-18  6:40 ` [PATCH v2] " Ashwin Sekhar T K
2022-02-18  7:27 ` [PATCH v3] " Ashwin Sekhar T K
2022-02-18  8:37   ` Jerin Jacob

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).