| 2147 | #include <rte_eventdev_core.h> |
| 2148 | |
| 2149 | static __rte_always_inline uint16_t |
| 2150 | __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, |
| 2151 | const struct rte_event ev[], uint16_t nb_events, |
| 2152 | const event_enqueue_burst_t fn) |
| 2153 | { |
| 2154 | const struct rte_event_fp_ops *fp_ops; |
| 2155 | void *port; |
| 2156 | |
| 2157 | fp_ops = &rte_event_fp_ops[dev_id]; |
| 2158 | port = fp_ops->data[port_id]; |
| 2159 | #ifdef RTE_LIBRTE_EVENTDEV_DEBUG |
| 2160 | if (dev_id >= RTE_EVENT_MAX_DEVS || |
| 2161 | port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) { |
| 2162 | rte_errno = EINVAL; |
| 2163 | return 0; |
| 2164 | } |
| 2165 | |
| 2166 | if (port == NULL) { |
| 2167 | rte_errno = EINVAL; |
| 2168 | return 0; |
| 2169 | } |
| 2170 | #endif |
| 2171 | rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (void *)fn); |
| 2172 | /* |
| 2173 | * Allow zero cost non burst mode routine invocation if application |
| 2174 | * requests nb_events as const one |
| 2175 | */ |
| 2176 | if (nb_events == 1) |
| 2177 | return (fp_ops->enqueue)(port, ev); |
| 2178 | else |
| 2179 | return fn(port, ev, nb_events); |
| 2180 | } |
| 2181 | |
| 2182 | /** |
| 2183 | * Enqueue a burst of events objects or an event object supplied in *rte_event* |
no outgoing calls
no test coverage detected