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 8EA6445AD0; Mon, 7 Oct 2024 04:01:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1249240B98; Mon, 7 Oct 2024 04:01:01 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id 870CD40A67 for ; Mon, 7 Oct 2024 04:00:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728266457; x=1759802457; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Dk0UsdDz326F/MSz58F+rsd4NHSWcQEEmO0mQgyvSrk=; b=b+lYx50pm4RExW2hmILn64tqQTvHqGiSnv/a3/ow1I+YzHqoT4oE+2O8 VZ2FwlC1SXCtp5K/BVJN0Q7qXQUh4u7ATFGEER+LvIeOGoJMosaSvMFv+ BpioCJVyU38gjrnhV9fz1WfTUAu64HHfcM/eYeYi/YNjcreAJvk0itMF7 VEohlaszxP5VRJlqXIuRDatG8kQmM1Pia+yqVJvOT5WQ7KIO5fPGIArF4 606169TGt4SMWxwjVtr8L5s7BJBk1P7hvw+iE+evq+Dn82F8HOWKWo+bv FP3ksZnzCd2BSxb7tZHSzyTbc4pstE1fWh+XCC5l0iqMDx8pW19+7yPkB w==; X-CSE-ConnectionGUID: eWZVLrAdSpiYb9JgWzXeGg== X-CSE-MsgGUID: 6JAvyoMcT4+oi2XMtxLe2A== X-IronPort-AV: E=McAfee;i="6700,10204,11217"; a="27346703" X-IronPort-AV: E=Sophos;i="6.11,183,1725346800"; d="scan'208";a="27346703" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2024 19:00:56 -0700 X-CSE-ConnectionGUID: XSU4GWbATAaK/D+y/Tlnjg== X-CSE-MsgGUID: FmHeb3aMTRW3TCjH/Zd0rw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,183,1725346800"; d="scan'208";a="112794215" Received: from txanpdk02.an.intel.com ([10.123.117.76]) by orviesa001.jf.intel.com with ESMTP; 06 Oct 2024 19:00:56 -0700 From: Abdullah Sevincer To: dev@dpdk.org Cc: jerinj@marvell.com, bruce.richardson@intel.com, pravin.pathak@intel.com, mattias.ronnblom@ericsson.com, manish.aggarwal@intel.com, Abdullah Sevincer Subject: [PATCH v17 1/3] eventdev: add support for independent enqueue Date: Sun, 6 Oct 2024 21:00:50 -0500 Message-Id: <20241007020052.138760-2-abdullah.sevincer@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241007020052.138760-1-abdullah.sevincer@intel.com> References: <20241003205002.4090954-2-abdullah.sevincer@intel.com> <20241007020052.138760-1-abdullah.sevincer@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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önnblom --- doc/guides/eventdevs/features/default.ini | 1 + doc/guides/eventdevs/features/dlb2.ini | 1 + doc/guides/prog_guide/eventdev/eventdev.rst | 27 ++++++++++++++++++ doc/guides/rel_notes/release_24_11.rst | 8 ++++++ lib/eventdev/rte_eventdev.h | 31 +++++++++++++++++++++ 5 files changed, 68 insertions(+) diff --git a/doc/guides/eventdevs/features/default.ini b/doc/guides/eventdevs/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 = maintenance_free = runtime_queue_attr = profile_links = +independent_enq = ; ; Features of a default Ethernet Rx adapter. diff --git a/doc/guides/eventdevs/features/dlb2.ini b/doc/guides/eventdevs/features/dlb2.ini index 7b80286927..c7193b47c1 100644 --- a/doc/guides/eventdevs/features/dlb2.ini +++ b/doc/guides/eventdevs/features/dlb2.ini @@ -15,6 +15,7 @@ implicit_release_disable = Y runtime_port_link = Y multiple_queue_port = Y maintenance_free = Y +independent_enq = Y [Eth Rx adapter Features] diff --git a/doc/guides/prog_guide/eventdev/eventdev.rst b/doc/guides/prog_guide/eventdev/eventdev.rst index fb6dfce102..ab53fe4e6c 100644 --- a/doc/guides/prog_guide/eventdev/eventdev.rst +++ b/doc/guides/prog_guide/eventdev/eventdev.rst @@ -472,6 +472,33 @@ A flush callback can be passed to the function to handle any outstanding events. Invocation of this API does not affect the existing port configuration. +Independent Enqueue Capability +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This capability applies to eventdev devices that expects all forwarded events to be +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. +The eventdev device 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. + +This capability only matters 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; + +This code example enables enqueue event reordering inside PMD before the events +are sent to the hardware. If the application is not going to change the enqueue +order, this flag should not be enabled to get better performance. + Stopping the EventDev ~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/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 Eventdev + supports enqueue in any order or specifically in a different order than + dequeue. The feature is intended for eventdevs supporting burst mode. + Applications should use ``RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ`` to enable + 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 that Eventdev + * supports the enqueue in any order or specifically in a different order 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 to the + * underlying hardware device. A flag is provided during the port configuration to + * inform Eventdev PMD that the application intends to use an independent enqueue + * order on a particular port. Note that this capability only matters for 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 independent enqueue + * feature only applies to FORWARD and RELEASE events. New events (op=RTE_EVENT_OP_NEW) + * will be dequeued in the order the application enqueues them and do not 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 queue_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