Skip to content

Commit 249b200

Browse files
asevinceJerin Jacob
authored andcommitted
eventdev: add support for independent enqueue
Support for independent enqueue feature and updates Event Device and PMD feature list. A new capability RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ is introduced. It allows out-of-order enqueuing of RTE_EVENT_OP_FORWARD or RELEASE type events on an event port where this capability is enabled. To use this capability applications need to set flag RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ during port setup only if the capability RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ exists. Signed-off-by: Abdullah Sevincer <[email protected]> Acked-by: Mattias Rönnblom <[email protected]> Acked-by: Jerin Jacob <[email protected]>
1 parent cf4638a commit 249b200

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

doc/guides/eventdevs/features/default.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ carry_flow_id =
2222
maintenance_free =
2323
runtime_queue_attr =
2424
profile_links =
25+
independent_enq =
2526

2627
;
2728
; Features of a default Ethernet Rx adapter.

doc/guides/prog_guide/eventdev/eventdev.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,29 @@ A flush callback can be passed to the function to handle any outstanding events.
472472

473473
Invocation of this API does not affect the existing port configuration.
474474

475+
Independent Enqueue Capability
476+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
477+
478+
This capability applies to eventdev devices that expects all forwarded events to be
479+
enqueued in the same order as they are dequeued. For dropped events, their
480+
releases should come at the same location as the original event was expected.
481+
The eventdev device has this restriction as it uses the order to retrieve information about
482+
the original event that was sent to the CPU. This contains information like atomic
483+
flow ID to release the flow lock and ordered events sequence number to restore the
484+
original order.
485+
486+
This capability only matters to eventdevs supporting burst mode. On ports where
487+
the application is going to change enqueue order,
488+
``RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ`` support should be enabled.
489+
490+
Example code to inform PMD that the application plans to use independent enqueue
491+
order on a port:
492+
493+
.. code-block:: c
494+
495+
if (capability & RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ)
496+
port_config = port_config | RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ;
497+
475498
Stopping the EventDev
476499
~~~~~~~~~~~~~~~~~~~~~
477500

doc/guides/rel_notes/release_24_11.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ New Features
6767

6868
The new statistics are useful for debugging and profiling.
6969

70+
* **Updated Event Device Library for independent enqueue feature**
71+
72+
* Added support for independent enqueue feature. With this feature Eventdev
73+
supports enqueue in any order or specifically in a different order than
74+
dequeue. The feature is intended for eventdevs supporting burst mode.
75+
Applications should use ``RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ`` to enable
76+
the feature if the capability ``RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ`` exists.
77+
7078

7179
Removed Items
7280
-------------

lib/eventdev/rte_eventdev.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,25 @@ struct rte_event;
446446
* @see RTE_SCHED_TYPE_PARALLEL
447447
*/
448448

449+
#define RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ (1ULL << 16)
450+
/**< Event device is capable of independent enqueue.
451+
* A new capability, RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ, will indicate that Eventdev
452+
* supports the enqueue in any order or specifically in a different order than the
453+
* dequeue. Eventdev PMD can either dequeue events in the changed order in which
454+
* they are enqueued or restore the original order before sending them to the
455+
* underlying hardware device. A flag is provided during the port configuration to
456+
* inform Eventdev PMD that the application intends to use an independent enqueue
457+
* order on a particular port. Note that this capability only matters for eventdevs
458+
* supporting burst mode.
459+
*
460+
* When an implicit release is enabled on a port, Eventdev PMD will also handle
461+
* the insertion of RELEASE events in place of dropped events. The independent enqueue
462+
* feature only applies to FORWARD and RELEASE events. New events (op=RTE_EVENT_OP_NEW)
463+
* will be dequeued in the order the application enqueues them and do not maintain
464+
* any order relative to FORWARD/RELEASE events. FORWARD vs NEW relaxed ordering
465+
* only applies to ports that have enabled independent enqueue feature.
466+
*/
467+
449468
/* Event device priority levels */
450469
#define RTE_EVENT_DEV_PRIORITY_HIGHEST 0
451470
/**< Highest priority level for events and queues.
@@ -1072,6 +1091,18 @@ rte_event_queue_attr_set(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
10721091
*
10731092
* @see rte_event_port_setup()
10741093
*/
1094+
#define RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ (1ULL << 5)
1095+
/**< Flag to enable independent enqueue. Must not be set if the device
1096+
* is not RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ capable. This feature
1097+
* allows an application to enqueue RTE_EVENT_OP_FORWARD or
1098+
* RTE_EVENT_OP_RELEASE in an order different than the order the
1099+
* events were dequeued from the event device, while maintaining
1100+
* RTE_SCHED_TYPE_ATOMIC or RTE_SCHED_TYPE_ORDERED semantics.
1101+
*
1102+
* Note that this flag only matters for Eventdevs supporting burst mode.
1103+
*
1104+
* @see rte_event_port_setup()
1105+
*/
10751106

10761107
/** Event port configuration structure */
10771108
struct rte_event_port_conf {

0 commit comments

Comments
 (0)