event/octeontx2: relax memory requirement for timers
Relax memory requirement for event timers when internal mempool used is octeontx2 mempool. Add debug log to print the memory used. Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
This commit is contained in:
parent
2805784266
commit
b88632f9fd
@ -327,7 +327,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr)
|
|||||||
tim_optimze_bkt_param(tim_ring);
|
tim_optimze_bkt_param(tim_ring);
|
||||||
}
|
}
|
||||||
|
|
||||||
tim_ring->nb_chunks = tim_ring->nb_chunks * tim_ring->nb_bkts;
|
if (tim_ring->disable_npa)
|
||||||
|
tim_ring->nb_chunks = tim_ring->nb_chunks * tim_ring->nb_bkts;
|
||||||
|
else
|
||||||
|
tim_ring->nb_chunks = tim_ring->nb_chunks + tim_ring->nb_bkts;
|
||||||
|
|
||||||
/* Create buckets. */
|
/* Create buckets. */
|
||||||
tim_ring->bkt = rte_zmalloc("otx2_tim_bucket", (tim_ring->nb_bkts) *
|
tim_ring->bkt = rte_zmalloc("otx2_tim_bucket", (tim_ring->nb_bkts) *
|
||||||
sizeof(struct otx2_tim_bkt),
|
sizeof(struct otx2_tim_bkt),
|
||||||
@ -376,6 +380,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr)
|
|||||||
RTE_EVENT_TYPE_TIMER);
|
RTE_EVENT_TYPE_TIMER);
|
||||||
sso_xae_reconfigure(dev->event_dev);
|
sso_xae_reconfigure(dev->event_dev);
|
||||||
|
|
||||||
|
otx2_tim_dbg("Total memory used %"PRIu64"MB\n",
|
||||||
|
(uint64_t)(((tim_ring->nb_chunks * tim_ring->chunk_sz)
|
||||||
|
+ (tim_ring->nb_bkts * sizeof(struct otx2_tim_bkt))) /
|
||||||
|
BIT_ULL(20)));
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
chnk_mem_err:
|
chnk_mem_err:
|
||||||
|
Loading…
Reference in New Issue
Block a user