DPDK patches and discussions
 help / color / mirror / Atom feed
* [RFC PATCH] eventdev: adapter API to configure multiple Rx queues
@ 2024-12-19  7:31 Shijith Thotton
  2024-12-19  7:40 ` Shijith Thotton
  0 siblings, 1 reply; 4+ messages in thread
From: Shijith Thotton @ 2024-12-19  7:31 UTC (permalink / raw)
  To: dev; +Cc: Shijith Thotton, Pavan Nikhilesh, Jerin Jacob, Naga Harish K S V

This RFC introduces a new API, rte_event_eth_rx_adapter_queues_add(),
designed to enhance the flexibility of configuring multiple Rx queues
in eventdev Rx adapter.

The existing rte_event_eth_rx_adapter_queue_add() API supports adding
multiple queues by specifying rx_queue_id = -1, but it lacks the ability
to apply specific configurations to each of the added queues.

The proposed API, rte_event_eth_rx_adapter_queues_add, addresses this
limitation by:

- Enabling users to specify an array of rx_queue_id values alongside
  individual configurations for each queue.

- Supporting a nb_rx_queues argument to define the number of queues to
  configure. When set to 0, the API applies a common configuration to
  all queues, similar to the existing rx_queue_id = -1 behavior.

This enhancement allows for more granular control when configuring
multiple Rx queues. Additionally, the API can act as a replacement for
the older API, offering both flexibility and improved functionality.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 lib/eventdev/eventdev_pmd.h             | 34 +++++++++++++++++++++++++
 lib/eventdev/rte_event_eth_rx_adapter.h | 34 +++++++++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 36148f8d86..2e458a9779 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -25,6 +25,7 @@
 #include <rte_mbuf_dyn.h>
 
 #include "event_timer_adapter_pmd.h"
+#include "rte_event_eth_rx_adapter.h"
 #include "rte_eventdev.h"
 
 #ifdef __cplusplus
@@ -708,6 +709,37 @@ typedef int (*eventdev_eth_rx_adapter_queue_add_t)(
 		int32_t rx_queue_id,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+/**
+ * Add ethernet Rx queues to event device. This callback is invoked if
+ * the caps returned from rte_eventdev_eth_rx_adapter_caps_get(, eth_port_id)
+ * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
+ *
+ * @param dev
+ *   Event device pointer
+ *
+ * @param eth_dev
+ *   Ethernet device pointer
+ *
+ * @param rx_queue_id
+ *   Ethernet device receive queue index array
+ *
+ * @param queue_conf
+ *   Additional configuration structure array
+ *
+ * @param nb_rx_queues
+ *   Number of ethernet device receive queues
+ *
+ * @return
+ *   - 0: Success, ethernet receive queues added successfully.
+ *   - <0: Error code returned by the driver function.
+ */
+typedef int (*eventdev_eth_rx_adapter_queues_add_t)(
+		const struct rte_eventdev *dev,
+		const struct rte_eth_dev *eth_dev,
+		int32_t rx_queue_id[],
+		const struct rte_event_eth_rx_adapter_queue_conf queue_conf[],
+		uint16_t nb_rx_queues);
+
 /**
  * Delete ethernet Rx queues from event device. This callback is invoked if
  * the caps returned from eventdev_eth_rx_adapter_caps_get(, eth_port_id)
@@ -1578,6 +1610,8 @@ struct eventdev_ops {
 	/**< Get ethernet Rx adapter capabilities */
 	eventdev_eth_rx_adapter_queue_add_t eth_rx_adapter_queue_add;
 	/**< Add Rx queues to ethernet Rx adapter */
+	eventdev_eth_rx_adapter_queues_add_t eth_rx_adapter_queues_add;
+	/**< Add Rx queues to ethernet Rx adapter */
 	eventdev_eth_rx_adapter_queue_del_t eth_rx_adapter_queue_del;
 	/**< Delete Rx queues from ethernet Rx adapter */
 	eventdev_eth_rx_adapter_queue_conf_get_t eth_rx_adapter_queue_conf_get;
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index 9237e198a7..9a5c560b67 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -553,6 +553,40 @@ int rte_event_eth_rx_adapter_queue_add(uint8_t id,
 			int32_t rx_queue_id,
 			const struct rte_event_eth_rx_adapter_queue_conf *conf);
 
+/**
+ * Add multiple receive queues to an event adapter.
+ *
+ * @param id
+ *  Adapter identifier.
+ *
+ * @param eth_dev_id
+ *  Port identifier of Ethernet device.
+ *
+ * @param rx_queue_id
+ *  Array of Ethernet device receive queue indices.
+ *  If nb_rx_queues is 0, then rx_queue_id is ignored.
+ *
+ * @param conf
+ *  Array of additional configuration structures of type
+ *  *rte_event_eth_rx_adapter_queue_conf*. conf[i] is used for rx_queue_id[i].
+ *  If nb_rx_queues is 0, then conf[0] is used for all Rx queues.
+ *
+ * @param nb_rx_queues
+ *  Number of receive queues to add.
+ *  If nb_rx_queues is 0, then all Rx queues configured for
+ *  the device are added with the same configuration in conf[0].
+ * @see RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ
+ *
+ * @return
+ *  - 0: Success, Receive queues added correctly.
+ *  - <0: Error code on failure.
+ */
+__rte_experimental
+int rte_event_eth_rx_adapter_queues_add(
+			uint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id[],
+			const struct rte_event_eth_rx_adapter_queue_conf conf[],
+			uint16_t nb_rx_queues);
+
 /**
  * Delete receive queue from an event adapter.
  *
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFC PATCH] eventdev: adapter API to configure multiple Rx queues
  2024-12-19  7:31 [RFC PATCH] eventdev: adapter API to configure multiple Rx queues Shijith Thotton
@ 2024-12-19  7:40 ` Shijith Thotton
  0 siblings, 0 replies; 4+ messages in thread
