eventdev: fix inconsistency in queue config
[dpdk.git] / drivers / event / dpaa2 / dpaa2_eventdev.c
index ee3a164..d8f5f7d 100644 (file)
@@ -140,11 +140,20 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[],
                         */
                        struct rte_event *ev_temp = rte_malloc(NULL,
                                sizeof(struct rte_event), 0);
+
+                       if (!ev_temp) {
+                               if (!loop)
+                                       return num_tx;
+                               frames_to_send = loop;
+                               PMD_DRV_LOG(ERR, "Unable to allocate memory");
+                               goto send_partial;
+                       }
                        rte_memcpy(ev_temp, event, sizeof(struct rte_event));
                        DPAA2_SET_FD_ADDR((&fd_arr[loop]), ev_temp);
                        DPAA2_SET_FD_LEN((&fd_arr[loop]),
                                         sizeof(struct rte_event));
                }
+send_partial:
                loop = 0;
                while (loop < frames_to_send) {
                        loop += qbman_swp_enqueue_multiple_desc(swp,
@@ -387,8 +396,8 @@ dpaa2_eventdev_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
        RTE_SET_USED(queue_conf);
 
        queue_conf->nb_atomic_flows = DPAA2_EVENT_QUEUE_ATOMIC_FLOWS;
-       queue_conf->event_queue_cfg = RTE_EVENT_QUEUE_CFG_ATOMIC_ONLY |
-                                     RTE_EVENT_QUEUE_CFG_PARALLEL_ONLY;
+       queue_conf->schedule_type = RTE_SCHED_TYPE_ATOMIC |
+                                     RTE_SCHED_TYPE_PARALLEL;
        queue_conf->priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
 }