diff mbox series

[v2,4/5] event/dpaa2: support Max event port value

Message ID 1537530366-4722-4-git-send-email-hemant.agrawal@nxp.com
State Accepted
Commit 9943f56e3525c3fcd73bd9b68395784f765545aa
Headers show
Series [v2,1/5] event/dpaa2: fix mbuf assignment in atomic processing | expand

Commit Message

Hemant Agrawal Sept. 21, 2018, 11:46 a.m. UTC
This shall be number of available cores.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/event/dpaa2/dpaa2_eventdev.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.7.4
diff mbox series

Patch

diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 4b56e2e..456b446 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -293,6 +293,9 @@  dpaa2_eventdev_info_get(struct rte_eventdev *dev,
 	dev_info->max_event_priority_levels =
 		DPAA2_EVENT_MAX_EVENT_PRIORITY_LEVELS;
 	dev_info->max_event_ports = rte_fslmc_get_device_count(DPAA2_IO);
+	/* we only support dpio upto number of cores*/
+	if (dev_info->max_event_ports > rte_lcore_count())
+		dev_info->max_event_ports = rte_lcore_count();
 	dev_info->max_event_port_dequeue_depth =
 		DPAA2_EVENT_MAX_PORT_DEQUEUE_DEPTH;
 	dev_info->max_event_port_enqueue_depth =