* Dequeue a burst of events objects or an event object from the event port * designated by its *event_port_id*, on an event device designated * by its *dev_id*. * * rte_event_dequeue_burst() does not dictate the specifics of scheduling * algorithm as each eventdev driver may have different criteria to schedule * an event. However, in general, from an application perspective scheduler may *
| 2404 | * @see rte_event_port_dequeue_depth() |
| 2405 | */ |
| 2406 | static inline uint16_t |
| 2407 | rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], |
| 2408 | uint16_t nb_events, uint64_t timeout_ticks) |
| 2409 | { |
| 2410 | const struct rte_event_fp_ops *fp_ops; |
| 2411 | void *port; |
| 2412 | |
| 2413 | fp_ops = &rte_event_fp_ops[dev_id]; |
| 2414 | port = fp_ops->data[port_id]; |
| 2415 | #ifdef RTE_LIBRTE_EVENTDEV_DEBUG |
| 2416 | if (dev_id >= RTE_EVENT_MAX_DEVS || |
| 2417 | port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) { |
| 2418 | rte_errno = EINVAL; |
| 2419 | return 0; |
| 2420 | } |
| 2421 | |
| 2422 | if (port == NULL) { |
| 2423 | rte_errno = EINVAL; |
| 2424 | return 0; |
| 2425 | } |
| 2426 | #endif |
| 2427 | rte_eventdev_trace_deq_burst(dev_id, port_id, ev, nb_events); |
| 2428 | /* |
| 2429 | * Allow zero cost non burst mode routine invocation if application |
| 2430 | * requests nb_events as const one |
| 2431 | */ |
| 2432 | if (nb_events == 1) |
| 2433 | return (fp_ops->dequeue)(port, ev, timeout_ticks); |
| 2434 | else |
| 2435 | return (fp_ops->dequeue_burst)(port, ev, nb_events, |
| 2436 | timeout_ticks); |
| 2437 | } |
| 2438 | |
| 2439 | #define RTE_EVENT_DEV_MAINT_OP_FLUSH (1 << 0) |
| 2440 | /**< Force an immediately flush of any buffered events in the port, |
no outgoing calls