event/cnxk: fix missing mempool cookie marking
Checks
Commit Message
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(+)
Comments
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
>
@@ -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)