From: Shijith Thotton @ 2024-12-19  7:40 UTC (permalink / raw)
  To: Shijith Thotton, dev
  Cc: Pavan Nikhilesh Bhagavatula, Jerin Jacob, Naga Harish K S V

>This RFC introduces a new API, rte_event_eth_rx_adapter_queues_add(),
>designed to enhance the flexibility of configuring multiple Rx queues
>in eventdev Rx adapter.
>
>The existing rte_event_eth_rx_adapter_queue_add() API supports adding
>multiple queues by specifying rx_queue_id = -1, but it lacks the ability
>to apply specific configurations to each of the added queues.
>
>The proposed API, rte_event_eth_rx_adapter_queues_add, addresses this
>limitation by:
>
>- Enabling users to specify an array of rx_queue_id values alongside
>  individual configurations for each queue.
>
>- Supporting a nb_rx_queues argument to define the number of queues to
>  configure. When set to 0, the API applies a common configuration to
>  all queues, similar to the existing rx_queue_id = -1 behavior.
>
>This enhancement allows for more granular control when configuring
>multiple Rx queues. Additionally, the API can act as a replacement for
>the older API, offering both flexibility and improved functionality.
>
>Signed-off-by: Shijith Thotton <sthotton@marvell.com>
>---
> lib/eventdev/eventdev_pmd.h             | 34 +++++++++++++++++++++++++
> lib/eventdev/rte_event_eth_rx_adapter.h | 34
>+++++++++++++++++++++++++
> 2 files changed, 68 insertions(+)
>
>diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
>index 36148f8d86..2e458a9779 100644
>--- a/lib/eventdev/eventdev_pmd.h
>+++ b/lib/eventdev/eventdev_pmd.h
>@@ -25,6 +25,7 @@
> #include <rte_mbuf_dyn.h>
>
> #include "event_timer_adapter_pmd.h"
>+#include "rte_event_eth_rx_adapter.h"
> #include "rte_eventdev.h"
>
> #ifdef __cplusplus
>@@ -708,6 +709,37 @@ typedef int
>(*eventdev_eth_rx_adapter_queue_add_t)(
> 		int32_t rx_queue_id,
> 		const struct rte_event_eth_rx_adapter_queue_conf
>*queue_conf);
>
>+/**
>+ * Add ethernet Rx queues to event device. This callback is invoked if
>+ * the caps returned from rte_eventdev_eth_rx_adapter_caps_get(,
>eth_port_id)
>+ * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
>+ *
>+ * @param dev
>+ *   Event device pointer
>+ *
>+ * @param eth_dev
>+ *   Ethernet device pointer
>+ *
>+ * @param rx_queue_id
>+ *   Ethernet device receive queue index array
>+ *
>+ * @param queue_conf
>+ *   Additional configuration structure array
>+ *
>+ * @param nb_rx_queues
>+ *   Number of ethernet device receive queues
>+ *
>+ * @return
>+ *   - 0: Success, ethernet receive queues added successfully.
>+ *   - <0: Error code returned by the driver function.
>+ */
>+typedef int (*eventdev_eth_rx_adapter_queues_add_t)(
>+		const struct rte_eventdev *dev,
>+		const struct rte_eth_dev *eth_dev,
>+		int32_t rx_queue_id[],
>+		const struct rte_event_eth_rx_adapter_queue_conf
>queue_conf[],
>+		uint16_t nb_rx_queues);
>+
> /**
>  * Delete ethernet Rx queues from event device. This callback is invoked if
>  * the caps returned from eventdev_eth_rx_adapter_caps_get(, eth_port_id)
>@@ -1578,6 +1610,8 @@ struct eventdev_ops {
> 	/**< Get ethernet Rx adapter capabilities */
> 	eventdev_eth_rx_adapter_queue_add_t eth_rx_adapter_queue_add;
> 	/**< Add Rx queues to ethernet Rx adapter */
>+	eventdev_eth_rx_adapter_queues_add_t eth_rx_adapter_queues_add;
>+	/**< Add Rx queues to ethernet Rx adapter */
> 	eventdev_eth_rx_adapter_queue_del_t eth_rx_adapter_queue_del;
> 	/**< Delete Rx queues from ethernet Rx adapter */
> 	eventdev_eth_rx_adapter_queue_conf_get_t
>eth_rx_adapter_queue_conf_get;
>diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h
>b/lib/eventdev/rte_event_eth_rx_adapter.h
>index 9237e198a7..9a5c560b67 100644
>--- a/lib/eventdev/rte_event_eth_rx_adapter.h
>+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
>@@ -553,6 +553,40 @@ int rte_event_eth_rx_adapter_queue_add(uint8_t id,
> 			int32_t rx_queue_id,
> 			const struct rte_event_eth_rx_adapter_queue_conf
>*conf);
>
>+/**
>+ * Add multiple receive queues to an event adapter.
>+ *
>+ * @param id
>+ *  Adapter identifier.
>+ *
>+ * @param eth_dev_id
>+ *  Port identifier of Ethernet device.
>+ *
>+ * @param rx_queue_id
>+ *  Array of Ethernet device receive queue indices.
>+ *  If nb_rx_queues is 0, then rx_queue_id is ignored.
>+ *
>+ * @param conf
>+ *  Array of additional configuration structures of type
>+ *  *rte_event_eth_rx_adapter_queue_conf*. conf[i] is used for
>rx_queue_id[i].
>+ *  If nb_rx_queues is 0, then conf[0] is used for all Rx queues.
>+ *
>+ * @param nb_rx_queues
>+ *  Number of receive queues to add.
>+ *  If nb_rx_queues is 0, then all Rx queues configured for
>+ *  the device are added with the same configuration in conf[0].
>+ * @see RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ
>+ *
>+ * @return
>+ *  - 0: Success, Receive queues added correctly.
>+ *  - <0: Error code on failure.
>+ */
>+__rte_experimental
>+int rte_event_eth_rx_adapter_queues_add(
>+			uint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id[],
>+			const struct rte_event_eth_rx_adapter_queue_conf
>conf[],
>+			uint16_t nb_rx_queues);
>+
> /**
>  * Delete receive queue from an event adapter.
>  *
>--
>2.25.1

Please Ignore this patch. . It has been resent after adding all maintainers.
https://lore.kernel.org/dpdk-dev/20241219073405.1724200-1-sthotton@marvell.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFC PATCH] eventdev: adapter API to configure multiple Rx queues
  2024-12-19  7:34 Shijith Thotton
@ 2024-12-22 16:28 ` Naga Harish K, S V
  0 siblings, 0 replies; 4+ messages in thread
From: Naga Harish K, S V @ 2024-12-22 16:28 UTC (permalink / raw)
  To: Shijith Thotton, dev
  Cc: Pavan Nikhilesh, Pathak, Pravin, Hemant Agrawal, Sachin Saxena,
	Mattias R_nnblom, Jerin Jacob, Liang Ma, Mccarthy, Peter,
	Van Haaren, Harry, Carrillo, Erik G, Gujjar, Abhinandan S,
	Amit Prakash Shukla, Burakov, Anatoly



> -----Original Message-----
> From: Shijith Thotton <sthotton@marvell.com>
> Sent: Thursday, December 19, 2024 1:04 PM
> To: dev@dpdk.org
> Cc: Shijith Thotton <sthotton@marvell.com>; Pavan Nikhilesh
> <pbhagavatula@marvell.com>; Pathak, Pravin <pravin.pathak@intel.com>;
> Hemant Agrawal <hemant.agrawal@nxp.com>; Sachin Saxena
> <sachin.saxena@nxp.com>; Mattias R_nnblom
> <mattias.ronnblom@ericsson.com>; Jerin Jacob <jerinj@marvell.com>; Liang
> Ma <liangma@liangbit.com>; Mccarthy, Peter <Peter.Mccarthy@intel.com>;
> Van Haaren, Harry <harry.van.haaren@intel.com>; Carrillo, Erik G
> <Erik.G.Carrillo@intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Amit Prakash Shukla
> <amitprakashs@marvell.com>; Naga Harish K, S V
> <s.v.naga.harish.k@intel.com>; Burakov, Anatoly
> <anatoly.burakov@intel.com>
> Subject: [RFC PATCH] eventdev: adapter API to configure multiple Rx queues
> 
> This RFC introduces a new API, rte_event_eth_rx_adapter_queues_add(),
> designed to enhance the flexibility of configuring multiple Rx queues in
> eventdev Rx adapter.
> 
> The existing rte_event_eth_rx_adapter_queue_add() API supports adding
> multiple queues by specifying rx_queue_id = -1, but it lacks the ability to apply
> specific configurations to each of the added queues.
> 

The application can still use the existing rte_event_eth_rx_adapter_queue_add() API
in a loop with different configurations for different queues.

The proposed API is not enabling new features that cannot be achieved with the existing API.
Adding new APIs without much usefulness causes unnecessary complexity/confusion for users.

> The proposed API, rte_event_eth_rx_adapter_queues_add, addresses this
> limitation by:
> 
> - Enabling users to specify an array of rx_queue_id values alongside
>   individual configurations for each queue.
> 
> - Supporting a nb_rx_queues argument to define the number of queues to
>   configure. When set to 0, the API applies a common configuration to
>   all queues, similar to the existing rx_queue_id = -1 behavior.
> 
> This enhancement allows for more granular control when configuring multiple
> Rx queues. Additionally, the API can act as a replacement for the older API,
> offering both flexibility and improved functionality.
> 
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>
> ---
>  lib/eventdev/eventdev_pmd.h             | 34 +++++++++++++++++++++++++
>  lib/eventdev/rte_event_eth_rx_adapter.h | 34
> +++++++++++++++++++++++++
>  2 files changed, 68 insertions(+)
> 
> diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
> index 36148f8d86..2e458a9779 100644
> --- a/lib/eventdev/eventdev_pmd.h
> +++ b/lib/eventdev/eventdev_pmd.h
> @@ -25,6 +25,7 @@
>  #include <rte_mbuf_dyn.h>
> 
>  #include "event_timer_adapter_pmd.h"
> +#include "rte_event_eth_rx_adapter.h"
>  #include "rte_eventdev.h"
> 
>  #ifdef __cplusplus
> @@ -708,6 +709,37 @@ typedef int
> (*eventdev_eth_rx_adapter_queue_add_t)(
>  		int32_t rx_queue_id,
>  		const struct rte_event_eth_rx_adapter_queue_conf
> *queue_conf);
> 
> +/**
> + * Add ethernet Rx queues to event device. This callback is invoked if
> + * the caps returned from rte_eventdev_eth_rx_adapter_caps_get(,
> +eth_port_id)
> + * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
> + *
> + * @param dev
> + *   Event device pointer
> + *
> + * @param eth_dev
> + *   Ethernet device pointer
> + *
> + * @param rx_queue_id
> + *   Ethernet device receive queue index array
> + *
> + * @param queue_conf
> + *   Additional configuration structure array
> + *
> + * @param nb_rx_queues
> + *   Number of ethernet device receive queues
> + *
> + * @return
> + *   - 0: Success, ethernet receive queues added successfully.
> + *   - <0: Error code returned by the driver function.
> + */
> +typedef int (*eventdev_eth_rx_adapter_queues_add_t)(
> +		const struct rte_eventdev *dev,
> +		const struct rte_eth_dev *eth_dev,
> +		int32_t rx_queue_id[],
> +		const struct rte_event_eth_rx_adapter_queue_conf
> queue_conf[],
> +		uint16_t nb_rx_queues);
> +
>  /**
>   * Delete ethernet Rx queues from event device. This callback is invoked if
>   * the caps returned from eventdev_eth_rx_adapter_caps_get(, eth_port_id)
> @@ -1578,6 +1610,8 @@ struct eventdev_ops {
>  	/**< Get ethernet Rx adapter capabilities */
>  	eventdev_eth_rx_adapter_queue_add_t eth_rx_adapter_queue_add;
>  	/**< Add Rx queues to ethernet Rx adapter */
> +	eventdev_eth_rx_adapter_queues_add_t
> eth_rx_adapter_queues_add;
> +	/**< Add Rx queues to ethernet Rx adapter */
>  	eventdev_eth_rx_adapter_queue_del_t eth_rx_adapter_queue_del;
>  	/**< Delete Rx queues from ethernet Rx adapter */
>  	eventdev_eth_rx_adapter_queue_conf_get_t
> eth_rx_adapter_queue_conf_get; diff --git
> a/lib/eventdev/rte_event_eth_rx_adapter.h
> b/lib/eventdev/rte_event_eth_rx_adapter.h
> index 9237e198a7..9a5c560b67 100644
> --- a/lib/eventdev/rte_event_eth_rx_adapter.h
> +++ b/lib/eventdev/rte_event_eth_rx_adapter.h
> @@ -553,6 +553,40 @@ int rte_event_eth_rx_adapter_queue_add(uint8_t
> id,
>  			int32_t rx_queue_id,
>  			const struct rte_event_eth_rx_adapter_queue_conf
> *conf);
> 
> +/**
> + * Add multiple receive queues to an event adapter.
> + *
> + * @param id
> + *  Adapter identifier.
> + *
> + * @param eth_dev_id
> + *  Port identifier of Ethernet device.
> + *
> + * @param rx_queue_id
> + *  Array of Ethernet device receive queue indices.
> + *  If nb_rx_queues is 0, then rx_queue_id is ignored.
> + *
> + * @param conf
> + *  Array of additional configuration structures of type
> + *  *rte_event_eth_rx_adapter_queue_conf*. conf[i] is used for
> rx_queue_id[i].
> + *  If nb_rx_queues is 0, then conf[0] is used for all Rx queues.
> + *
> + * @param nb_rx_queues
> + *  Number of receive queues to add.
> + *  If nb_rx_queues is 0, then all Rx queues configured for
> + *  the device are added with the same configuration in conf[0].
> + * @see RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ
> + *
> + * @return
> + *  - 0: Success, Receive queues added correctly.
> + *  - <0: Error code on failure.
> + */
> +__rte_experimental
> +int rte_event_eth_rx_adapter_queues_add(
> +			uint8_t id, uint16_t eth_dev_id, int32_t
> rx_queue_id[],
> +			const struct rte_event_eth_rx_adapter_queue_conf
> conf[],
> +			uint16_t nb_rx_queues);
> +
>  /**
>   * Delete receive queue from an event adapter.
>   *
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RFC PATCH] eventdev: adapter API to configure multiple Rx queues
@ 2024-12-19  7:34 Shijith Thotton
  2024-12-22 16:28 ` Naga Harish K, S V
  0 siblings, 1 reply; 4+ messages in thread
From: Shijith Thotton @ 2024-12-19  7:34 UTC (permalink / raw)
  To: dev
  Cc: Shijith Thotton, Pavan Nikhilesh, Pravin Pathak, Hemant Agrawal,
	Sachin Saxena, Mattias R_nnblom, Jerin Jacob, Liang Ma,
	Peter Mccarthy, Harry van Haaren, Erik Gabriel Carrillo,
	Abhinandan Gujjar, Amit Prakash Shukla, Naga Harish K S V,
	Anatoly Burakov

This RFC introduces a new API, rte_event_eth_rx_adapter_queues_add(),
designed to enhance the flexibility of configuring multiple Rx queues
in eventdev Rx adapter.

The existing rte_event_eth_rx_adapter_queue_add() API supports adding
multiple queues by specifying rx_queue_id = -1, but it lacks the ability
to apply specific configurations to each of the added queues.

The proposed API, rte_event_eth_rx_adapter_queues_add, addresses this
limitation by:

- Enabling users to specify an array of rx_queue_id values alongside
  individual configurations for each queue.

- Supporting a nb_rx_queues argument to define the number of queues to
  configure. When set to 0, the API applies a common configuration to
  all queues, similar to the existing rx_queue_id = -1 behavior.

This enhancement allows for more granular control when configuring
multiple Rx queues. Additionally, the API can act as a replacement for
the older API, offering both flexibility and improved functionality.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 lib/eventdev/eventdev_pmd.h             | 34 +++++++++++++++++++++++++
 lib/eventdev/rte_event_eth_rx_adapter.h | 34 +++++++++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 36148f8d86..2e458a9779 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -25,6 +25,7 @@
 #include <rte_mbuf_dyn.h>
 
 #include "event_timer_adapter_pmd.h"
+#include "rte_event_eth_rx_adapter.h"
 #include "rte_eventdev.h"
 
 #ifdef __cplusplus
@@ -708,6 +709,37 @@ typedef int (*eventdev_eth_rx_adapter_queue_add_t)(
 		int32_t rx_queue_id,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+/**
+ * Add ethernet Rx queues to event device. This callback is invoked if
+ * the caps returned from rte_eventdev_eth_rx_adapter_caps_get(, eth_port_id)
+ * has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
+ *
+ * @param dev
+ *   Event device pointer
+ *
+ * @param eth_dev
+ *   Ethernet device pointer
+ *
+ * @param rx_queue_id
+ *   Ethernet device receive queue index array
+ *
+ * @param queue_conf
+ *   Additional configuration structure array
+ *
+ * @param nb_rx_queues
+ *   Number of ethernet device receive queues
+ *
+ * @return
+ *   - 0: Success, ethernet receive queues added successfully.
+ *   - <0: Error code returned by the driver function.
+ */
+typedef int (*eventdev_eth_rx_adapter_queues_add_t)(
+		const struct rte_eventdev *dev,
+		const struct rte_eth_dev *eth_dev,
+		int32_t rx_queue_id[],
+		const struct rte_event_eth_rx_adapter_queue_conf queue_conf[],
+		uint16_t nb_rx_queues);
+
 /**
  * Delete ethernet Rx queues from event device. This callback is invoked if
  * the caps returned from eventdev_eth_rx_adapter_caps_get(, eth_port_id)
@@ -1578,6 +1610,8 @@ struct eventdev_ops {
 	/**< Get ethernet Rx adapter capabilities */
 	eventdev_eth_rx_adapter_queue_add_t eth_rx_adapter_queue_add;
 	/**< Add Rx queues to ethernet Rx adapter */
