| 94 | } |
| 95 | |
| 96 | static int |
| 97 | dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id, |
| 98 | const struct rte_event_queue_conf *conf) |
| 99 | { |
| 100 | struct dsw_evdev *dsw = dsw_pmd_priv(dev); |
| 101 | struct dsw_queue *queue = &dsw->queues[queue_id]; |
| 102 | |
| 103 | if (RTE_EVENT_QUEUE_CFG_ALL_TYPES & conf->event_queue_cfg) |
| 104 | return -ENOTSUP; |
| 105 | |
| 106 | /* SINGLE_LINK is better off treated as TYPE_ATOMIC, since it |
| 107 | * avoid the "fake" TYPE_PARALLEL flow_id assignment. Since |
| 108 | * the queue will only have a single serving port, no |
| 109 | * migration will ever happen, so the extra TYPE_ATOMIC |
| 110 | * migration overhead is avoided. |
| 111 | */ |
| 112 | if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK & conf->event_queue_cfg) |
| 113 | queue->schedule_type = RTE_SCHED_TYPE_ATOMIC; |
| 114 | else { |
| 115 | if (conf->schedule_type == RTE_SCHED_TYPE_ORDERED) |
| 116 | return -ENOTSUP; |
| 117 | /* atomic or parallel */ |
| 118 | queue->schedule_type = conf->schedule_type; |
| 119 | } |
| 120 | |
| 121 | queue->num_serving_ports = 0; |
| 122 | |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | static void |
| 127 | dsw_queue_def_conf(struct rte_eventdev *dev __rte_unused, |
nothing calls this directly
no test coverage detected