diff mbox series

[v5,3/8] eventdev: introduce event vector Tx capability

Message ID 20210324050525.4489-4-pbhagavatula@marvell.com (mailing list archive)
State Superseded
Delegated to: Jerin Jacob
Headers show
Series Introduce event vectorization | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Pavan Nikhilesh Bhagavatula March 24, 2021, 5:05 a.m. UTC
From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Introduce event vector transmit capability for event eth
tx adapter.

The capability indicates that the Tx adapter is capable of
transmitting event vectors.
When rte_event_vector::union_valid is set, the Tx adapter should
transmit all the packets to the rte_event_vector::port using the
rte_event_vector::queue.
If rte_event_vector::union_valid is not set then the Tx adapter
should peek into each mbuf to get the destination port and queue
pair.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 doc/guides/prog_guide/event_ethernet_tx_adapter.rst | 12 ++++++++++++
 lib/librte_eventdev/rte_eventdev.h                  |  8 +++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

Comments

Jayatheerthan, Jay March 25, 2021, 8:16 a.m. UTC | #1
> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Wednesday, March 24, 2021 10:35 AM
> To: jerinj@marvell.com; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>; Carrillo, Erik G <erik.g.carrillo@intel.com>; Gujjar,
> Abhinandan S <abhinandan.gujjar@intel.com>; McDaniel, Timothy <timothy.mcdaniel@intel.com>; hemant.agrawal@nxp.com; Van
> Haaren, Harry <harry.van.haaren@intel.com>; mattias.ronnblom <mattias.ronnblom@ericsson.com>; Ma, Liang J
> <liang.j.ma@intel.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> Subject: [dpdk-dev] [PATCH v5 3/8] eventdev: introduce event vector Tx capability
> 
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Introduce event vector transmit capability for event eth
> tx adapter.
> 
> The capability indicates that the Tx adapter is capable of
> transmitting event vectors.
> When rte_event_vector::union_valid is set, the Tx adapter should
> transmit all the packets to the rte_event_vector::port using the
> rte_event_vector::queue.
> If rte_event_vector::union_valid is not set then the Tx adapter
> should peek into each mbuf to get the destination port and queue
> pair.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
>  doc/guides/prog_guide/event_ethernet_tx_adapter.rst | 12 ++++++++++++
>  lib/librte_eventdev/rte_eventdev.h                  |  8 +++++++-
>  2 files changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
> index a8c13e136..87277dcaf 100644
> --- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
> +++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
> @@ -164,3 +164,15 @@ The  ``rte_event_eth_tx_adapter_stats_get()`` function reports counters defined
>  in struct ``rte_event_eth_tx_adapter_stats``. The counter values are the sum of
>  the counts from the eventdev PMD callback if the callback is supported, and
>  the counts maintained by the service function, if one exists.
> +
> +Tx event vectorization
> +~~~~~~~~~~~~~~~~~~~~~~
> +
> +The event device, ethernet device paris which support the capability


Typo: "pairs" instead of "paris".

> +``RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR`` can process event vector of mbufs.
> +Additionally, application can provide a hint to that Tx adapter that all the


Typo: "hint to the Tx adapter" instead of "hint to that Tx adapter"

> +mbufs are destined to the same ethernet port and queue by setting the bit
> +``rte_event_vector::attr_valid`` and filling `rte_event_vector::port`` and
> +``rte_event_vector::queue``.
> +If ``rte_event_vector::attr_valid`` is not set then the Tx adapter should peek
> +into each mbuf and transmit them to the requested ethernet port and queue pair.
> diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
> index 678338247..67b681ef6 100644
> --- a/lib/librte_eventdev/rte_eventdev.h
> +++ b/lib/librte_eventdev/rte_eventdev.h
> @@ -927,11 +927,13 @@ struct rte_event_vector {
>  	/**< Indicates that the below union attributes have valid information.
>  	 */
>  	union {
> -		/* Used by Rx adapter.
> +		/* Used by Rx/Tx adapter.
>  		 * Indicates that all the elements in this vector belong to the
>  		 * same port and queue pair when originating from Rx adapter,
>  		 * valid only when event type is ETHDEV_VECTOR or
>  		 * ETH_RX_ADAPTER_VECTOR.
> +		 * Can also be used to indicate the Tx adapter the destination
> +		 * port and queue of the mbufs in the vector
>  		 */
>  		struct {
>  			uint16_t port;
> @@ -1293,6 +1295,10 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
>  #define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT	0x1
>  /**< This flag is sent when the PMD supports a packet transmit callback
>   */
> +#define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR	0x2
> +/**< Indicates that the Tx adapter is capable of handling event vector of
> + * mbufs.
> + */
> 
>  /**
>   * Retrieve the event device's eth Tx adapter capabilities
> --
> 2.17.1

With above changes, you can add Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>.
diff mbox series

Patch

diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
index a8c13e136..87277dcaf 100644
--- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
@@ -164,3 +164,15 @@  The  ``rte_event_eth_tx_adapter_stats_get()`` function reports counters defined
 in struct ``rte_event_eth_tx_adapter_stats``. The counter values are the sum of
 the counts from the eventdev PMD callback if the callback is supported, and
 the counts maintained by the service function, if one exists.
+
+Tx event vectorization
+~~~~~~~~~~~~~~~~~~~~~~
+
+The event device, ethernet device paris which support the capability
+``RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR`` can process event vector of mbufs.
+Additionally, application can provide a hint to that Tx adapter that all the
+mbufs are destined to the same ethernet port and queue by setting the bit
+``rte_event_vector::attr_valid`` and filling `rte_event_vector::port`` and
+``rte_event_vector::queue``.
+If ``rte_event_vector::attr_valid`` is not set then the Tx adapter should peek
+into each mbuf and transmit them to the requested ethernet port and queue pair.
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index 678338247..67b681ef6 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -927,11 +927,13 @@  struct rte_event_vector {
 	/**< Indicates that the below union attributes have valid information.
 	 */
 	union {
-		/* Used by Rx adapter.
+		/* Used by Rx/Tx adapter.
 		 * Indicates that all the elements in this vector belong to the
 		 * same port and queue pair when originating from Rx adapter,
 		 * valid only when event type is ETHDEV_VECTOR or
 		 * ETH_RX_ADAPTER_VECTOR.
+		 * Can also be used to indicate the Tx adapter the destination
+		 * port and queue of the mbufs in the vector
 		 */
 		struct {
 			uint16_t port;
@@ -1293,6 +1295,10 @@  rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT	0x1
 /**< This flag is sent when the PMD supports a packet transmit callback
  */
+#define RTE_EVENT_ETH_TX_ADAPTER_CAP_EVENT_VECTOR	0x2
+/**< Indicates that the Tx adapter is capable of handling event vector of
+ * mbufs.
+ */
 
 /**
  * Retrieve the event device's eth Tx adapter capabilities