patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Pavan Nikhilesh <pbhagavatula@marvell.com>
Cc: Jerin Jacob <jerinj@marvell.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	 Ori Kam <orika@mellanox.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	 Radu Nicolau <radu.nicolau@intel.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	 Tomasz Kantecki <tomasz.kantecki@intel.com>,
	Sunil Kumar Kori <skori@marvell.com>, dpdk-dev <dev@dpdk.org>,
	 dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/l2fwd-event: fix event device config
Date: Wed, 15 Jan 2020 00:50:45 +0530
Message-ID: <CALBAE1N1ONJ0qErKdGvLcCTRB7Brk0gdXLbk1d6XdW3jecpA7A@mail.gmail.com> (raw)
In-Reply-To: <20191220142742.2077-1-pbhagavatula@marvell.com>

On Fri, Dec 20, 2019 at 7:57 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Always enable implicit release since we don't support explicit release
> in datapath.
> Master lcore is used only for printing stats so don't allocate event
> port for it.
> Fix service launch for event device without distributed scheduling.
>
> Fixes: bcb6f841d42a ("examples/l2fwd-event: setup service core")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Applied to dpdk-next-eventdev/master. Thanks.


> ---
>  examples/l2fwd-event/l2fwd_event.c               |  2 +-
>  examples/l2fwd-event/l2fwd_event_generic.c       |  9 ++++++---
>  examples/l2fwd-event/l2fwd_event_internal_port.c | 11 +++++------
>  3 files changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/examples/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c
> index 0379c580d..38d590c14 100644
> --- a/examples/l2fwd-event/l2fwd_event.c
> +++ b/examples/l2fwd-event/l2fwd_event.c
> @@ -67,7 +67,7 @@ l2fwd_event_service_setup(struct l2fwd_resources *rsrc)
>         int ret, i;
>
>         rte_event_dev_info_get(evt_rsrc->event_d_id, &evdev_info);
> -       if (evdev_info.event_dev_cap  & RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED) {
> +       if (!(evdev_info.event_dev_cap & RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED)) {
>                 ret = rte_event_dev_service_id_get(evt_rsrc->event_d_id,
>                                 &service_id);
>                 if (ret != -ESRCH && ret != 0)
> diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c
> index b7e467c1e..b07306a17 100644
> --- a/examples/l2fwd-event/l2fwd_event_generic.c
> +++ b/examples/l2fwd-event/l2fwd_event_generic.c
> @@ -42,8 +42,10 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc)
>
>         /* Event device configurtion */
>         rte_event_dev_info_get(event_d_id, &dev_info);
> -       evt_rsrc->disable_implicit_release = !!(dev_info.event_dev_cap &
> -                                   RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE);
> +
> +       /* Enable implicit release */
> +       if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE)
> +               evt_rsrc->disable_implicit_release = 0;
>
>         if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES)
>                 event_queue_cfg |= RTE_EVENT_QUEUE_CFG_ALL_TYPES;
> @@ -70,7 +72,8 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc)
>                 event_d_conf.nb_event_port_enqueue_depth =
>                                 dev_info.max_event_port_enqueue_depth;
>
> -       num_workers = rte_lcore_count() - rte_service_lcore_count();
> +       /* Ignore Master core and service cores. */
> +       num_workers = rte_lcore_count() - 1 - rte_service_lcore_count();
>         if (dev_info.max_event_ports < num_workers)
>                 num_workers = dev_info.max_event_ports;
>
> diff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c
> index b382763dd..5e6e8598a 100644
> --- a/examples/l2fwd-event/l2fwd_event_internal_port.c
> +++ b/examples/l2fwd-event/l2fwd_event_internal_port.c
> @@ -27,7 +27,6 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc)
>                 .nb_event_port_enqueue_depth = 128
>         };
>         struct rte_event_dev_info dev_info;
> -       uint8_t disable_implicit_release;
>         const uint8_t event_d_id = 0; /* Always use first event device only */
>         uint32_t event_queue_cfg = 0;
>         uint16_t ethdev_count = 0;
> @@ -44,10 +43,9 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc)
>         /* Event device configurtion */
>         rte_event_dev_info_get(event_d_id, &dev_info);
>
> -       disable_implicit_release = !!(dev_info.event_dev_cap &
> -                                   RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE);
> -       evt_rsrc->disable_implicit_release =
> -                                               disable_implicit_release;
> +       /* Enable implicit release */
> +       if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE)
> +               evt_rsrc->disable_implicit_release = 0;
>
>         if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES)
>                 event_queue_cfg |= RTE_EVENT_QUEUE_CFG_ALL_TYPES;
> @@ -73,7 +71,8 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc)
>                 event_d_conf.nb_event_port_enqueue_depth =
>                                 dev_info.max_event_port_enqueue_depth;
>
> -       num_workers = rte_lcore_count();
> +       /* Ignore Master core. */
> +       num_workers = rte_lcore_count() - 1;
>         if (dev_info.max_event_ports < num_workers)
>                 num_workers = dev_info.max_event_ports;
>
> --
> 2.17.1
>

      reply	other threads:[~2020-01-14 19:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 14:27 pbhagavatula
2020-01-14 19:20 ` Jerin Jacob [this message]

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=CALBAE1N1ONJ0qErKdGvLcCTRB7Brk0gdXLbk1d6XdW3jecpA7A@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=akhil.goyal@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=marko.kovacevic@intel.com \
    --cc=orika@mellanox.com \
    --cc=pbhagavatula@marvell.com \
    --cc=radu.nicolau@intel.com \
    --cc=skori@marvell.com \
    --cc=stable@dpdk.org \
    --cc=tomasz.kantecki@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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git