On Fri, Oct 4, 2024 at 6:34 PM Abdullah Sevincer <abdullah.sevin...@intel.com> wrote: > > DLB devices need events to be enqueued in the same order they are > dequeued. Applications are not suppose to change event order between > dequeue and to enqueue. Since Eventdev standard does not add such > restrictions independent enqueue support is needed for DLB PMD so that > it restores dequeue order on enqueue if applications happen to change > it. It also adds missing releases in places where events are dropped > by the application and it expects implicit release to handle it. > > By default the feature will be off on all DLB ports and they will > behave the same as older releases. To enable reordering feature, > applications need to add the flag RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ > to port configuration if only the device advertises the capability > RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ. > > Signed-off-by: Abdullah Sevincer <abdullah.sevin...@intel.com> > Acked-by: Mattias Rönnblom <mattias.ronnb...@ericsson.com> > --- > doc/guides/prog_guide/eventdev/eventdev.rst | 33 ++ > doc/guides/rel_notes/release_24_11.rst | 5 + > drivers/event/dlb2/dlb2.c | 490 +++++++++++++------- > drivers/event/dlb2/dlb2_avx512.c | 27 +- > drivers/event/dlb2/dlb2_inline_fns.h | 8 + > drivers/event/dlb2/dlb2_priv.h | 25 +- > drivers/event/dlb2/rte_pmd_dlb2.h | 24 + > 7 files changed, 422 insertions(+), 190 deletions(-) > > diff --git a/doc/guides/prog_guide/eventdev/eventdev.rst > b/doc/guides/prog_guide/eventdev/eventdev.rst > index fb6dfce102..dd22ab69d2 100644 > --- a/doc/guides/prog_guide/eventdev/eventdev.rst > +++ b/doc/guides/prog_guide/eventdev/eventdev.rst > +Independent Enqueue Capability > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +Some eventdev hardware devices such as DLB2 expects all forwarded events to > be
Remove DLB2 from _generic+ documentation. Instead, express with capability. > +enqueued in the same order as they are dequeued. For dropped events, their > +releases should come at the same location as the original event was expected. > +Hardware has this restriction as it uses the order to retrieve information > about > +the original event that was sent to the CPU. This contains information like > atomic flow > +ID to release the flow lock and ordered events sequence number to restore the > +original order. > + > +Some applications, like those based on the DPDK dispatcher library, want > +enqueue order independence. To support this, DLB2 PMD supports the Remove DLB2 from generic documentation. > +``RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ`` capability. > + > +This capability applies to Eventdevs supporting burst mode. On ports where > +the application is going to change enqueue order, > +``RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ`` support should be enabled. > + > +Example code to inform PMD that the application plans to use independent > enqueue > +order on a port: > + > + .. code-block:: c > + > + if (capability & RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ) > + port_config = port_config | RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ; > + -------------------- AS MENTIONED IN THE LAST comment, Please move this section to 1/3 patch. > +This code example enables enqueue event reordering inside DLB2 PMD before > the events > +are sent to the DLB2 hardware. If the application is not going to change the > enqueue > +order, this flag should not be enabled to get better performance. DLB2 PMD > saves > +ordering information inside the impl_opaque field of the event, and this > field should > +be preserved for all FORWARD or RELEASE events. This section is a candidate for DLB2 specific documentation. DONT ADD IN doc/guides/prog_guide/eventdev/eventdev.rst instead move any DLB2 specific documentation DLB2 specific document if needed. > + > Stopping the EventDev > ~~~~~~~~~~~~~~~~~~~~~ > > diff --git a/doc/guides/rel_notes/release_24_11.rst > b/doc/guides/rel_notes/release_24_11.rst > index dee6723b70..98e9732100 100644 > --- a/doc/guides/rel_notes/release_24_11.rst > +++ b/doc/guides/rel_notes/release_24_11.rst > @@ -72,6 +72,11 @@ New Features > * Added support for independent enqueue feature. Updated Event Device and > PMD feature list. > > + * Updated DLB2 driver for independent enqueue feature. Applications should > + use ``RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ`` to enable the feature if the > + capability ``RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ`` exists. Starting from “Applications ...” is not specific to DLB2, remove from release notes. Please send the next version on Monday, planning to submit rc1 PR on Tuesday.