DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] event/cnxk: fix missing mempool cookie marking
@ 2022-11-03 16:16 pbhagavatula
  2022-11-07 17:26 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: pbhagavatula @ 2022-11-03 16:16 UTC (permalink / raw)
  To: jerinj, Pavan Nikhilesh, Shijith Thotton; +Cc: dev

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Mark chunks mempool objects as "put" as they are freed to NPA
automatically when they are parsed by TIM HW.

Fixes: 300b796262a1 ("event/cnxk: add timer arm routine")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/cnxk/cnxk_tim_worker.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/event/cnxk/cnxk_tim_worker.h b/drivers/event/cnxk/cnxk_tim_worker.h
index 8d8ed1d3a1..eda84c6f31 100644
--- a/drivers/event/cnxk/cnxk_tim_worker.h
+++ b/drivers/event/cnxk/cnxk_tim_worker.h
@@ -217,6 +217,7 @@ cnxk_tim_insert_chunk(struct cnxk_tim_bkt *const bkt,
 	if (unlikely(rte_mempool_get(tim_ring->chunk_pool, (void **)&chunk)))
 		return NULL;
 
+	RTE_MEMPOOL_CHECK_COOKIES(tim_ring->chunk_pool, (void **)&chunk, 1, 0);
 	*(uint64_t *)(chunk + tim_ring->nb_chunk_slots) = 0;
 	if (bkt->nb_entry) {
 		*(uint64_t *)(((struct cnxk_tim_ent *)(uintptr_t)
-- 
2.25.1


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

* Re: [PATCH] event/cnxk: fix missing mempool cookie marking
  2022-11-03 16:16 [PATCH] event/cnxk: fix missing mempool cookie marking pbhagavatula
@ 2022-11-07 17:26 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2022-11-07 17:26 UTC (permalink / raw)
  To: pbhagavatula; +Cc: jerinj, Shijith Thotton, dev

On Thu, Nov 3, 2022 at 9:46 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Mark chunks mempool objects as "put" as they are freed to NPA
> automatically when they are parsed by TIM HW.
>
> Fixes: 300b796262a1 ("event/cnxk: add timer arm routine")
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Applied to dpdk-next-net-eventdev/for-main. Thanks


> ---
>  drivers/event/cnxk/cnxk_tim_worker.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/event/cnxk/cnxk_tim_worker.h b/drivers/event/cnxk/cnxk_tim_worker.h
> index 8d8ed1d3a1..eda84c6f31 100644
> --- a/drivers/event/cnxk/cnxk_tim_worker.h
> +++ b/drivers/event/cnxk/cnxk_tim_worker.h
> @@ -217,6 +217,7 @@ cnxk_tim_insert_chunk(struct cnxk_tim_bkt *const bkt,
>         if (unlikely(rte_mempool_get(tim_ring->chunk_pool, (void **)&chunk)))
>                 return NULL;
>
> +       RTE_MEMPOOL_CHECK_COOKIES(tim_ring->chunk_pool, (void **)&chunk, 1, 0);
>         *(uint64_t *)(chunk + tim_ring->nb_chunk_slots) = 0;
>         if (bkt->nb_entry) {
>                 *(uint64_t *)(((struct cnxk_tim_ent *)(uintptr_t)
> --
> 2.25.1
>

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

end of thread, other threads:[~2022-11-07 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 16:16 [PATCH] event/cnxk: fix missing mempool cookie marking pbhagavatula
2022-11-07 17:26 ` 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).