X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fevent%2Focteontx2%2Fotx2_tim_evdev.c;h=cd0dcde24c51a7a2a390e29b919db8a7185397d2;hb=f4fd0af59787c8668d3983d1498e2fc63264ee54;hp=b275c69222396b6d2ed098b3e4c9c9a10cdc07f2;hpb=79b9f3d7f87da14e34d66a395b19fb21580dfde0;p=dpdk.git diff --git a/drivers/event/octeontx2/otx2_tim_evdev.c b/drivers/event/octeontx2/otx2_tim_evdev.c index b275c69222..cd0dcde24c 100644 --- a/drivers/event/octeontx2/otx2_tim_evdev.c +++ b/drivers/event/octeontx2/otx2_tim_evdev.c @@ -327,7 +327,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr) 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. */ tim_ring->bkt = rte_zmalloc("otx2_tim_bucket", (tim_ring->nb_bkts) * sizeof(struct otx2_tim_bkt), @@ -376,6 +380,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr) RTE_EVENT_TYPE_TIMER); 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; chnk_mem_err: