MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_event_port_profile_switch

Function rte_event_port_profile_switch

dpdk/lib/eventdev/rte_eventdev.h:2529–2552  ·  view source on GitHub ↗

* Change the active profile on an event port. * * This function is used to change the current active profile on an event port * when multiple link profiles are configured on an event port through the * function call ``rte_event_port_profile_links_set``. * * On the subsequent ``rte_event_dequeue_burst`` call, only the event queues * that were associated with the newly active profile will par

Source from the content-addressed store, hash-verified

2527 * - -EINVAL if *dev_id*, *port_id*, or *profile_id* is invalid.
2528 */
2529static inline uint8_t
2530rte_event_port_profile_switch(uint8_t dev_id, uint8_t port_id, uint8_t profile_id)
2531{
2532 const struct rte_event_fp_ops *fp_ops;
2533 void *port;
2534
2535 fp_ops = &rte_event_fp_ops[dev_id];
2536 port = fp_ops->data[port_id];
2537
2538#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
2539 if (dev_id >= RTE_EVENT_MAX_DEVS ||
2540 port_id >= RTE_EVENT_MAX_PORTS_PER_DEV)
2541 return -EINVAL;
2542
2543 if (port == NULL)
2544 return -EINVAL;
2545
2546 if (profile_id >= RTE_EVENT_MAX_PROFILES_PER_PORT)
2547 return -EINVAL;
2548#endif
2549 rte_eventdev_trace_port_profile_switch(dev_id, port_id, profile_id);
2550
2551 return fp_ops->profile_switch(port, profile_id);
2552}
2553
2554#ifdef __cplusplus
2555}

Callers 1

Calls

no outgoing calls

Tested by 1