summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPavan Nikhilesh <pbhagavatula@marvell.com>2020-01-07 18:47:38 +0530
committerJerin Jacob <jerinj@marvell.com>2020-01-15 17:17:16 +0530
commit0b6ee9a9a5e13866cd603cd116d25914af966e2a (patch)
tree414f89401037f4ffcb96a6af98883537f784f489 /drivers
parent4b6a8e6109e082da4b4275f1b10f669ee7308a8f (diff)
downloaddpdk-next-eventdev-master.zip
dpdk-next-eventdev-master.tar.gz
dpdk-next-eventdev-master.tar.xz
event/octeontx2: relax memory requirement for event timersHEADmaster
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/event/octeontx2/otx2_tim_evdev.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/event/octeontx2/otx2_tim_evdev.c b/drivers/event/octeontx2/otx2_tim_evdev.c
index b275c69..cd0dcde 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: