* Maintain an event device. * * This function is only relevant for event devices which do not have * the @ref RTE_EVENT_DEV_CAP_MAINTENANCE_FREE flag set. Such devices * require an application thread using a particular port to * periodically call rte_event_maintain() on that port during periods * which it is neither attempting to enqueue events to nor dequeue * events from the port. rte_eve
| 2479 | * @see RTE_EVENT_DEV_CAP_MAINTENANCE_FREE |
| 2480 | */ |
| 2481 | static inline int |
| 2482 | rte_event_maintain(uint8_t dev_id, uint8_t port_id, int op) |
| 2483 | { |
| 2484 | const struct rte_event_fp_ops *fp_ops; |
| 2485 | void *port; |
| 2486 | |
| 2487 | fp_ops = &rte_event_fp_ops[dev_id]; |
| 2488 | port = fp_ops->data[port_id]; |
| 2489 | #ifdef RTE_LIBRTE_EVENTDEV_DEBUG |
| 2490 | if (dev_id >= RTE_EVENT_MAX_DEVS || |
| 2491 | port_id >= RTE_EVENT_MAX_PORTS_PER_DEV) |
| 2492 | return -EINVAL; |
| 2493 | |
| 2494 | if (port == NULL) |
| 2495 | return -EINVAL; |
| 2496 | |
| 2497 | if (op & (~RTE_EVENT_DEV_MAINT_OP_FLUSH)) |
| 2498 | return -EINVAL; |
| 2499 | #endif |
| 2500 | rte_eventdev_trace_maintain(dev_id, port_id, op); |
| 2501 | |
| 2502 | if (fp_ops->maintain != NULL) |
| 2503 | fp_ops->maintain(port, op); |
| 2504 | |
| 2505 | return 0; |
| 2506 | } |
| 2507 | |
| 2508 | /** |
| 2509 | * Change the active profile on an event port. |
no outgoing calls