X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eventdev%2Frte_eventdev.h;h=ced6f29d9889940e639a31569503e9f5567a1491;hb=2379572969145312653b144695f6bca44cb794e0;hp=43b1a248a0fdb1661891f429d4e98555a7d5895b;hpb=8bd5f07c7a1ac0c5b8d16758efc3ada3e16b0adc;p=dpdk.git diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index 43b1a248a0..ced6f29d98 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -181,9 +181,8 @@ * The *dequeue* operation gets one or more events from the event ports. * The application process the events and send to downstream event queue through * rte_event_enqueue_burst() if it is an intermediate stage of event processing, - * on the final stage, the application may send to different subsystem like - * ethdev to send the packet/event on the wire using ethdev - * rte_eth_tx_burst() API. + * on the final stage, the application may use Tx adapter API for maintaining + * the ingress order and then send the packet/event on the wire. * * The point at which events are scheduled to ports depends on the device. * For hardware devices, scheduling occurs asynchronously without any software @@ -1231,6 +1230,12 @@ typedef uint16_t (*event_tx_adapter_enqueue)(void *port, struct rte_event ev[], uint16_t nb_events); /**< @internal Enqueue burst of events on port of a device */ +typedef uint16_t (*event_tx_adapter_enqueue_same_dest)(void *port, + struct rte_event ev[], uint16_t nb_events); +/**< @internal Enqueue burst of events on port of a device supporting + * burst having same destination Ethernet port & Tx queue. + */ + #define RTE_EVENTDEV_NAME_MAX_LEN (64) /**< @internal Max length of name of event PMD */ @@ -1293,6 +1298,10 @@ struct rte_eventdev { /**< Pointer to PMD dequeue function. */ event_dequeue_burst_t dequeue_burst; /**< Pointer to PMD dequeue burst function. */ + event_tx_adapter_enqueue_same_dest txa_enqueue_same_dest; + /**< Pointer to PMD eth Tx adapter burst enqueue function with + * events destined to same Eth port & Tx queue. + */ event_tx_adapter_enqueue txa_enqueue; /**< Pointer to PMD eth Tx adapter enqueue function. */ struct rte_eventdev_data *data; @@ -1319,12 +1328,12 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, #ifdef RTE_LIBRTE_EVENTDEV_DEBUG if (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) { - rte_errno = -EINVAL; + rte_errno = EINVAL; return 0; } if (port_id >= dev->data->nb_ports) { - rte_errno = -EINVAL; + rte_errno = EINVAL; return 0; } #endif @@ -1363,7 +1372,8 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, * which contain the event object enqueue operations to be processed. * @param nb_events * The number of event objects to enqueue, typically number of - * rte_event_port_enqueue_depth() available for this port. + * rte_event_port_attr_get(...RTE_EVENT_PORT_ATTR_ENQ_DEPTH...) + * available for this port. * * @return * The number of event objects actually enqueued on the event device. The @@ -1372,13 +1382,13 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, * *rte_event*. If the return value is less than *nb_events*, the remaining * events at the end of ev[] are not consumed and the caller has to take care * of them, and rte_errno is set accordingly. Possible errno values include: - * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue + * - EINVAL The port ID is invalid, device ID is invalid, an event's queue * ID is invalid, or an event's sched type doesn't match the * capabilities of the destination queue. - * - -ENOSPC The event port was backpressured and unable to enqueue + * - ENOSPC The event port was backpressured and unable to enqueue * one or more events. This error code is only applicable to * closed systems. - * @see rte_event_port_enqueue_depth() + * @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH */ static inline uint16_t rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, @@ -1412,7 +1422,8 @@ rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, * which contain the event object enqueue operations to be processed. * @param nb_events * The number of event objects to enqueue, typically number of - * rte_event_port_enqueue_depth() available for this port. + * rte_event_port_attr_get(...RTE_EVENT_PORT_ATTR_ENQ_DEPTH...) + * available for this port. * * @return * The number of event objects actually enqueued on the event device. The @@ -1421,13 +1432,14 @@ rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, * *rte_event*. If the return value is less than *nb_events*, the remaining * events at the end of ev[] are not consumed and the caller has to take care * of them, and rte_errno is set accordingly. Possible errno values include: - * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue + * - EINVAL The port ID is invalid, device ID is invalid, an event's queue * ID is invalid, or an event's sched type doesn't match the * capabilities of the destination queue. - * - -ENOSPC The event port was backpressured and unable to enqueue + * - ENOSPC The event port was backpressured and unable to enqueue * one or more events. This error code is only applicable to * closed systems. - * @see rte_event_port_enqueue_depth() rte_event_enqueue_burst() + * @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH + * @see rte_event_enqueue_burst() */ static inline uint16_t rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id, @@ -1461,7 +1473,8 @@ rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id, * which contain the event object enqueue operations to be processed. * @param nb_events * The number of event objects to enqueue, typically number of - * rte_event_port_enqueue_depth() available for this port. + * rte_event_port_attr_get(...RTE_EVENT_PORT_ATTR_ENQ_DEPTH...) + * available for this port. * * @return * The number of event objects actually enqueued on the event device. The @@ -1470,13 +1483,14 @@ rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id, * *rte_event*. If the return value is less than *nb_events*, the remaining * events at the end of ev[] are not consumed and the caller has to take care * of them, and rte_errno is set accordingly. Possible errno values include: - * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue + * - EINVAL The port ID is invalid, device ID is invalid, an event's queue * ID is invalid, or an event's sched type doesn't match the * capabilities of the destination queue. - * - -ENOSPC The event port was backpressured and unable to enqueue + * - ENOSPC The event port was backpressured and unable to enqueue * one or more events. This error code is only applicable to * closed systems. - * @see rte_event_port_enqueue_depth() rte_event_enqueue_burst() + * @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH + * @see rte_event_enqueue_burst() */ static inline uint16_t rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id, @@ -1591,12 +1605,12 @@ rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], #ifdef RTE_LIBRTE_EVENTDEV_DEBUG if (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) { - rte_errno = -EINVAL; + rte_errno = EINVAL; return 0; } if (port_id >= dev->data->nb_ports) { - rte_errno = -EINVAL; + rte_errno = EINVAL; return 0; } #endif @@ -1669,9 +1683,9 @@ rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], * of link[] are not established, and the caller has to take care of them. * If return value is less than *nb_links* then implementation shall update the * rte_errno accordingly, Possible rte_errno values are - * (-EDQUOT) Quota exceeded(Application tried to link the queue configured with + * (EDQUOT) Quota exceeded(Application tried to link the queue configured with * RTE_EVENT_QUEUE_CFG_SINGLE_LINK to more than one event ports) - * (-EINVAL) Invalid parameter + * (EINVAL) Invalid parameter * */ int @@ -1716,7 +1730,7 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id, * end of queues[] are not unlinked, and the caller has to take care of them. * If return value is less than *nb_unlinks* then implementation shall update * the rte_errno accordingly, Possible rte_errno values are - * (-EINVAL) Invalid parameter + * (EINVAL) Invalid parameter */ int rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,