[v2,3/4] eventdev/crypto: change eventdev reconfig logic
Checks
Commit Message
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>
---
v2:
* fix build error in documentation
---
---
doc/guides/prog_guide/event_crypto_adapter.rst | 16 ++++++++++++++++
lib/eventdev/rte_event_crypto_adapter.c | 3 +++
2 files changed, 19 insertions(+)
Comments
> -----Original Message-----
> From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> Sent: Wednesday, December 14, 2022 12:35 PM
> 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 v2 3/4] eventdev/crypto: change eventdev reconfig logic
>
> 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>
> ---
> v2:
> * fix build error in documentation
> ---
> ---
> doc/guides/prog_guide/event_crypto_adapter.rst | 16 ++++++++++++++++
> lib/eventdev/rte_event_crypto_adapter.c | 3 +++
> 2 files changed, 19 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
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The same information has to be updated for rte_event_crypto_adapter_create()'s
doxygen comments as well. Right now, you have updated the programming guide, same
updates required in .h files of all the adapters.
> 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);
> --
> 2.25.1
> -----Original Message-----
> From: Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> Sent: Monday, December 19, 2022 9:21 AM
> To: Naga Harish K, S V <s.v.naga.harish.k@intel.com>; jerinj@marvell.com;
> Carrillo, Erik G <erik.g.carrillo@intel.com>
> Cc: dev@dpdk.org; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
> Subject: RE: [PATCH v2 3/4] eventdev/crypto: change eventdev reconfig logic
>
>
>
> > -----Original Message-----
> > From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> > Sent: Wednesday, December 14, 2022 12:35 PM
> > 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 v2 3/4] eventdev/crypto: change eventdev reconfig
> > logic
> >
> > 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>
> > ---
> > v2:
> > * fix build error in documentation
> > ---
> > ---
> > doc/guides/prog_guide/event_crypto_adapter.rst | 16
> ++++++++++++++++
> > lib/eventdev/rte_event_crypto_adapter.c | 3 +++
> > 2 files changed, 19 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
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The same information has to be updated for
> rte_event_crypto_adapter_create()'s
> doxygen comments as well. Right now, you have updated the programming
> guide, same updates required in .h files of all the adapters.
>
The headers doxygen comments are updated in V3 patch set.
> > 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);
> > --
> > 2.25.1
@@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -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);