event/dpaa2: support max event port value
authorHemant Agrawal <hemant.agrawal@nxp.com>
Fri, 21 Sep 2018 11:46:05 +0000 (17:16 +0530)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Mon, 1 Oct 2018 14:47:27 +0000 (16:47 +0200)
dev_info->max_event_ports shall be number of available cores.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/event/dpaa2/dpaa2_eventdev.c

index 4b56e2e..456b446 100644 (file)
@@ -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 =