event/dpaa2: add all-types queue capability flag
[dpdk.git] / drivers / event / dpaa2 / dpaa2_eventdev.c
index 4ee2c46..3ae4441 100644 (file)
@@ -48,8 +48,6 @@
  * Soft Event Flow is DPCI Instance
  */
 
-/* Dynamic logging identified for mempool */
-int dpaa2_logtype_event;
 #define DPAA2_EV_TX_RETRY_COUNT 10000
 
 static uint16_t
@@ -74,7 +72,9 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[],
                /* Affine current thread context to a qman portal */
                ret = dpaa2_affine_qbman_swp();
                if (ret < 0) {
-                       DPAA2_EVENTDEV_ERR("Failure in affining portal");
+                       DPAA2_EVENTDEV_ERR(
+                               "Failed to allocate IO portal, tid: %d\n",
+                               rte_gettid());
                        return 0;
                }
        }
@@ -273,7 +273,9 @@ dpaa2_eventdev_dequeue_burst(void *port, struct rte_event ev[],
                /* Affine current thread context to a qman portal */
                ret = dpaa2_affine_qbman_swp();
                if (ret < 0) {
-                       DPAA2_EVENTDEV_ERR("Failure in affining portal");
+                       DPAA2_EVENTDEV_ERR(
+                               "Failed to allocate IO portal, tid: %d\n",
+                               rte_gettid());
                        return 0;
                }
        }
@@ -391,7 +393,7 @@ 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*/
+       /* we only support dpio up to 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 =
@@ -403,7 +405,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
                RTE_EVENT_DEV_CAP_BURST_MODE|
                RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
                RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
-               RTE_EVENT_DEV_CAP_NONSEQ_MODE;
+               RTE_EVENT_DEV_CAP_NONSEQ_MODE |
+               RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES;
 
 }
 
@@ -477,9 +480,10 @@ dpaa2_eventdev_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
 
        RTE_SET_USED(dev);
        RTE_SET_USED(queue_id);
-       RTE_SET_USED(queue_conf);
 
        queue_conf->nb_atomic_flows = DPAA2_EVENT_QUEUE_ATOMIC_FLOWS;
+       queue_conf->nb_atomic_order_sequences =
+                               DPAA2_EVENT_QUEUE_ORDER_SEQUENCES;
        queue_conf->schedule_type = RTE_SCHED_TYPE_PARALLEL;
        queue_conf->priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
 }
@@ -496,8 +500,9 @@ dpaa2_eventdev_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
        switch (queue_conf->schedule_type) {
        case RTE_SCHED_TYPE_PARALLEL:
        case RTE_SCHED_TYPE_ATOMIC:
-               break;
        case RTE_SCHED_TYPE_ORDERED:
+               break;
+       default:
                DPAA2_EVENTDEV_ERR("Schedule type is not supported.");
                return -1;
        }
@@ -1199,10 +1204,4 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = {
 };
 
 RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
-
-RTE_INIT(dpaa2_eventdev_init_log)
-{
-       dpaa2_logtype_event = rte_log_register("pmd.event.dpaa2");
-       if (dpaa2_logtype_event >= 0)
-               rte_log_set_level(dpaa2_logtype_event, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(dpaa2_logtype_event, pmd.event.dpaa2, NOTICE);