+	eventdev_eth_rx_adapter_queues_add_t eth_rx_adapter_queues_add;
+	/**< Add Rx queues to ethernet Rx adapter */
 	eventdev_eth_rx_adapter_queue_del_t eth_rx_adapter_queue_del;
 	/**< Delete Rx queues from ethernet Rx adapter */
 	eventdev_eth_rx_adapter_queue_conf_get_t eth_rx_adapter_queue_conf_get;
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index 9237e198a7..9a5c560b67 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -553,6 +553,40 @@ int rte_event_eth_rx_adapter_queue_add(uint8_t id,
 			int32_t rx_queue_id,
 			const struct rte_event_eth_rx_adapter_queue_conf *conf);
 
+/**
+ * Add multiple receive queues to an event adapter.
+ *
+ * @param id
+ *  Adapter identifier.
+ *
+ * @param eth_dev_id
+ *  Port identifier of Ethernet device.
+ *
+ * @param rx_queue_id
+ *  Array of Ethernet device receive queue indices.
+ *  If nb_rx_queues is 0, then rx_queue_id is ignored.
+ *
+ * @param conf
+ *  Array of additional configuration structures of type
+ *  *rte_event_eth_rx_adapter_queue_conf*. conf[i] is used for rx_queue_id[i].
+ *  If nb_rx_queues is 0, then conf[0] is used for all Rx queues.
+ *
+ * @param nb_rx_queues
+ *  Number of receive queues to add.
+ *  If nb_rx_queues is 0, then all Rx queues configured for
+ *  the device are added with the same configuration in conf[0].
+ * @see RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ
+ *
+ * @return
+ *  - 0: Success, Receive queues added correctly.
+ *  - <0: Error code on failure.
+ */
+__rte_experimental
+int rte_event_eth_rx_adapter_queues_add(
+			uint8_t id, uint16_t eth_dev_id, int32_t rx_queue_id[],
+			const struct rte_event_eth_rx_adapter_queue_conf conf[],
+			uint16_t nb_rx_queues);
+
 /**
  * Delete receive queue from an event adapter.
  *
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-22 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-19  7:31 [RFC PATCH] eventdev: adapter API to configure multiple Rx queues Shijith Thotton
2024-12-19  7:40 ` Shijith Thotton
2024-12-19  7:34 Shijith Thotton
2024-12-22 16:28 ` Naga Harish K, S V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).