* [PATCH v4 2/4] eventdev/eth_tx: change eventdev reconfig logic
2022-12-19 6:28 ` [PATCH v4 " Naga Harish K S V
@ 2022-12-19 6:28 ` Naga Harish K S V
2022-12-19 6:28 ` [PATCH v4 3/4] eventdev/crypto: " Naga Harish K S V
` (4 subsequent siblings)
5 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-19 6:28 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_tx_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_tx adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in doc/prog_guide
v3:
* update doxygen
---
---
.../prog_guide/event_ethernet_tx_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_eth_tx_adapter.c | 2 ++
lib/eventdev/rte_event_eth_tx_adapter.h | 13 +++++++++++++
3 files changed, 32 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
index 905cb445e0..8e6cc87b04 100644
--- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
@@ -56,6 +56,23 @@ and needs to create an event port for it. The callback is expected to fill the
err = rte_event_eth_tx_adapter_create(id, dev_id, &tx_p_conf);
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_tx_adapter_create() is used for creating
+adapter instance, eventdev is reconfigured with additional
+``rte_event_dev_config::nb_event_ports`` parameter.
+This eventdev reconfig logic also increment the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+So the application is no longer need to configure the
+event device with ``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth_tx adapter when the adapter is created
+using above mentioned api.
+
Adding Tx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 88309d2aaa..c780ee1264 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -316,6 +316,8 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (pc->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.h b/lib/eventdev/rte_event_eth_tx_adapter.h
index 645b87b78a..889e09981e 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.h
+++ b/lib/eventdev/rte_event_eth_tx_adapter.h
@@ -142,6 +142,19 @@ struct rte_event_eth_tx_adapter_stats {
/**
* Create a new ethernet Tx adapter with the specified identifier.
*
+ * When this API is used for creating adapter instance, eventdev is
+ * reconfigured with additional ``rte_event_dev_config::nb_event_ports``
+ * parameter during service initialization. This eventdev reconfig logic also
+ * increment the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * So the application is no longer need to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Tx adapter in eventdev configure when
+ * the adapter is created with this api.
+ *
* @param id
* The identifier of the ethernet Tx adapter.
* @param dev_id
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 3/4] eventdev/crypto: change eventdev reconfig logic
2022-12-19 6:28 ` [PATCH v4 " Naga Harish K S V
2022-12-19 6:28 ` [PATCH v4 2/4] eventdev/eth_tx: " Naga Harish K S V
@ 2022-12-19 6:28 ` Naga Harish K S V
2022-12-19 6:28 ` [PATCH v4 4/4] eventdev/timer: " Naga Harish K S V
` (3 subsequent siblings)
5 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-19 6:28 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_crypto_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for crypto adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
---
---
doc/guides/prog_guide/event_crypto_adapter.rst | 16 ++++++++++++++++
lib/eventdev/rte_event_crypto_adapter.c | 3 +++
lib/eventdev/rte_event_crypto_adapter.h | 13 +++++++++++++
3 files changed, 32 insertions(+)
diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst b/doc/guides/prog_guide/event_crypto_adapter.rst
index 554df7e358..7e5dc294f2 100644
--- a/doc/guides/prog_guide/event_crypto_adapter.rst
+++ b/doc/guides/prog_guide/event_crypto_adapter.rst
@@ -159,6 +159,22 @@ which it enqueues events towards the crypto adapter using
nb_events);
}
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_crypto_adapter_create() is used for creating
+adapter instance, eventdev is reconfigured with additional
+``rte_event_dev_config::nb_event_ports`` parameter.
+This eventdev reconfig logic also increment the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+So the application is no longer need to configure the
+event device with ``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for crypto adapter when the adapter is created
+using above mentioned api.
Querying adapter capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 3c585d7b0d..5620a36dd3 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -287,6 +287,9 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", dev_id);
diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_event_crypto_adapter.h
index 83d154a6ce..3994e32bba 100644
--- a/lib/eventdev/rte_event_crypto_adapter.h
+++ b/lib/eventdev/rte_event_crypto_adapter.h
@@ -414,6 +414,19 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_crypto_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance, eventdev is
+ * reconfigured with additional ``rte_event_dev_config::nb_event_ports``
+ * parameter during service initialization. This eventdev reconfig logic also
+ * increment the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * So the application is no longer need to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for crypto adapter in eventdev configure when
+ * the adapter is created with this api.
+ *
* @param id
* Adapter identifier.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic
2022-12-19 6:28 ` [PATCH v4 " Naga Harish K S V
2022-12-19 6:28 ` [PATCH v4 2/4] eventdev/eth_tx: " Naga Harish K S V
2022-12-19 6:28 ` [PATCH v4 3/4] eventdev/crypto: " Naga Harish K S V
@ 2022-12-19 6:28 ` Naga Harish K S V
2022-12-19 17:18 ` Carrillo, Erik G
2022-12-20 8:12 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
` (2 subsequent siblings)
5 siblings, 1 reply; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-19 6:28 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_timer_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for timer adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v4:
* fix programmer guide
---
---
doc/guides/prog_guide/event_timer_adapter.rst | 17 ++++++++++++++
lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
lib/eventdev/rte_event_timer_adapter.h | 13 +++++++++++
3 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
index d7307a29bb..b457c879b0 100644
--- a/doc/guides/prog_guide/event_timer_adapter.rst
+++ b/doc/guides/prog_guide/event_timer_adapter.rst
@@ -139,6 +139,23 @@ This function is passed a callback function that will be invoked if the
adapter needs to create an event port, giving the application the opportunity
to control how it is done.
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_timer_adapter_create() is used for creating
+adapter instance, eventdev is reconfigured with additional
+``rte_event_dev_config::nb_event_ports`` parameter.
+This eventdev reconfig logic also increment the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+So the application is no longer need to configure the
+event device with ``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for timer adapter when the adapter is created
+using above mentioned api.
+
Adapter modes
^^^^^^^^^^^^^
An event timer adapter can be configured in either periodic or non-periodic mode
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index a0f14bf861..5ed233db00 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
+ if (conf_arg != NULL)
+ port_conf = conf_arg;
+ else {
+ port_conf = &def_port_conf;
+ ret = rte_event_port_default_conf_get(dev_id, port_id,
+ port_conf);
+ if (ret < 0)
+ return ret;
+ }
+
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
@@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
return ret;
}
- if (conf_arg != NULL)
- port_conf = conf_arg;
- else {
- port_conf = &def_port_conf;
- ret = rte_event_port_default_conf_get(dev_id, port_id,
- port_conf);
- if (ret < 0)
- return ret;
- }
-
ret = rte_event_port_setup(dev_id, port_id, port_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h
index cd10db19e4..4b757773db 100644
--- a/lib/eventdev/rte_event_timer_adapter.h
+++ b/lib/eventdev/rte_event_timer_adapter.h
@@ -212,6 +212,19 @@ typedef int (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
*
* This function must be invoked first before any other function in the API.
*
+ * When this API is used for creating adapter instance, eventdev is
+ * reconfigured with additional ``rte_event_dev_config::nb_event_ports``
+ * parameter during service initialization. This eventdev reconfig logic also
+ * increment the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * So the application is no longer need to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for Timer adapter in eventdev configure when
+ * the adapter is created with this api.
+ *
* @param conf
* The event timer adapter configuration structure.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic
2022-12-19 6:28 ` [PATCH v4 4/4] eventdev/timer: " Naga Harish K S V
@ 2022-12-19 17:18 ` Carrillo, Erik G
2022-12-20 9:14 ` Naga Harish K, S V
0 siblings, 1 reply; 51+ messages in thread
From: Carrillo, Erik G @ 2022-12-19 17:18 UTC (permalink / raw)
To: Naga Harish K, S V, jerinj, Gujjar, Abhinandan S; +Cc: dev, Jayatheerthan, Jay
Hi Harish,
Adding a couple of comments inline:
> -----Original Message-----
> From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> Sent: Monday, December 19, 2022 12:29 AM
> To: jerinj@marvell.com; Carrillo, Erik G <erik.g.carrillo@intel.com>; Gujjar,
> Abhinandan S <abhinandan.gujjar@intel.com>
> Cc: dev@dpdk.org; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
> Subject: [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic
>
> When rte_event_timer_adapter_create() is used for creating adapter
> instance, eventdev is reconfigured with additional
> ``rte_event_dev_config::nb_event_ports`` parameter.
>
> This eventdev reconfig logic is enhanced to increment the
> ``rte_event_dev_config::nb_single_link_event_port_queues``
> parameter if the adapter event port config is of type
> ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
>
> With this change the application is no longer need to configure the eventdev
> with ``rte_event_dev_config::nb_single_link_event_port_queues``
> parameter required for timer adapter when the adapter is created using
> above mentioned api.
>
> Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> ---
> v2:
> * fix build error in documentation
> v3:
> * update doxygen
> v4:
> * fix programmer guide
> ---
> ---
> doc/guides/prog_guide/event_timer_adapter.rst | 17 ++++++++++++++
> lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
> lib/eventdev/rte_event_timer_adapter.h | 13 +++++++++++
> 3 files changed, 43 insertions(+), 10 deletions(-)
>
> diff --git a/doc/guides/prog_guide/event_timer_adapter.rst
> b/doc/guides/prog_guide/event_timer_adapter.rst
> index d7307a29bb..b457c879b0 100644
> --- a/doc/guides/prog_guide/event_timer_adapter.rst
> +++ b/doc/guides/prog_guide/event_timer_adapter.rst
> @@ -139,6 +139,23 @@ This function is passed a callback function that will be
> invoked if the adapter needs to create an event port, giving the application
> the opportunity to control how it is done.
>
> +Event device configuration for service based adapter
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We can use '^' instead of '~' here to make it a subsection.
> +
> +When rte_event_timer_adapter_create() is used for creating adapter
> +instance, eventdev is reconfigured with additional
> +``rte_event_dev_config::nb_event_ports`` parameter.
How about something along the lines of:
"When rte_event_timer_adapter_create() is used to create an adapter instance, ``rte_event_dev_config::nb_event_ports`` is automatically incremented, and the eventdev is reconfigured with the additional port."
> +This eventdev reconfig logic also increment the
"increments"
> +``rte_event_dev_config::nb_single_link_event_port_queues``
> +parameter if the adapter event port config is of type
> +``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
> +
> +So the application is no longer need to configure the event device with
"application no longer needs"
> +``rte_event_dev_config::nb_event_ports`` and
> +``rte_event_dev_config::nb_single_link_event_port_queues``
> +parameters required for timer adapter when the adapter is created using
> +above mentioned api.
> +
> Adapter modes
> ^^^^^^^^^^^^^
> An event timer adapter can be configured in either periodic or non-periodic
> mode diff --git a/lib/eventdev/rte_event_timer_adapter.c
> b/lib/eventdev/rte_event_timer_adapter.c
> index a0f14bf861..5ed233db00 100644
> --- a/lib/eventdev/rte_event_timer_adapter.c
> +++ b/lib/eventdev/rte_event_timer_adapter.c
> @@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t
> event_dev_id, uint8_t *event_port_id,
> rte_event_dev_stop(dev_id);
>
> port_id = dev_conf.nb_event_ports;
> + if (conf_arg != NULL)
> + port_conf = conf_arg;
> + else {
> + port_conf = &def_port_conf;
> + ret = rte_event_port_default_conf_get(dev_id, port_id,
> + port_conf);
> + if (ret < 0)
> + return ret;
> + }
> +
> dev_conf.nb_event_ports += 1;
> + if (port_conf->event_port_cfg &
> RTE_EVENT_PORT_CFG_SINGLE_LINK)
> + dev_conf.nb_single_link_event_port_queues += 1;
> +
> ret = rte_event_dev_configure(dev_id, &dev_conf);
> if (ret < 0) {
> EVTIM_LOG_ERR("failed to configure event dev %u\n",
> dev_id); @@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t
> event_dev_id, uint8_t *event_port_id,
> return ret;
> }
>
> - if (conf_arg != NULL)
> - port_conf = conf_arg;
> - else {
> - port_conf = &def_port_conf;
> - ret = rte_event_port_default_conf_get(dev_id, port_id,
> - port_conf);
> - if (ret < 0)
> - return ret;
> - }
> -
> ret = rte_event_port_setup(dev_id, port_id, port_conf);
> if (ret < 0) {
> EVTIM_LOG_ERR("failed to setup event port %u on event
> dev %u\n", diff --git a/lib/eventdev/rte_event_timer_adapter.h
> b/lib/eventdev/rte_event_timer_adapter.h
> index cd10db19e4..4b757773db 100644
> --- a/lib/eventdev/rte_event_timer_adapter.h
> +++ b/lib/eventdev/rte_event_timer_adapter.h
> @@ -212,6 +212,19 @@ typedef int
> (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
> *
> * This function must be invoked first before any other function in the API.
> *
> + * When this API is used for creating adapter instance, eventdev is
> + * reconfigured with additional
> + ``rte_event_dev_config::nb_event_ports``
> + * parameter during service initialization. This eventdev reconfig
> + logic also
> + * increment the
> + ``rte_event_dev_config::nb_single_link_event_port_queues``
> + * parameter if the adapter event port config is of type
> + * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
We can update the comment here in the same way that the .rst files above get updated.
Thanks,
Gabriel
> + *
> + * So the application is no longer need to account for
> + * ``rte_event_dev_config::nb_event_ports`` and
> + * ``rte_event_dev_config::nb_single_link_event_port_queues``
> + * parameters required for Timer adapter in eventdev configure when
> + * the adapter is created with this api.
> + *
> * @param conf
> * The event timer adapter configuration structure.
> *
> --
> 2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic
2022-12-19 17:18 ` Carrillo, Erik G
@ 2022-12-20 9:14 ` Naga Harish K, S V
0 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K, S V @ 2022-12-20 9:14 UTC (permalink / raw)
To: Carrillo, Erik G, jerinj, Gujjar, Abhinandan S; +Cc: dev, Jayatheerthan, Jay
Hi Gabe,
> -----Original Message-----
> From: Carrillo, Erik G <erik.g.carrillo@intel.com>
> Sent: Monday, December 19, 2022 10:48 PM
> To: Naga Harish K, S V <s.v.naga.harish.k@intel.com>; jerinj@marvell.com;
> Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> Cc: dev@dpdk.org; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
> Subject: RE: [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic
>
> Hi Harish,
>
> Adding a couple of comments inline:
>
> > -----Original Message-----
> > From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> > Sent: Monday, December 19, 2022 12:29 AM
> > To: jerinj@marvell.com; Carrillo, Erik G <erik.g.carrillo@intel.com>;
> > Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> > Cc: dev@dpdk.org; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
> > Subject: [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic
> >
> > When rte_event_timer_adapter_create() is used for creating adapter
> > instance, eventdev is reconfigured with additional
> > ``rte_event_dev_config::nb_event_ports`` parameter.
> >
> > This eventdev reconfig logic is enhanced to increment the
> > ``rte_event_dev_config::nb_single_link_event_port_queues``
> > parameter if the adapter event port config is of type
> > ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
> >
> > With this change the application is no longer need to configure the
> > eventdev with
> > ``rte_event_dev_config::nb_single_link_event_port_queues``
> > parameter required for timer adapter when the adapter is created using
> > above mentioned api.
> >
> > Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> > Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> > ---
> > v2:
> > * fix build error in documentation
> > v3:
> > * update doxygen
> > v4:
> > * fix programmer guide
> > ---
> > ---
> > doc/guides/prog_guide/event_timer_adapter.rst | 17 ++++++++++++++
> > lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
> > lib/eventdev/rte_event_timer_adapter.h | 13 +++++++++++
> > 3 files changed, 43 insertions(+), 10 deletions(-)
> >
> > diff --git a/doc/guides/prog_guide/event_timer_adapter.rst
> > b/doc/guides/prog_guide/event_timer_adapter.rst
> > index d7307a29bb..b457c879b0 100644
> > --- a/doc/guides/prog_guide/event_timer_adapter.rst
> > +++ b/doc/guides/prog_guide/event_timer_adapter.rst
> > @@ -139,6 +139,23 @@ This function is passed a callback function that
> > will be invoked if the adapter needs to create an event port, giving
> > the application the opportunity to control how it is done.
> >
> > +Event device configuration for service based adapter
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> We can use '^' instead of '~' here to make it a subsection.
>
Updated in v5 of the patch set.
> > +
> > +When rte_event_timer_adapter_create() is used for creating adapter
> > +instance, eventdev is reconfigured with additional
> > +``rte_event_dev_config::nb_event_ports`` parameter.
>
> How about something along the lines of:
>
> "When rte_event_timer_adapter_create() is used to create an adapter
> instance, ``rte_event_dev_config::nb_event_ports`` is automatically
> incremented, and the eventdev is reconfigured with the additional port."
>
> > +This eventdev reconfig logic also increment the
>
> "increments"
>
Done
> > +``rte_event_dev_config::nb_single_link_event_port_queues``
> > +parameter if the adapter event port config is of type
> > +``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
> > +
> > +So the application is no longer need to configure the event device
> > +with
>
> "application no longer needs"
>
Done
> > +``rte_event_dev_config::nb_event_ports`` and
> > +``rte_event_dev_config::nb_single_link_event_port_queues``
> > +parameters required for timer adapter when the adapter is created
> > +using above mentioned api.
> > +
> > Adapter modes
> > ^^^^^^^^^^^^^
> > An event timer adapter can be configured in either periodic or
> > non-periodic mode diff --git a/lib/eventdev/rte_event_timer_adapter.c
> > b/lib/eventdev/rte_event_timer_adapter.c
> > index a0f14bf861..5ed233db00 100644
> > --- a/lib/eventdev/rte_event_timer_adapter.c
> > +++ b/lib/eventdev/rte_event_timer_adapter.c
> > @@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t
> > event_dev_id, uint8_t *event_port_id,
> > rte_event_dev_stop(dev_id);
> >
> > port_id = dev_conf.nb_event_ports;
> > + if (conf_arg != NULL)
> > + port_conf = conf_arg;
> > + else {
> > + port_conf = &def_port_conf;
> > + ret = rte_event_port_default_conf_get(dev_id, port_id,
> > + port_conf);
> > + if (ret < 0)
> > + return ret;
> > + }
> > +
> > dev_conf.nb_event_ports += 1;
> > + if (port_conf->event_port_cfg &
> > RTE_EVENT_PORT_CFG_SINGLE_LINK)
> > + dev_conf.nb_single_link_event_port_queues += 1;
> > +
> > ret = rte_event_dev_configure(dev_id, &dev_conf);
> > if (ret < 0) {
> > EVTIM_LOG_ERR("failed to configure event dev %u\n",
> dev_id); @@
> > -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t
> > event_dev_id, uint8_t *event_port_id,
> > return ret;
> > }
> >
> > - if (conf_arg != NULL)
> > - port_conf = conf_arg;
> > - else {
> > - port_conf = &def_port_conf;
> > - ret = rte_event_port_default_conf_get(dev_id, port_id,
> > - port_conf);
> > - if (ret < 0)
> > - return ret;
> > - }
> > -
> > ret = rte_event_port_setup(dev_id, port_id, port_conf);
> > if (ret < 0) {
> > EVTIM_LOG_ERR("failed to setup event port %u on event
> dev %u\n",
> > diff --git a/lib/eventdev/rte_event_timer_adapter.h
> > b/lib/eventdev/rte_event_timer_adapter.h
> > index cd10db19e4..4b757773db 100644
> > --- a/lib/eventdev/rte_event_timer_adapter.h
> > +++ b/lib/eventdev/rte_event_timer_adapter.h
> > @@ -212,6 +212,19 @@ typedef int
> > (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
> > *
> > * This function must be invoked first before any other function in the API.
> > *
> > + * When this API is used for creating adapter instance, eventdev is
> > + * reconfigured with additional
> > + ``rte_event_dev_config::nb_event_ports``
> > + * parameter during service initialization. This eventdev reconfig
> > + logic also
> > + * increment the
> > + ``rte_event_dev_config::nb_single_link_event_port_queues``
> > + * parameter if the adapter event port config is of type
> > + * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
>
> We can update the comment here in the same way that the .rst files above
> get updated.
>
Done in V5 patch set
> Thanks,
> Gabriel
>
> > + *
> > + * So the application is no longer need to account for
> > + * ``rte_event_dev_config::nb_event_ports`` and
> > + * ``rte_event_dev_config::nb_single_link_event_port_queues``
> > + * parameters required for Timer adapter in eventdev configure when
> > + * the adapter is created with this api.
> > + *
> > * @param conf
> > * The event timer adapter configuration structure.
> > *
> > --
> > 2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 1/4] eventdev/eth_rx: change eventdev reconfig logic
2022-12-19 6:28 ` [PATCH v4 " Naga Harish K S V
` (2 preceding siblings ...)
2022-12-19 6:28 ` [PATCH v4 4/4] eventdev/timer: " Naga Harish K S V
@ 2022-12-20 8:12 ` Naga Harish K S V
2022-12-20 8:12 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
` (2 more replies)
2022-12-20 9:11 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
2023-01-02 5:14 ` Naga Harish K S V
5 siblings, 3 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-20 8:12 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_rx_adapter_create() or
rte_event_eth_rx_adapter_create_with_params() is used for creating
adapter instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_rx adapter when the adapter is created
using above mentioned apis.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* Fix build error
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
.../prog_guide/event_ethernet_rx_adapter.rst | 19 +++++++++++++++++++
lib/eventdev/rte_event_eth_rx_adapter.c | 3 +++
lib/eventdev/rte_event_eth_rx_adapter.h | 14 ++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
index 116c0a27c6..6f31336865 100644
--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
@@ -71,6 +71,25 @@ set to true. The function is passed the event device to be associated with
the adapter and port configuration for the adapter to setup an event port
if the adapter needs to use a service function.
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_rx_adapter_create() or
+rte_event_eth_rx_adapter_create_with_params() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented and the event device is reconfigured with
+the additional event port during service initialization. This event
+device reconfigure logic also increment the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Rx adapter in the event device configuration,
+when the adapter is created using the above-mentioned APIs.
+
Adding Rx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index cf7bbd4d69..34aa87379e 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1532,6 +1532,9 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n",
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index d0e7d0092c..ebd535b143 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -382,6 +382,20 @@ int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_eth_rx_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increment the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Rx adapter in the event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Rx event adapter.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 2/4] eventdev/eth_tx: change eventdev reconfig logic
2022-12-20 8:12 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
@ 2022-12-20 8:12 ` Naga Harish K S V
2022-12-20 8:12 ` [PATCH v5 3/4] eventdev/crypto: " Naga Harish K S V
2022-12-20 8:12 ` [PATCH v5 4/4] eventdev/timer: " Naga Harish K S V
2 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-20 8:12 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_tx_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_tx adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in doc/prog_guide
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
.../prog_guide/event_ethernet_tx_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_eth_tx_adapter.c | 2 ++
lib/eventdev/rte_event_eth_tx_adapter.h | 14 ++++++++++++++
3 files changed, 33 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
index 905cb445e0..954a3a774f 100644
--- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
@@ -56,6 +56,23 @@ and needs to create an event port for it. The callback is expected to fill the
err = rte_event_eth_tx_adapter_create(id, dev_id, &tx_p_conf);
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_tx_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with additional
+event port during service initialization. This event device reconfigure logic
+also increment the ``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the event device with
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Tx adapter when the adapter is created
+using the above-mentioned API.
+
Adding Tx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 88309d2aaa..c780ee1264 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -316,6 +316,8 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (pc->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.h b/lib/eventdev/rte_event_eth_tx_adapter.h
index 645b87b78a..ab47bfbed6 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.h
+++ b/lib/eventdev/rte_event_eth_tx_adapter.h
@@ -142,6 +142,20 @@ struct rte_event_eth_tx_adapter_stats {
/**
* Create a new ethernet Tx adapter with the specified identifier.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increment the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for the
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Tx adapter in event device configure when
+ * the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Tx adapter.
* @param dev_id
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 3/4] eventdev/crypto: change eventdev reconfig logic
2022-12-20 8:12 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
2022-12-20 8:12 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
@ 2022-12-20 8:12 ` Naga Harish K S V
2022-12-20 8:12 ` [PATCH v5 4/4] eventdev/timer: " Naga Harish K S V
2 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-20 8:12 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_crypto_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for crypto adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
doc/guides/prog_guide/event_crypto_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_crypto_adapter.c | 3 +++
lib/eventdev/rte_event_crypto_adapter.h | 14 ++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst b/doc/guides/prog_guide/event_crypto_adapter.rst
index 554df7e358..5108502cde 100644
--- a/doc/guides/prog_guide/event_crypto_adapter.rst
+++ b/doc/guides/prog_guide/event_crypto_adapter.rst
@@ -159,6 +159,23 @@ which it enqueues events towards the crypto adapter using
nb_events);
}
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_crypto_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and event device is reconfigured with additional
+event port during service initialization. This event device reconfigure
+logic also increment the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the
+event device with ``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for crypto adapter when the adapter is created
+using the above-mentioned API.
Querying adapter capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 3c585d7b0d..5620a36dd3 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -287,6 +287,9 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", dev_id);
diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_event_crypto_adapter.h
index 83d154a6ce..74a614cf54 100644
--- a/lib/eventdev/rte_event_crypto_adapter.h
+++ b/lib/eventdev/rte_event_crypto_adapter.h
@@ -414,6 +414,20 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_crypto_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increment
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for crypto adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* Adapter identifier.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 4/4] eventdev/timer: change eventdev reconfig logic
2022-12-20 8:12 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
2022-12-20 8:12 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
2022-12-20 8:12 ` [PATCH v5 3/4] eventdev/crypto: " Naga Harish K S V
@ 2022-12-20 8:12 ` Naga Harish K S V
2 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-20 8:12 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_timer_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for timer adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v4:
* fix programmer guide
v5:
* update doxygen as per review comments
---
---
doc/guides/prog_guide/event_timer_adapter.rst | 18 +++++++++++++++
lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
lib/eventdev/rte_event_timer_adapter.h | 14 +++++++++++
3 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
index d7307a29bb..a8886790d1 100644
--- a/doc/guides/prog_guide/event_timer_adapter.rst
+++ b/doc/guides/prog_guide/event_timer_adapter.rst
@@ -139,6 +139,24 @@ This function is passed a callback function that will be invoked if the
adapter needs to create an event port, giving the application the opportunity
to control how it is done.
+Event device configuration for service based adapter
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When rte_event_timer_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with
+additional event port during service initialization.
+This event device reconfigure logic also increment the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for timer adapter in event device configuration,
+when the adapter is created using the above-mentioned API.
+
Adapter modes
^^^^^^^^^^^^^
An event timer adapter can be configured in either periodic or non-periodic mode
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index a0f14bf861..5ed233db00 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
+ if (conf_arg != NULL)
+ port_conf = conf_arg;
+ else {
+ port_conf = &def_port_conf;
+ ret = rte_event_port_default_conf_get(dev_id, port_id,
+ port_conf);
+ if (ret < 0)
+ return ret;
+ }
+
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
@@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
return ret;
}
- if (conf_arg != NULL)
- port_conf = conf_arg;
- else {
- port_conf = &def_port_conf;
- ret = rte_event_port_default_conf_get(dev_id, port_id,
- port_conf);
- if (ret < 0)
- return ret;
- }
-
ret = rte_event_port_setup(dev_id, port_id, port_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h
index cd10db19e4..bca5918f23 100644
--- a/lib/eventdev/rte_event_timer_adapter.h
+++ b/lib/eventdev/rte_event_timer_adapter.h
@@ -212,6 +212,20 @@ typedef int (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
*
* This function must be invoked first before any other function in the API.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increment
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for Timer adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param conf
* The event timer adapter configuration structure.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 1/4] eventdev/eth_rx: change eventdev reconfig logic
2022-12-19 6:28 ` [PATCH v4 " Naga Harish K S V
` (3 preceding siblings ...)
2022-12-20 8:12 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
@ 2022-12-20 9:11 ` Naga Harish K S V
2022-12-20 9:11 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
` (3 more replies)
2023-01-02 5:14 ` Naga Harish K S V
5 siblings, 4 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-20 9:11 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_rx_adapter_create() or
rte_event_eth_rx_adapter_create_with_params() is used for creating
adapter instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_rx adapter when the adapter is created
using above mentioned apis.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* Fix build error
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
.../prog_guide/event_ethernet_rx_adapter.rst | 19 +++++++++++++++++++
lib/eventdev/rte_event_eth_rx_adapter.c | 3 +++
lib/eventdev/rte_event_eth_rx_adapter.h | 14 ++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
index 116c0a27c6..bbe278f7db 100644
--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
@@ -71,6 +71,25 @@ set to true. The function is passed the event device to be associated with
the adapter and port configuration for the adapter to setup an event port
if the adapter needs to use a service function.
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_rx_adapter_create() or
+rte_event_eth_rx_adapter_create_with_params() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented and the event device is reconfigured with
+the additional event port during service initialization. This event
+device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Rx adapter in the event device configuration,
+when the adapter is created using the above-mentioned APIs.
+
Adding Rx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index cf7bbd4d69..34aa87379e 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1532,6 +1532,9 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n",
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index d0e7d0092c..f4652f40e8 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -382,6 +382,20 @@ int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_eth_rx_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Rx adapter in the event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Rx event adapter.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 2/4] eventdev/eth_tx: change eventdev reconfig logic
2022-12-20 9:11 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
@ 2022-12-20 9:11 ` Naga Harish K S V
2022-12-20 9:11 ` [PATCH v5 3/4] eventdev/crypto: " Naga Harish K S V
` (2 subsequent siblings)
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-20 9:11 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_tx_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_tx adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in doc/prog_guide
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
.../prog_guide/event_ethernet_tx_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_eth_tx_adapter.c | 2 ++
lib/eventdev/rte_event_eth_tx_adapter.h | 14 ++++++++++++++
3 files changed, 33 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
index 905cb445e0..711ecb7441 100644
--- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
@@ -56,6 +56,23 @@ and needs to create an event port for it. The callback is expected to fill the
err = rte_event_eth_tx_adapter_create(id, dev_id, &tx_p_conf);
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_tx_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with additional
+event port during service initialization. This event device reconfigure logic
+also increments the ``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the event device with
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Tx adapter when the adapter is created
+using the above-mentioned API.
+
Adding Tx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 88309d2aaa..c780ee1264 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -316,6 +316,8 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (pc->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.h b/lib/eventdev/rte_event_eth_tx_adapter.h
index 645b87b78a..cd539af7ef 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.h
+++ b/lib/eventdev/rte_event_eth_tx_adapter.h
@@ -142,6 +142,20 @@ struct rte_event_eth_tx_adapter_stats {
/**
* Create a new ethernet Tx adapter with the specified identifier.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for the
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Tx adapter in event device configure when
+ * the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Tx adapter.
* @param dev_id
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 3/4] eventdev/crypto: change eventdev reconfig logic
2022-12-20 9:11 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
2022-12-20 9:11 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
@ 2022-12-20 9:11 ` Naga Harish K S V
2022-12-20 9:11 ` [PATCH v5 4/4] eventdev/timer: " Naga Harish K S V
2022-12-21 6:03 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K, S V
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-20 9:11 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_crypto_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for crypto adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
doc/guides/prog_guide/event_crypto_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_crypto_adapter.c | 3 +++
lib/eventdev/rte_event_crypto_adapter.h | 14 ++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst b/doc/guides/prog_guide/event_crypto_adapter.rst
index 554df7e358..7c409176d1 100644
--- a/doc/guides/prog_guide/event_crypto_adapter.rst
+++ b/doc/guides/prog_guide/event_crypto_adapter.rst
@@ -159,6 +159,23 @@ which it enqueues events towards the crypto adapter using
nb_events);
}
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_crypto_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and event device is reconfigured with additional
+event port during service initialization. This event device reconfigure
+logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the
+event device with ``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for crypto adapter when the adapter is created
+using the above-mentioned API.
Querying adapter capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 3c585d7b0d..5620a36dd3 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -287,6 +287,9 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", dev_id);
diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_event_crypto_adapter.h
index 83d154a6ce..0c610b8e04 100644
--- a/lib/eventdev/rte_event_crypto_adapter.h
+++ b/lib/eventdev/rte_event_crypto_adapter.h
@@ -414,6 +414,20 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_crypto_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increments
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for crypto adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* Adapter identifier.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 4/4] eventdev/timer: change eventdev reconfig logic
2022-12-20 9:11 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
2022-12-20 9:11 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
2022-12-20 9:11 ` [PATCH v5 3/4] eventdev/crypto: " Naga Harish K S V
@ 2022-12-20 9:11 ` Naga Harish K S V
2022-12-21 6:03 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K, S V
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2022-12-20 9:11 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_timer_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for timer adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v4:
* fix programmer guide
v5:
* update doxygen as per review comments
---
---
doc/guides/prog_guide/event_timer_adapter.rst | 18 +++++++++++++++
lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
lib/eventdev/rte_event_timer_adapter.h | 14 +++++++++++
3 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
index d7307a29bb..b5cd95fef1 100644
--- a/doc/guides/prog_guide/event_timer_adapter.rst
+++ b/doc/guides/prog_guide/event_timer_adapter.rst
@@ -139,6 +139,24 @@ This function is passed a callback function that will be invoked if the
adapter needs to create an event port, giving the application the opportunity
to control how it is done.
+Event device configuration for service based adapter
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When rte_event_timer_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with
+additional event port during service initialization.
+This event device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for timer adapter in event device configuration,
+when the adapter is created using the above-mentioned API.
+
Adapter modes
^^^^^^^^^^^^^
An event timer adapter can be configured in either periodic or non-periodic mode
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index a0f14bf861..5ed233db00 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
+ if (conf_arg != NULL)
+ port_conf = conf_arg;
+ else {
+ port_conf = &def_port_conf;
+ ret = rte_event_port_default_conf_get(dev_id, port_id,
+ port_conf);
+ if (ret < 0)
+ return ret;
+ }
+
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
@@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
return ret;
}
- if (conf_arg != NULL)
- port_conf = conf_arg;
- else {
- port_conf = &def_port_conf;
- ret = rte_event_port_default_conf_get(dev_id, port_id,
- port_conf);
- if (ret < 0)
- return ret;
- }
-
ret = rte_event_port_setup(dev_id, port_id, port_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h
index cd10db19e4..e21588bede 100644
--- a/lib/eventdev/rte_event_timer_adapter.h
+++ b/lib/eventdev/rte_event_timer_adapter.h
@@ -212,6 +212,20 @@ typedef int (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
*
* This function must be invoked first before any other function in the API.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increments
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for Timer adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param conf
* The event timer adapter configuration structure.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v5 1/4] eventdev/eth_rx: change eventdev reconfig logic
2022-12-20 9:11 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
` (2 preceding siblings ...)
2022-12-20 9:11 ` [PATCH v5 4/4] eventdev/timer: " Naga Harish K S V
@ 2022-12-21 6:03 ` Naga Harish K, S V
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K, S V @ 2022-12-21 6:03 UTC (permalink / raw)
To: jerinj, Carrillo, Erik G, Gujjar, Abhinandan S; +Cc: dev, Jayatheerthan, Jay
[-- Attachment #1: Type: text/plain, Size: 5189 bytes --]
Hi Jerin,
Can you please provide your input/feedback for this patch set?
-Harish
________________________________
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Sent: Tuesday, December 20, 2022 2:41 PM
To: jerinj@marvell.com <jerinj@marvell.com>; Carrillo, Erik G <Erik.G.Carrillo@intel.com>; Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
Cc: dev@dpdk.org <dev@dpdk.org>; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
Subject: [PATCH v5 1/4] eventdev/eth_rx: change eventdev reconfig logic
When rte_event_eth_rx_adapter_create() or
rte_event_eth_rx_adapter_create_with_params() is used for creating
adapter instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_rx adapter when the adapter is created
using above mentioned apis.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* Fix build error
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
.../prog_guide/event_ethernet_rx_adapter.rst | 19 +++++++++++++++++++
lib/eventdev/rte_event_eth_rx_adapter.c | 3 +++
lib/eventdev/rte_event_eth_rx_adapter.h | 14 ++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
index 116c0a27c6..bbe278f7db 100644
--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
@@ -71,6 +71,25 @@ set to true. The function is passed the event device to be associated with
the adapter and port configuration for the adapter to setup an event port
if the adapter needs to use a service function.
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_rx_adapter_create() or
+rte_event_eth_rx_adapter_create_with_params() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented and the event device is reconfigured with
+the additional event port during service initialization. This event
+device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Rx adapter in the event device configuration,
+when the adapter is created using the above-mentioned APIs.
+
Adding Rx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index cf7bbd4d69..34aa87379e 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1532,6 +1532,9 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n",
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index d0e7d0092c..f4652f40e8 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -382,6 +382,20 @@ int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_eth_rx_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Rx adapter in the event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Rx event adapter.
*
--
2.25.1
[-- Attachment #2: Type: text/html, Size: 7481 bytes --]
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 1/4] eventdev/eth_rx: change eventdev reconfig logic
2022-12-19 6:28 ` [PATCH v4 " Naga Harish K S V
` (4 preceding siblings ...)
2022-12-20 9:11 ` [PATCH v5 1/4] eventdev/eth_rx: " Naga Harish K S V
@ 2023-01-02 5:14 ` Naga Harish K S V
2023-01-02 5:14 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
` (3 more replies)
5 siblings, 4 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-02 5:14 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_rx_adapter_create() or
rte_event_eth_rx_adapter_create_with_params() is used for creating
adapter instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_rx adapter when the adapter is created
using above mentioned apis.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* Fix build error
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
.../prog_guide/event_ethernet_rx_adapter.rst | 19 +++++++++++++++++++
lib/eventdev/rte_event_eth_rx_adapter.c | 3 +++
lib/eventdev/rte_event_eth_rx_adapter.h | 14 ++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
index 116c0a27c6..bbe278f7db 100644
--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
@@ -71,6 +71,25 @@ set to true. The function is passed the event device to be associated with
the adapter and port configuration for the adapter to setup an event port
if the adapter needs to use a service function.
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_rx_adapter_create() or
+rte_event_eth_rx_adapter_create_with_params() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented and the event device is reconfigured with
+the additional event port during service initialization. This event
+device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Rx adapter in the event device configuration,
+when the adapter is created using the above-mentioned APIs.
+
Adding Rx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index cf7bbd4d69..34aa87379e 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1532,6 +1532,9 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n",
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index d0e7d0092c..f4652f40e8 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -382,6 +382,20 @@ int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_eth_rx_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Rx adapter in the event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Rx event adapter.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 2/4] eventdev/eth_tx: change eventdev reconfig logic
2023-01-02 5:14 ` Naga Harish K S V
@ 2023-01-02 5:14 ` Naga Harish K S V
2023-01-02 5:14 ` [PATCH v5 3/4] eventdev/crypto: " Naga Harish K S V
` (2 subsequent siblings)
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-02 5:14 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_tx_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_tx adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in doc/prog_guide
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
.../prog_guide/event_ethernet_tx_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_eth_tx_adapter.c | 2 ++
lib/eventdev/rte_event_eth_tx_adapter.h | 14 ++++++++++++++
3 files changed, 33 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
index 905cb445e0..711ecb7441 100644
--- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
@@ -56,6 +56,23 @@ and needs to create an event port for it. The callback is expected to fill the
err = rte_event_eth_tx_adapter_create(id, dev_id, &tx_p_conf);
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_tx_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with additional
+event port during service initialization. This event device reconfigure logic
+also increments the ``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the event device with
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Tx adapter when the adapter is created
+using the above-mentioned API.
+
Adding Tx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 88309d2aaa..c780ee1264 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -316,6 +316,8 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (pc->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.h b/lib/eventdev/rte_event_eth_tx_adapter.h
index 645b87b78a..cd539af7ef 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.h
+++ b/lib/eventdev/rte_event_eth_tx_adapter.h
@@ -142,6 +142,20 @@ struct rte_event_eth_tx_adapter_stats {
/**
* Create a new ethernet Tx adapter with the specified identifier.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for the
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Tx adapter in event device configure when
+ * the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Tx adapter.
* @param dev_id
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 3/4] eventdev/crypto: change eventdev reconfig logic
2023-01-02 5:14 ` Naga Harish K S V
2023-01-02 5:14 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
@ 2023-01-02 5:14 ` Naga Harish K S V
2023-01-02 5:14 ` [PATCH v5 4/4] eventdev/timer: " Naga Harish K S V
2023-01-04 6:41 ` [PATCH v6 1/4] eventdev/eth_rx: " Naga Harish K S V
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-02 5:14 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_crypto_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for crypto adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v5:
* update doxygen as per review comments
---
---
doc/guides/prog_guide/event_crypto_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_crypto_adapter.c | 3 +++
lib/eventdev/rte_event_crypto_adapter.h | 14 ++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst b/doc/guides/prog_guide/event_crypto_adapter.rst
index 554df7e358..7c409176d1 100644
--- a/doc/guides/prog_guide/event_crypto_adapter.rst
+++ b/doc/guides/prog_guide/event_crypto_adapter.rst
@@ -159,6 +159,23 @@ which it enqueues events towards the crypto adapter using
nb_events);
}
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_crypto_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and event device is reconfigured with additional
+event port during service initialization. This event device reconfigure
+logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the
+event device with ``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for crypto adapter when the adapter is created
+using the above-mentioned API.
Querying adapter capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 3c585d7b0d..5620a36dd3 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -287,6 +287,9 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", dev_id);
diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_event_crypto_adapter.h
index 83d154a6ce..0c610b8e04 100644
--- a/lib/eventdev/rte_event_crypto_adapter.h
+++ b/lib/eventdev/rte_event_crypto_adapter.h
@@ -414,6 +414,20 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_crypto_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increments
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for crypto adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* Adapter identifier.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v5 4/4] eventdev/timer: change eventdev reconfig logic
2023-01-02 5:14 ` Naga Harish K S V
2023-01-02 5:14 ` [PATCH v5 2/4] eventdev/eth_tx: " Naga Harish K S V
2023-01-02 5:14 ` [PATCH v5 3/4] eventdev/crypto: " Naga Harish K S V
@ 2023-01-02 5:14 ` Naga Harish K S V
2023-01-04 6:41 ` [PATCH v6 1/4] eventdev/eth_rx: " Naga Harish K S V
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-02 5:14 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_timer_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for timer adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v4:
* fix programmer guide
v5:
* update doxygen as per review comments
---
---
doc/guides/prog_guide/event_timer_adapter.rst | 18 +++++++++++++++
lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
lib/eventdev/rte_event_timer_adapter.h | 14 +++++++++++
3 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
index d7307a29bb..b5cd95fef1 100644
--- a/doc/guides/prog_guide/event_timer_adapter.rst
+++ b/doc/guides/prog_guide/event_timer_adapter.rst
@@ -139,6 +139,24 @@ This function is passed a callback function that will be invoked if the
adapter needs to create an event port, giving the application the opportunity
to control how it is done.
+Event device configuration for service based adapter
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When rte_event_timer_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with
+additional event port during service initialization.
+This event device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for timer adapter in event device configuration,
+when the adapter is created using the above-mentioned API.
+
Adapter modes
^^^^^^^^^^^^^
An event timer adapter can be configured in either periodic or non-periodic mode
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index a0f14bf861..5ed233db00 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
+ if (conf_arg != NULL)
+ port_conf = conf_arg;
+ else {
+ port_conf = &def_port_conf;
+ ret = rte_event_port_default_conf_get(dev_id, port_id,
+ port_conf);
+ if (ret < 0)
+ return ret;
+ }
+
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
@@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
return ret;
}
- if (conf_arg != NULL)
- port_conf = conf_arg;
- else {
- port_conf = &def_port_conf;
- ret = rte_event_port_default_conf_get(dev_id, port_id,
- port_conf);
- if (ret < 0)
- return ret;
- }
-
ret = rte_event_port_setup(dev_id, port_id, port_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h
index cd10db19e4..e21588bede 100644
--- a/lib/eventdev/rte_event_timer_adapter.h
+++ b/lib/eventdev/rte_event_timer_adapter.h
@@ -212,6 +212,20 @@ typedef int (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
*
* This function must be invoked first before any other function in the API.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increments
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for Timer adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param conf
* The event timer adapter configuration structure.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v6 1/4] eventdev/eth_rx: change eventdev reconfig logic
2023-01-02 5:14 ` Naga Harish K S V
` (2 preceding siblings ...)
2023-01-02 5:14 ` [PATCH v5 4/4] eventdev/timer: " Naga Harish K S V
@ 2023-01-04 6:41 ` Naga Harish K S V
2023-01-04 6:41 ` [PATCH v6 2/4] eventdev/eth_tx: " Naga Harish K S V
` (3 more replies)
3 siblings, 4 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-04 6:41 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_rx_adapter_create() or
rte_event_eth_rx_adapter_create_with_params() is used for creating
adapter instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_rx adapter when the adapter is created
using above mentioned apis.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* Fix build error
v3:
* update doxygen
v5:
* update doxygen as per review comments
v6:
* no update in rxa
---
---
.../prog_guide/event_ethernet_rx_adapter.rst | 19 +++++++++++++++++++
lib/eventdev/rte_event_eth_rx_adapter.c | 3 +++
lib/eventdev/rte_event_eth_rx_adapter.h | 14 ++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
index 116c0a27c6..bbe278f7db 100644
--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
@@ -71,6 +71,25 @@ set to true. The function is passed the event device to be associated with
the adapter and port configuration for the adapter to setup an event port
if the adapter needs to use a service function.
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_rx_adapter_create() or
+rte_event_eth_rx_adapter_create_with_params() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented and the event device is reconfigured with
+the additional event port during service initialization. This event
+device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Rx adapter in the event device configuration,
+when the adapter is created using the above-mentioned APIs.
+
Adding Rx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index cf7bbd4d69..34aa87379e 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1532,6 +1532,9 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n",
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index d0e7d0092c..f4652f40e8 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -382,6 +382,20 @@ int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_eth_rx_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Rx adapter in the event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Rx event adapter.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v6 2/4] eventdev/eth_tx: change eventdev reconfig logic
2023-01-04 6:41 ` [PATCH v6 1/4] eventdev/eth_rx: " Naga Harish K S V
@ 2023-01-04 6:41 ` Naga Harish K S V
2023-01-04 6:41 ` [PATCH v6 3/4] eventdev/crypto: " Naga Harish K S V
` (2 subsequent siblings)
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-04 6:41 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_tx_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_tx adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in doc/prog_guide
v3:
* update doxygen
v5:
* update doxygen as per review comments
v6:
* no update in txa
---
---
.../prog_guide/event_ethernet_tx_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_eth_tx_adapter.c | 2 ++
lib/eventdev/rte_event_eth_tx_adapter.h | 14 ++++++++++++++
3 files changed, 33 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
index 905cb445e0..711ecb7441 100644
--- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
@@ -56,6 +56,23 @@ and needs to create an event port for it. The callback is expected to fill the
err = rte_event_eth_tx_adapter_create(id, dev_id, &tx_p_conf);
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_tx_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with additional
+event port during service initialization. This event device reconfigure logic
+also increments the ``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the event device with
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Tx adapter when the adapter is created
+using the above-mentioned API.
+
Adding Tx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 88309d2aaa..c780ee1264 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -316,6 +316,8 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (pc->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.h b/lib/eventdev/rte_event_eth_tx_adapter.h
index 645b87b78a..cd539af7ef 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.h
+++ b/lib/eventdev/rte_event_eth_tx_adapter.h
@@ -142,6 +142,20 @@ struct rte_event_eth_tx_adapter_stats {
/**
* Create a new ethernet Tx adapter with the specified identifier.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for the
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Tx adapter in event device configure when
+ * the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Tx adapter.
* @param dev_id
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v6 3/4] eventdev/crypto: change eventdev reconfig logic
2023-01-04 6:41 ` [PATCH v6 1/4] eventdev/eth_rx: " Naga Harish K S V
2023-01-04 6:41 ` [PATCH v6 2/4] eventdev/eth_tx: " Naga Harish K S V
@ 2023-01-04 6:41 ` Naga Harish K S V
2023-01-04 6:41 ` [PATCH v6 4/4] eventdev/timer: " Naga Harish K S V
2023-01-12 16:30 ` [PATCH v7 1/4] eventdev/eth_rx: " Naga Harish K S V
3 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-04 6:41 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_crypto_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for crypto adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v5:
* update doxygen as per review comments
v6:
* no update in crypto adapter
---
---
doc/guides/prog_guide/event_crypto_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_crypto_adapter.c | 3 +++
lib/eventdev/rte_event_crypto_adapter.h | 14 ++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst b/doc/guides/prog_guide/event_crypto_adapter.rst
index 554df7e358..7c409176d1 100644
--- a/doc/guides/prog_guide/event_crypto_adapter.rst
+++ b/doc/guides/prog_guide/event_crypto_adapter.rst
@@ -159,6 +159,23 @@ which it enqueues events towards the crypto adapter using
nb_events);
}
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_crypto_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and event device is reconfigured with additional
+event port during service initialization. This event device reconfigure
+logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the
+event device with ``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for crypto adapter when the adapter is created
+using the above-mentioned API.
Querying adapter capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 3c585d7b0d..5620a36dd3 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -287,6 +287,9 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", dev_id);
diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_event_crypto_adapter.h
index 83d154a6ce..0c610b8e04 100644
--- a/lib/eventdev/rte_event_crypto_adapter.h
+++ b/lib/eventdev/rte_event_crypto_adapter.h
@@ -414,6 +414,20 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_crypto_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increments
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for crypto adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* Adapter identifier.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v6 4/4] eventdev/timer: change eventdev reconfig logic
2023-01-04 6:41 ` [PATCH v6 1/4] eventdev/eth_rx: " Naga Harish K S V
2023-01-04 6:41 ` [PATCH v6 2/4] eventdev/eth_tx: " Naga Harish K S V
2023-01-04 6:41 ` [PATCH v6 3/4] eventdev/crypto: " Naga Harish K S V
@ 2023-01-04 6:41 ` Naga Harish K S V
2023-01-12 7:06 ` Jerin Jacob
2023-01-12 16:30 ` [PATCH v7 1/4] eventdev/eth_rx: " Naga Harish K S V
3 siblings, 1 reply; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-04 6:41 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_timer_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for timer adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v4:
* fix programmer guide
v5:
* update doxygen as per review comments
v6:
* fix adapter cretae logic with correct event port id
---
---
doc/guides/prog_guide/event_timer_adapter.rst | 18 +++++++++++++++
lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
lib/eventdev/rte_event_timer_adapter.h | 14 +++++++++++
3 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
index d7307a29bb..b5cd95fef1 100644
--- a/doc/guides/prog_guide/event_timer_adapter.rst
+++ b/doc/guides/prog_guide/event_timer_adapter.rst
@@ -139,6 +139,24 @@ This function is passed a callback function that will be invoked if the
adapter needs to create an event port, giving the application the opportunity
to control how it is done.
+Event device configuration for service based adapter
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When rte_event_timer_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with
+additional event port during service initialization.
+This event device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for timer adapter in event device configuration,
+when the adapter is created using the above-mentioned API.
+
Adapter modes
^^^^^^^^^^^^^
An event timer adapter can be configured in either periodic or non-periodic mode
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index a0f14bf861..66554f13fc 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
+ if (conf_arg != NULL)
+ port_conf = conf_arg;
+ else {
+ port_conf = &def_port_conf;
+ ret = rte_event_port_default_conf_get(dev_id, (port_id - 1),
+ port_conf);
+ if (ret < 0)
+ return ret;
+ }
+
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
@@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
return ret;
}
- if (conf_arg != NULL)
- port_conf = conf_arg;
- else {
- port_conf = &def_port_conf;
- ret = rte_event_port_default_conf_get(dev_id, port_id,
- port_conf);
- if (ret < 0)
- return ret;
- }
-
ret = rte_event_port_setup(dev_id, port_id, port_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h
index cd10db19e4..e21588bede 100644
--- a/lib/eventdev/rte_event_timer_adapter.h
+++ b/lib/eventdev/rte_event_timer_adapter.h
@@ -212,6 +212,20 @@ typedef int (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
*
* This function must be invoked first before any other function in the API.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increments
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for Timer adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param conf
* The event timer adapter configuration structure.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v6 4/4] eventdev/timer: change eventdev reconfig logic
2023-01-04 6:41 ` [PATCH v6 4/4] eventdev/timer: " Naga Harish K S V
@ 2023-01-12 7:06 ` Jerin Jacob
2023-01-12 16:32 ` Naga Harish K, S V
0 siblings, 1 reply; 51+ messages in thread
From: Jerin Jacob @ 2023-01-12 7:06 UTC (permalink / raw)
To: Naga Harish K S V
Cc: jerinj, erik.g.carrillo, abhinandan.gujjar, dev, jay.jayatheerthan
On Wed, Jan 4, 2023 at 12:12 PM Naga Harish K S V
<s.v.naga.harish.k@intel.com> wrote:
>
> When rte_event_timer_adapter_create() is used for creating adapter
> instance, eventdev is reconfigured with additional
> ``rte_event_dev_config::nb_event_ports`` parameter.
>
> This eventdev reconfig logic is enhanced to increment the
> ``rte_event_dev_config::nb_single_link_event_port_queues``
> parameter if the adapter event port config is of type
> ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
In general, the change is OK. Some comments,
> With this change the application is no longer need to configure the
What happens to existing application? Will it
a) Fail at runtime
b) Fail at compile time
c) Need to change application code to make existing application working
d) Change the application code to get this enhancement
This is to understand what need to be updated in
doc/guides/rel_notes/release_23_03.rst
If it is (d), Please update doc/guides/rel_notes/release_23_03.rst to
make sure end user know this enhancement is added.
If not (d), it is kind of application breaking scenario and make it as (d).
> eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
> parameter required for timer adapter when the adapter is created
> using above mentioned api.
>
> Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> ---
> v2:
> * fix build error in documentation
> v3:
> * update doxygen
> v4:
> * fix programmer guide
> v5:
> * update doxygen as per review comments
> v6:
> * fix adapter cretae logic with correct event port id
> ---
> ---
> doc/guides/prog_guide/event_timer_adapter.rst | 18 +++++++++++++++
> lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
> lib/eventdev/rte_event_timer_adapter.h | 14 +++++++++++
> 3 files changed, 45 insertions(+), 10 deletions(-)
>
> diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
> index d7307a29bb..b5cd95fef1 100644
> --- a/doc/guides/prog_guide/event_timer_adapter.rst
> +++ b/doc/guides/prog_guide/event_timer_adapter.rst
> @@ -139,6 +139,24 @@ This function is passed a callback function that will be invoked if the
> adapter needs to create an event port, giving the application the opportunity
> to control how it is done.
>
> +Event device configuration for service based adapter
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +When rte_event_timer_adapter_create() is used for creating
> +adapter instance, ``rte_event_dev_config::nb_event_ports`` is
> +automatically incremented, and the event device is reconfigured with
> +additional event port during service initialization.
> +This event device reconfigure logic also increments the
> +``rte_event_dev_config::nb_single_link_event_port_queues``
> +parameter if the adapter event port config is of type
> +``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
> +
> +Application no longer needs to account for the
> +``rte_event_dev_config::nb_event_ports`` and
> +``rte_event_dev_config::nb_single_link_event_port_queues``
> +parameters required for timer adapter in event device configuration,
> +when the adapter is created using the above-mentioned API.
> +
> Adapter modes
> ^^^^^^^^^^^^^
> An event timer adapter can be configured in either periodic or non-periodic mode
> diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
> index a0f14bf861..66554f13fc 100644
> --- a/lib/eventdev/rte_event_timer_adapter.c
> +++ b/lib/eventdev/rte_event_timer_adapter.c
> @@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
> rte_event_dev_stop(dev_id);
>
> port_id = dev_conf.nb_event_ports;
> + if (conf_arg != NULL)
> + port_conf = conf_arg;
> + else {
> + port_conf = &def_port_conf;
> + ret = rte_event_port_default_conf_get(dev_id, (port_id - 1),
> + port_conf);
> + if (ret < 0)
> + return ret;
> + }
> +
> dev_conf.nb_event_ports += 1;
> + if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
> + dev_conf.nb_single_link_event_port_queues += 1;
> +
> ret = rte_event_dev_configure(dev_id, &dev_conf);
> if (ret < 0) {
> EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
> @@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
> return ret;
> }
>
> - if (conf_arg != NULL)
> - port_conf = conf_arg;
> - else {
> - port_conf = &def_port_conf;
> - ret = rte_event_port_default_conf_get(dev_id, port_id,
> - port_conf);
> - if (ret < 0)
> - return ret;
> - }
> -
> ret = rte_event_port_setup(dev_id, port_id, port_conf);
> if (ret < 0) {
> EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
> diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h
> index cd10db19e4..e21588bede 100644
> --- a/lib/eventdev/rte_event_timer_adapter.h
> +++ b/lib/eventdev/rte_event_timer_adapter.h
> @@ -212,6 +212,20 @@ typedef int (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
> *
> * This function must be invoked first before any other function in the API.
> *
> + * When this API is used for creating adapter instance,
> + * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
> + * and the event device is reconfigured with additional event port during
> + * service initialization. This event device reconfigure logic also increments
> + * the ``rte_event_dev_config::nb_single_link_event_port_queues``
> + * parameter if the adapter event port config is of type
> + * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
> + *
> + * Application no longer needs to account for
> + * ``rte_event_dev_config::nb_event_ports`` and
> + * ``rte_event_dev_config::nb_single_link_event_port_queues``
> + * parameters required for Timer adapter in event device configuration
> + * when the adapter is created with this API.
> + *
> * @param conf
> * The event timer adapter configuration structure.
> *
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 51+ messages in thread
* RE: [PATCH v6 4/4] eventdev/timer: change eventdev reconfig logic
2023-01-12 7:06 ` Jerin Jacob
@ 2023-01-12 16:32 ` Naga Harish K, S V
0 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K, S V @ 2023-01-12 16:32 UTC (permalink / raw)
To: Jerin Jacob
Cc: jerinj, Carrillo, Erik G, Gujjar, Abhinandan S, dev, Jayatheerthan, Jay
Hi Jerin,
> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Thursday, January 12, 2023 12:36 PM
> To: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> Cc: jerinj@marvell.com; Carrillo, Erik G <erik.g.carrillo@intel.com>; Gujjar,
> Abhinandan S <abhinandan.gujjar@intel.com>; dev@dpdk.org;
> Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
> Subject: Re: [PATCH v6 4/4] eventdev/timer: change eventdev reconfig logic
>
> On Wed, Jan 4, 2023 at 12:12 PM Naga Harish K S V
> <s.v.naga.harish.k@intel.com> wrote:
> >
> > When rte_event_timer_adapter_create() is used for creating adapter
> > instance, eventdev is reconfigured with additional
> > ``rte_event_dev_config::nb_event_ports`` parameter.
> >
> > This eventdev reconfig logic is enhanced to increment the
> > ``rte_event_dev_config::nb_single_link_event_port_queues``
> > parameter if the adapter event port config is of type
> > ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
>
> In general, the change is OK. Some comments,
>
>
> > With this change the application is no longer need to configure the
>
> What happens to existing application? Will it
> a) Fail at runtime
> b) Fail at compile time
> c) Need to change application code to make existing application working
> d) Change the application code to get this enhancement
>
> This is to understand what need to be updated in
> doc/guides/rel_notes/release_23_03.rst
>
> If it is (d), Please update doc/guides/rel_notes/release_23_03.rst to make
> sure end user know this enhancement is added.
> If not (d), it is kind of application breaking scenario and make it as (d).
>
If the existing application is using rte_event_ <>_adapter_create() for creating
service based adapter instance and requires event_port with ``RTE_EVENT_PORT_CFG_SINGLE_LINK``
configuration, may fail at runtime.
Updated the doc/guides/rel_notes/release_23_03.rst with this info in V7 patchset.
> > eventdev with
> > ``rte_event_dev_config::nb_single_link_event_port_queues``
>
>
> > parameter required for timer adapter when the adapter is created using
> > above mentioned api.
> >
> > Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> > Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> > ---
> > v2:
> > * fix build error in documentation
> > v3:
> > * update doxygen
> > v4:
> > * fix programmer guide
> > v5:
> > * update doxygen as per review comments
> > v6:
> > * fix adapter cretae logic with correct event port id
> > ---
> > ---
> > doc/guides/prog_guide/event_timer_adapter.rst | 18 +++++++++++++++
> > lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
> > lib/eventdev/rte_event_timer_adapter.h | 14 +++++++++++
> > 3 files changed, 45 insertions(+), 10 deletions(-)
> >
> > diff --git a/doc/guides/prog_guide/event_timer_adapter.rst
> > b/doc/guides/prog_guide/event_timer_adapter.rst
> > index d7307a29bb..b5cd95fef1 100644
> > --- a/doc/guides/prog_guide/event_timer_adapter.rst
> > +++ b/doc/guides/prog_guide/event_timer_adapter.rst
> > @@ -139,6 +139,24 @@ This function is passed a callback function that
> > will be invoked if the adapter needs to create an event port, giving
> > the application the opportunity to control how it is done.
> >
> > +Event device configuration for service based adapter
> > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > +
> > +When rte_event_timer_adapter_create() is used for creating adapter
> > +instance, ``rte_event_dev_config::nb_event_ports`` is automatically
> > +incremented, and the event device is reconfigured with additional
> > +event port during service initialization.
> > +This event device reconfigure logic also increments the
> > +``rte_event_dev_config::nb_single_link_event_port_queues``
> > +parameter if the adapter event port config is of type
> > +``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
> > +
> > +Application no longer needs to account for the
> > +``rte_event_dev_config::nb_event_ports`` and
> > +``rte_event_dev_config::nb_single_link_event_port_queues``
> > +parameters required for timer adapter in event device configuration,
> > +when the adapter is created using the above-mentioned API.
> > +
> > Adapter modes
> > ^^^^^^^^^^^^^
> > An event timer adapter can be configured in either periodic or
> > non-periodic mode diff --git a/lib/eventdev/rte_event_timer_adapter.c
> > b/lib/eventdev/rte_event_timer_adapter.c
> > index a0f14bf861..66554f13fc 100644
> > --- a/lib/eventdev/rte_event_timer_adapter.c
> > +++ b/lib/eventdev/rte_event_timer_adapter.c
> > @@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t
> event_dev_id, uint8_t *event_port_id,
> > rte_event_dev_stop(dev_id);
> >
> > port_id = dev_conf.nb_event_ports;
> > + if (conf_arg != NULL)
> > + port_conf = conf_arg;
> > + else {
> > + port_conf = &def_port_conf;
> > + ret = rte_event_port_default_conf_get(dev_id, (port_id - 1),
> > + port_conf);
> > + if (ret < 0)
> > + return ret;
> > + }
> > +
> > dev_conf.nb_event_ports += 1;
> > + if (port_conf->event_port_cfg &
> RTE_EVENT_PORT_CFG_SINGLE_LINK)
> > + dev_conf.nb_single_link_event_port_queues += 1;
> > +
> > ret = rte_event_dev_configure(dev_id, &dev_conf);
> > if (ret < 0) {
> > EVTIM_LOG_ERR("failed to configure event dev %u\n",
> > dev_id); @@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t
> event_dev_id, uint8_t *event_port_id,
> > return ret;
> > }
> >
> > - if (conf_arg != NULL)
> > - port_conf = conf_arg;
> > - else {
> > - port_conf = &def_port_conf;
> > - ret = rte_event_port_default_conf_get(dev_id, port_id,
> > - port_conf);
> > - if (ret < 0)
> > - return ret;
> > - }
> > -
> > ret = rte_event_port_setup(dev_id, port_id, port_conf);
> > if (ret < 0) {
> > EVTIM_LOG_ERR("failed to setup event port %u on event
> > dev %u\n", diff --git a/lib/eventdev/rte_event_timer_adapter.h
> > b/lib/eventdev/rte_event_timer_adapter.h
> > index cd10db19e4..e21588bede 100644
> > --- a/lib/eventdev/rte_event_timer_adapter.h
> > +++ b/lib/eventdev/rte_event_timer_adapter.h
> > @@ -212,6 +212,20 @@ typedef int
> (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
> > *
> > * This function must be invoked first before any other function in the API.
> > *
> > + * When this API is used for creating adapter instance,
> > + * ``rte_event_dev_config::nb_event_ports`` is automatically
> > + incremented,
> > + * and the event device is reconfigured with additional event port
> > + during
> > + * service initialization. This event device reconfigure logic also
> > + increments
> > + * the ``rte_event_dev_config::nb_single_link_event_port_queues``
> > + * parameter if the adapter event port config is of type
> > + * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
> > + *
> > + * Application no longer needs to account for
> > + * ``rte_event_dev_config::nb_event_ports`` and
> > + * ``rte_event_dev_config::nb_single_link_event_port_queues``
> > + * parameters required for Timer adapter in event device
> > + configuration
> > + * when the adapter is created with this API.
> > + *
> > * @param conf
> > * The event timer adapter configuration structure.
> > *
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v7 1/4] eventdev/eth_rx: change eventdev reconfig logic
2023-01-04 6:41 ` [PATCH v6 1/4] eventdev/eth_rx: " Naga Harish K S V
` (2 preceding siblings ...)
2023-01-04 6:41 ` [PATCH v6 4/4] eventdev/timer: " Naga Harish K S V
@ 2023-01-12 16:30 ` Naga Harish K S V
2023-01-12 16:30 ` [PATCH v7 2/4] eventdev/eth_tx: " Naga Harish K S V
` (2 more replies)
3 siblings, 3 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-12 16:30 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_rx_adapter_create() or
rte_event_eth_rx_adapter_create_with_params() is used for creating
adapter instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_rx adapter when the adapter is created
using above mentioned apis.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* Fix build error
v3:
* update doxygen
v5:
* update doxygen as per review comments
v6:
* no update in rxa
---
---
.../prog_guide/event_ethernet_rx_adapter.rst | 19 +++++++++++++++++++
lib/eventdev/rte_event_eth_rx_adapter.c | 3 +++
lib/eventdev/rte_event_eth_rx_adapter.h | 14 ++++++++++++++
3 files changed, 36 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
index 116c0a27c6..bbe278f7db 100644
--- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst
@@ -71,6 +71,25 @@ set to true. The function is passed the event device to be associated with
the adapter and port configuration for the adapter to setup an event port
if the adapter needs to use a service function.
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_rx_adapter_create() or
+rte_event_eth_rx_adapter_create_with_params() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented and the event device is reconfigured with
+the additional event port during service initialization. This event
+device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Rx adapter in the event device configuration,
+when the adapter is created using the above-mentioned APIs.
+
Adding Rx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index cf7bbd4d69..34aa87379e 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1532,6 +1532,9 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n",
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h
index d0e7d0092c..f4652f40e8 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.h
+++ b/lib/eventdev/rte_event_eth_rx_adapter.h
@@ -382,6 +382,20 @@ int rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_eth_rx_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Rx adapter in the event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Rx event adapter.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v7 2/4] eventdev/eth_tx: change eventdev reconfig logic
2023-01-12 16:30 ` [PATCH v7 1/4] eventdev/eth_rx: " Naga Harish K S V
@ 2023-01-12 16:30 ` Naga Harish K S V
2023-01-12 16:30 ` [PATCH v7 3/4] eventdev/crypto: " Naga Harish K S V
2023-01-12 16:30 ` [PATCH v7 4/4] eventdev/timer: " Naga Harish K S V
2 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-12 16:30 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_eth_tx_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for eth_tx adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in doc/prog_guide
v3:
* update doxygen
v5:
* update doxygen as per review comments
v6:
* no update in txa
---
---
.../prog_guide/event_ethernet_tx_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_eth_tx_adapter.c | 2 ++
lib/eventdev/rte_event_eth_tx_adapter.h | 14 ++++++++++++++
3 files changed, 33 insertions(+)
diff --git a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
index 905cb445e0..711ecb7441 100644
--- a/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
+++ b/doc/guides/prog_guide/event_ethernet_tx_adapter.rst
@@ -56,6 +56,23 @@ and needs to create an event port for it. The callback is expected to fill the
err = rte_event_eth_tx_adapter_create(id, dev_id, &tx_p_conf);
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_eth_tx_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with additional
+event port during service initialization. This event device reconfigure logic
+also increments the ``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the event device with
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for eth Tx adapter when the adapter is created
+using the above-mentioned API.
+
Adding Tx Queues to the Adapter Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 88309d2aaa..c780ee1264 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -316,6 +316,8 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (pc->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.h b/lib/eventdev/rte_event_eth_tx_adapter.h
index 645b87b78a..cd539af7ef 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.h
+++ b/lib/eventdev/rte_event_eth_tx_adapter.h
@@ -142,6 +142,20 @@ struct rte_event_eth_tx_adapter_stats {
/**
* Create a new ethernet Tx adapter with the specified identifier.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and event device is reconfigured with additional event port during service
+ * initialization. This event device reconfigure logic also increments the
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for the
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for eth Tx adapter in event device configure when
+ * the adapter is created with this API.
+ *
* @param id
* The identifier of the ethernet Tx adapter.
* @param dev_id
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v7 3/4] eventdev/crypto: change eventdev reconfig logic
2023-01-12 16:30 ` [PATCH v7 1/4] eventdev/eth_rx: " Naga Harish K S V
2023-01-12 16:30 ` [PATCH v7 2/4] eventdev/eth_tx: " Naga Harish K S V
@ 2023-01-12 16:30 ` Naga Harish K S V
2023-01-12 16:30 ` [PATCH v7 4/4] eventdev/timer: " Naga Harish K S V
2 siblings, 0 replies; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-12 16:30 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_crypto_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for crypto adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v5:
* update doxygen as per review comments
v6:
* no update in crypto adapter
---
---
doc/guides/prog_guide/event_crypto_adapter.rst | 17 +++++++++++++++++
lib/eventdev/rte_event_crypto_adapter.c | 3 +++
lib/eventdev/rte_event_crypto_adapter.h | 14 ++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst b/doc/guides/prog_guide/event_crypto_adapter.rst
index 554df7e358..7c409176d1 100644
--- a/doc/guides/prog_guide/event_crypto_adapter.rst
+++ b/doc/guides/prog_guide/event_crypto_adapter.rst
@@ -159,6 +159,23 @@ which it enqueues events towards the crypto adapter using
nb_events);
}
+Event device configuration for service based adapter
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When rte_event_crypto_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and event device is reconfigured with additional
+event port during service initialization. This event device reconfigure
+logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to configure the
+event device with ``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for crypto adapter when the adapter is created
+using the above-mentioned API.
Querying adapter capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 3c585d7b0d..5620a36dd3 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -287,6 +287,9 @@ eca_default_config_cb(uint8_t id, uint8_t dev_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret) {
RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", dev_id);
diff --git a/lib/eventdev/rte_event_crypto_adapter.h b/lib/eventdev/rte_event_crypto_adapter.h
index 83d154a6ce..0c610b8e04 100644
--- a/lib/eventdev/rte_event_crypto_adapter.h
+++ b/lib/eventdev/rte_event_crypto_adapter.h
@@ -414,6 +414,20 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
* control in configuration of the service, it should use the
* rte_event_crypto_adapter_create_ext() version.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increments
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for crypto adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param id
* Adapter identifier.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH v7 4/4] eventdev/timer: change eventdev reconfig logic
2023-01-12 16:30 ` [PATCH v7 1/4] eventdev/eth_rx: " Naga Harish K S V
2023-01-12 16:30 ` [PATCH v7 2/4] eventdev/eth_tx: " Naga Harish K S V
2023-01-12 16:30 ` [PATCH v7 3/4] eventdev/crypto: " Naga Harish K S V
@ 2023-01-12 16:30 ` Naga Harish K S V
2023-01-13 13:51 ` Jerin Jacob
2 siblings, 1 reply; 51+ messages in thread
From: Naga Harish K S V @ 2023-01-12 16:30 UTC (permalink / raw)
To: jerinj, erik.g.carrillo, abhinandan.gujjar; +Cc: dev, jay.jayatheerthan
When rte_event_timer_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.
This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for timer adapter when the adapter is created
using above mentioned api.
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
v2:
* fix build error in documentation
v3:
* update doxygen
v4:
* fix programmer guide
v5:
* update doxygen as per review comments
v6:
* fix adapter cretae logic with correct event port id
v7:
* updated 23.03 release notes
---
---
doc/guides/prog_guide/event_timer_adapter.rst | 18 +++++++++++++++
doc/guides/rel_notes/release_23_03.rst | 10 ++++++++
lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++--------
lib/eventdev/rte_event_timer_adapter.h | 14 +++++++++++
4 files changed, 55 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst
index d7307a29bb..b5cd95fef1 100644
--- a/doc/guides/prog_guide/event_timer_adapter.rst
+++ b/doc/guides/prog_guide/event_timer_adapter.rst
@@ -139,6 +139,24 @@ This function is passed a callback function that will be invoked if the
adapter needs to create an event port, giving the application the opportunity
to control how it is done.
+Event device configuration for service based adapter
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When rte_event_timer_adapter_create() is used for creating
+adapter instance, ``rte_event_dev_config::nb_event_ports`` is
+automatically incremented, and the event device is reconfigured with
+additional event port during service initialization.
+This event device reconfigure logic also increments the
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameter if the adapter event port config is of type
+``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+
+Application no longer needs to account for the
+``rte_event_dev_config::nb_event_ports`` and
+``rte_event_dev_config::nb_single_link_event_port_queues``
+parameters required for timer adapter in event device configuration,
+when the adapter is created using the above-mentioned API.
+
Adapter modes
^^^^^^^^^^^^^
An event timer adapter can be configured in either periodic or non-periodic mode
diff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst
index b8c5b68d6c..1815604598 100644
--- a/doc/guides/rel_notes/release_23_03.rst
+++ b/doc/guides/rel_notes/release_23_03.rst
@@ -55,6 +55,16 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated the eventdev reconfigure logic for service based adapters.**
+
+ * This eventdev reconfig logic is enhanced to increment the
+ ``rte_event_dev_config::nb_single_link_event_port_queues``
+ parameter if event port config is of type
+ ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ * With this change, the application no longer needs to account for the
+ ``rte_event_dev_config::nb_single_link_event_port_queues`` parameter
+ required for adapters.
+ * This change is added for eth_rx, eth_tx, crypto and timer eventdev adapters.
Removed Items
-------------
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index a0f14bf861..66554f13fc 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
rte_event_dev_stop(dev_id);
port_id = dev_conf.nb_event_ports;
+ if (conf_arg != NULL)
+ port_conf = conf_arg;
+ else {
+ port_conf = &def_port_conf;
+ ret = rte_event_port_default_conf_get(dev_id, (port_id - 1),
+ port_conf);
+ if (ret < 0)
+ return ret;
+ }
+
dev_conf.nb_event_ports += 1;
+ if (port_conf->event_port_cfg & RTE_EVENT_PORT_CFG_SINGLE_LINK)
+ dev_conf.nb_single_link_event_port_queues += 1;
+
ret = rte_event_dev_configure(dev_id, &dev_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to configure event dev %u\n", dev_id);
@@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t *event_port_id,
return ret;
}
- if (conf_arg != NULL)
- port_conf = conf_arg;
- else {
- port_conf = &def_port_conf;
- ret = rte_event_port_default_conf_get(dev_id, port_id,
- port_conf);
- if (ret < 0)
- return ret;
- }
-
ret = rte_event_port_setup(dev_id, port_id, port_conf);
if (ret < 0) {
EVTIM_LOG_ERR("failed to setup event port %u on event dev %u\n",
diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h
index cd10db19e4..e21588bede 100644
--- a/lib/eventdev/rte_event_timer_adapter.h
+++ b/lib/eventdev/rte_event_timer_adapter.h
@@ -212,6 +212,20 @@ typedef int (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
*
* This function must be invoked first before any other function in the API.
*
+ * When this API is used for creating adapter instance,
+ * ``rte_event_dev_config::nb_event_ports`` is automatically incremented,
+ * and the event device is reconfigured with additional event port during
+ * service initialization. This event device reconfigure logic also increments
+ * the ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameter if the adapter event port config is of type
+ * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ *
+ * Application no longer needs to account for
+ * ``rte_event_dev_config::nb_event_ports`` and
+ * ``rte_event_dev_config::nb_single_link_event_port_queues``
+ * parameters required for Timer adapter in event device configuration
+ * when the adapter is created with this API.
+ *
* @param conf
* The event timer adapter configuration structure.
*
--
2.25.1
^ permalink raw reply [flat|nested] 51+ messages in thread
* Re: [PATCH v7 4/4] eventdev/timer: change eventdev reconfig logic
2023-01-12 16:30 ` [PATCH v7 4/4] eventdev/timer: " Naga Harish K S V
@ 2023-01-13 13:51 ` Jerin Jacob
0 siblings, 0 replies; 51+ messages in thread
From: Jerin Jacob @ 2023-01-13 13:51 UTC (permalink / raw)
To: Naga Harish K S V
Cc: jerinj, erik.g.carrillo, abhinandan.gujjar, dev, jay.jayatheerthan
On Thu, Jan 12, 2023 at 10:01 PM Naga Harish K S V
<s.v.naga.harish.k@intel.com> wrote:
>
> When rte_event_timer_adapter_create() is used for creating adapter
> instance, eventdev is reconfigured with additional
> ``rte_event_dev_config::nb_event_ports`` parameter.
>
> This eventdev reconfig logic is enhanced to increment the
> ``rte_event_dev_config::nb_single_link_event_port_queues``
> parameter if the adapter event port config is of type
> ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
>
> With this change the application is no longer need to configure the
> eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
> parameter required for timer adapter when the adapter is created
> using above mentioned api.
>
> Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> +* **Updated the eventdev reconfigure logic for service based adapters.**
> +
> + * This eventdev reconfig logic is enhanced to increment the
> + ``rte_event_dev_config::nb_single_link_event_port_queues``
> + parameter if event port config is of type
> + ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
> + * With this change, the application no longer needs to account for the
> + ``rte_event_dev_config::nb_single_link_event_port_queues`` parameter
> + required for adapters.
> + * This change is added for eth_rx, eth_tx, crypto and timer eventdev adapters.
Updated as following and series applied to
dpdk-next-net-eventdev/for-main. Thanks
+* **Updated the eventdev reconfigure logic for service based adapters.**
+
+ * eventdev reconfig logic is enhanced to increment the
+ ``rte_event_dev_config::nb_single_link_event_port_queues`` parameter
+ if event port config is of type ``RTE_EVENT_PORT_CFG_SINGLE_LINK``.
+ * With this change, the application no longer needs to account for the
+ ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for
+ eth_rx, eth_tx, crypto and timer eventdev adapters.
+
^ permalink raw reply [flat|nested] 51+ messages in thread