From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4CC2245AD8; Mon, 7 Oct 2024 14:19:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22B89402BB; Mon, 7 Oct 2024 14:19:38 +0200 (CEST) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by mails.dpdk.org (Postfix) with ESMTP id 8F7074026C for ; Mon, 7 Oct 2024 14:19:36 +0200 (CEST) Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-4582a0b438aso35887911cf.0 for ; Mon, 07 Oct 2024 05:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728303576; x=1728908376; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=z0FnzfVmEL4sixgm05Sqw8mbPHRfVRAdtOj6jygHER4=; b=GYXi6GVIrYXmUXzvOhARGRr1gbl8/EaACOiiO4ekNl9zgf92692x7C5SFMBf/PzK+9 PPupNfixX1FwdSQusdQExQzWeT1MhNpFB8uqQjXBkPagplbodOca+vjrEE4Oxj+HCiGh ovSihuLC4CusEo4JaxdPPE+rIkouJJVZ+O0F3dK6Gtag2aJADcFnFzPadPHMmw4zSaGz oLOQ5PKHup2iVVBDWas9d/OtBbAXufdtzADDWrxyaU1IIqfx0Fi35DwUI3djZoX/YN3i X8m8SyuICSdCA0ixvHhlg1M/OZZ8adsD2XAU0aFwqPZwU6KVZ1cYI3euYd8ORby24om1 zWBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728303576; x=1728908376; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z0FnzfVmEL4sixgm05Sqw8mbPHRfVRAdtOj6jygHER4=; b=aeIkToe/s0bZlqogr13iGwzd+875ftc8fxkieTHQkW94tXIppCZhjsN1xGCje5shNz FwgGPi0XgwilVDZL6nH2dHIoyB8NLbc00nYk19vgAVpOUa4+MnBrHxL8l9GQjYPkmNA2 3rddsENuVhTrn0hfHuVFhB/s1cJNt1BjNd0zHGaANpxj+TkXvY3n6fM4SpHruXmiWoxj Vn7uNZE8PaQsujUXx6GuT659n+gP0Sshgy6h8CNkcrBgPUe1NBUygrmeAYFD6sS5m89S F8gHnPiD/mYl+bYNBIO60XNnMzYXstnyi3dKBDwjeg7IZNWQwkW3wzlERfaeivgfWU/d ZOjQ== X-Gm-Message-State: AOJu0YxqgFK0mYsiJduTNgEBK95+ijYEdf4h0bfYXMAIAxRawCLXvoSX uQuGUk07M87DbfC676l/0O5TAYnfP2pHSMNG09hhRAb6YSPOqMdVY/4rrukii5kq8/9u8snB1pJ P00c032bKH64Q8CT02qgZriHApn4= X-Google-Smtp-Source: AGHT+IHTXnAyiy/XNt6XqzLlgV6VvdqbcT0cdNhO8WP0b0Cmn9k+ArktqoHqVPUCYV4mJasM72hnhrQ6DxQqRRF/lhg= X-Received: by 2002:ac8:5a01:0:b0:458:2405:3b79 with SMTP id d75a77b69052e-45d9ba274b0mr164034031cf.2.1728303575577; Mon, 07 Oct 2024 05:19:35 -0700 (PDT) MIME-Version: 1.0 References: <20241003205002.4090954-2-abdullah.sevincer@intel.com> <20241007081324.155986-1-abdullah.sevincer@intel.com> <20241007081324.155986-2-abdullah.sevincer@intel.com> In-Reply-To: <20241007081324.155986-2-abdullah.sevincer@intel.com> From: Jerin Jacob Date: Mon, 7 Oct 2024 17:49:07 +0530 Message-ID: Subject: Re: [PATCH v18 1/3] eventdev: add support for independent enqueue To: Abdullah Sevincer Cc: dev@dpdk.org, jerinj@marvell.com, bruce.richardson@intel.com, pravin.pathak@intel.com, mattias.ronnblom@ericsson.com, manish.aggarwal@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Oct 7, 2024 at 1:43=E2=80=AFPM Abdullah Sevincer wrote: > > 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 > Acked-by: Mattias R=C3=B6nnblom Acked-by: Jerin Jacob Series applied to dpdk-next-net-eventdev/for-main. Thanks > --- > doc/guides/eventdevs/features/default.ini | 1 + > doc/guides/prog_guide/eventdev/eventdev.rst | 23 +++++++++++++++ > doc/guides/rel_notes/release_24_11.rst | 8 ++++++ > lib/eventdev/rte_eventdev.h | 31 +++++++++++++++++++++ > 4 files changed, 63 insertions(+) > > diff --git a/doc/guides/eventdevs/features/default.ini b/doc/guides/event= devs/features/default.ini > index 1cc4303fe5..7c4ee99238 100644 > --- a/doc/guides/eventdevs/features/default.ini > +++ b/doc/guides/eventdevs/features/default.ini > @@ -22,6 +22,7 @@ carry_flow_id =3D > maintenance_free =3D > runtime_queue_attr =3D > profile_links =3D > +independent_enq =3D > > ; > ; Features of a default Ethernet Rx adapter. > diff --git a/doc/guides/prog_guide/eventdev/eventdev.rst b/doc/guides/pro= g_guide/eventdev/eventdev.rst > index fb6dfce102..515744d8ec 100644 > --- a/doc/guides/prog_guide/eventdev/eventdev.rst > +++ b/doc/guides/prog_guide/eventdev/eventdev.rst > @@ -472,6 +472,29 @@ A flush callback can be passed to the function to ha= ndle any outstanding events. > > Invocation of this API does not affect the existing port configu= ration. > > +Independent Enqueue Capability > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +This capability applies to eventdev devices that expects all forwarded e= vents to be > +enqueued in the same order as they are dequeued. For dropped events, the= ir > +releases should come at the same location as the original event was expe= cted. > +The eventdev device has this restriction as it uses the order to retriev= e information about > +the original event that was sent to the CPU. This contains information l= ike atomic > +flow ID to release the flow lock and ordered events sequence number to r= estore the > +original order. > + > +This capability only matters to eventdevs supporting burst mode. On port= s 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 =3D port_config | RTE_EVENT_PORT_CFG_INDEPENDENT_EN= Q; > + > Stopping the EventDev > ~~~~~~~~~~~~~~~~~~~~~ > > diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_note= s/release_24_11.rst > index e0a9aa55a1..bf7b8f005c 100644 > --- a/doc/guides/rel_notes/release_24_11.rst > +++ b/doc/guides/rel_notes/release_24_11.rst > @@ -67,6 +67,14 @@ New Features > > The new statistics are useful for debugging and profiling. > > +* **Updated Event Device Library for independent enqueue feature** > + > + * Added support for independent enqueue feature. With this feature Eve= ntdev > + supports enqueue in any order or specifically in a different order t= han > + dequeue. The feature is intended for eventdevs supporting burst mode= . > + Applications should use ``RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ`` to e= nable > + the feature if the capability ``RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ``= exists. > + > > Removed Items > ------------- > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h > index 08e5f9320b..73a44b2ac5 100644 > --- a/lib/eventdev/rte_eventdev.h > +++ b/lib/eventdev/rte_eventdev.h > @@ -446,6 +446,25 @@ struct rte_event; > * @see RTE_SCHED_TYPE_PARALLEL > */ > > +#define RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ (1ULL << 16) > +/**< Event device is capable of independent enqueue. > + * A new capability, RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ, will indicate th= at Eventdev > + * supports the enqueue in any order or specifically in a different orde= r than the > + * dequeue. Eventdev PMD can either dequeue events in the changed order = in which > + * they are enqueued or restore the original order before sending them t= o the > + * underlying hardware device. A flag is provided during the port config= uration to > + * inform Eventdev PMD that the application intends to use an independen= t enqueue > + * order on a particular port. Note that this capability only matters fo= r eventdevs > + * supporting burst mode. > + * > + * When an implicit release is enabled on a port, Eventdev PMD will also= handle > + * the insertion of RELEASE events in place of dropped events. The indep= endent enqueue > + * feature only applies to FORWARD and RELEASE events. New events (op=3D= RTE_EVENT_OP_NEW) > + * will be dequeued in the order the application enqueues them and do no= t maintain > + * any order relative to FORWARD/RELEASE events. FORWARD vs NEW relaxed = ordering > + * only applies to ports that have enabled independent enqueue feature. > + */ > + > /* Event device priority levels */ > #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0 > /**< Highest priority level for events and queues. > @@ -1072,6 +1091,18 @@ rte_event_queue_attr_set(uint8_t dev_id, uint8_t q= ueue_id, uint32_t attr_id, > * > * @see rte_event_port_setup() > */ > +#define RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ (1ULL << 5) > +/**< Flag to enable independent enqueue. Must not be set if the device > + * is not RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ capable. This feature > + * allows an application to enqueue RTE_EVENT_OP_FORWARD or > + * RTE_EVENT_OP_RELEASE in an order different than the order the > + * events were dequeued from the event device, while maintaining > + * RTE_SCHED_TYPE_ATOMIC or RTE_SCHED_TYPE_ORDERED semantics. > + * > + * Note that this flag only matters for Eventdevs supporting burst mode. > + * > + * @see rte_event_port_setup() > + */ > > /** Event port configuration structure */ > struct rte_event_port_conf { > -- > 2.25.1 >