DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Cc: jerinj@marvell.com, erik.g.carrillo@intel.com,
	abhinandan.gujjar@intel.com, dev@dpdk.org,
	jay.jayatheerthan@intel.com
Subject: Re: [PATCH v6 4/4] eventdev/timer: change eventdev reconfig logic
Date: Thu, 12 Jan 2023 12:36:18 +0530	[thread overview]
Message-ID: <CALBAE1MKKWkXGBkQct0vtrmDYGSBFpsKOYm5bzP=tfpFPmVH1g@mail.gmail.com> (raw)
In-Reply-To: <20230104064145.2600261-4-s.v.naga.harish.k@intel.com>

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
>

  reply	other threads:[~2023-01-12  7:06 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14  5:55 [PATCH 1/4] eventdev/eth_rx: " Naga Harish K S V
2022-12-14  5:55 ` [PATCH 2/4] eventdev/eth_tx: " Naga Harish K S V
2022-12-14  5:55 ` [PATCH 3/4] eventdev/crypto: " Naga Harish K S V
2022-12-14  5:55 ` [PATCH 4/4] eventdev/timer: " Naga Harish K S V
2022-12-14  7:04   ` [PATCH v2 1/4] eventdev/eth_rx: " Naga Harish K S V
2022-12-14  7:04     ` [PATCH v2 2/4] eventdev/eth_tx: " Naga Harish K S V
2022-12-14  7:04     ` [PATCH v2 3/4] eventdev/crypto: " Naga Harish K S V
2022-12-19  3:51       ` Gujjar, Abhinandan S
2022-12-19  5:45         ` Naga Harish K, S V
2022-12-14  7:04     ` [PATCH v2 4/4] eventdev/timer: " Naga Harish K S V
2022-12-14  7:31     ` [PATCH v2 1/4] eventdev/eth_rx: " Jayatheerthan, Jay
2022-12-14  9:50       ` Naga Harish K, S V
2022-12-19  5:33     ` [PATCH v3 " Naga Harish K S V
2022-12-19  5:33       ` [PATCH v3 2/4] eventdev/eth_tx: " Naga Harish K S V
2022-12-19  5:49         ` Gujjar, Abhinandan S
2022-12-19  5:33       ` [PATCH v3 3/4] eventdev/crypto: " Naga Harish K S V
2022-12-19  5:49         ` Gujjar, Abhinandan S
2022-12-19  5:33       ` [PATCH v3 4/4] eventdev/timer: " Naga Harish K S V
2022-12-19  5:56         ` Gujjar, Abhinandan S
2022-12-19  6:20         ` [PATCH v4] " Naga Harish K S V
2022-12-19  5:48       ` [PATCH v3 1/4] eventdev/eth_rx: " Gujjar, Abhinandan S
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         ` [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
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           ` [PATCH v5 4/4] eventdev/timer: " Naga Harish K S V
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           ` [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
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           ` [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
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             ` [PATCH v6 4/4] eventdev/timer: " Naga Harish K S V
2023-01-12  7:06               ` Jerin Jacob [this message]
2023-01-12 16:32                 ` Naga Harish K, S V
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               ` [PATCH v7 4/4] eventdev/timer: " Naga Harish K S V
2023-01-13 13:51                 ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1MKKWkXGBkQct0vtrmDYGSBFpsKOYm5bzP=tfpFPmVH1g@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=jay.jayatheerthan@intel.com \
    --cc=jerinj@marvell.com \
    --cc=s.v.naga.harish.k@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).