DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Abdullah Sevincer <abdullah.sevincer@intel.com>,
	 "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: dev@dpdk.org, jerinj@marvell.com, mike.ximing.chen@intel.com,
	 tirthendu.sarkar@intel.com, pravin.pathak@intel.com,
	 shivani.doneria@intel.com
Subject: Re: [PATCH v4 3/3] event/dlb2: enhance DLB credit handling
Date: Mon, 27 May 2024 21:00:16 +0530	[thread overview]
Message-ID: <CALBAE1NsnNjK3Uca7EX3j4nmCCM7gsVB5v1YE3=q81mTPqutnA@mail.gmail.com> (raw)
In-Reply-To: <20240501194620.1199357-4-abdullah.sevincer@intel.com>

On Thu, May 2, 2024 at 1:27 AM Abdullah Sevincer
<abdullah.sevincer@intel.com> wrote:
>
> This commit improves DLB credit handling scenarios when
> ports hold on to credits but can't release them due to insufficient
> accumulation (less than 2 * credit quanta).
>
> Worker ports now release all accumulated credits when back-to-back
> zero poll count reaches preset threshold.
>
> Producer ports release all accumulated credits if enqueue fails for a
> consecutive number of retries.
>
> In a multi-producer system, some producer(s) may exit early while
> holding on to credits. Now these are released during port unlink
> which needs to be performed by the application.
>
> test-eventdev is modified to call rte_event_port_unlink() to release
> any accumulated credits by producer ports.
>
> Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
> ---
>  app/test-eventdev/test_perf_common.c |  20 +--

1) Spotted non-driver changes in driver patches, Please send
test-eventdev changes as separate commit with complete rational.
2) Fix CI issues http://mails.dpdk.org/archives/test-report/2024-May/657683.html



>  drivers/event/dlb2/dlb2.c            | 203 +++++++++++++++++++++------
>  drivers/event/dlb2/dlb2_priv.h       |   1 +
>  drivers/event/dlb2/meson.build       |  12 ++
>  drivers/event/dlb2/meson_options.txt |   6 +
>  5 files changed, 194 insertions(+), 48 deletions(-)
>  create mode 100644 drivers/event/dlb2/meson_options.txt
>

>
>  static inline uint64_t
> diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
> index 11bbe30d7b..2c341a5845 100644
> --- a/drivers/event/dlb2/dlb2.c
> +++ b/drivers/event/dlb2/dlb2.c
> @@ -43,7 +43,47 @@
>   * to DLB can go ahead of relevant application writes like updates to buffers
>   * being sent with event
>   */
> +#ifndef DLB2_BYPASS_FENCE_ON_PP
>  #define DLB2_BYPASS_FENCE_ON_PP 0  /* 1 == Bypass fence, 0 == do not bypass */
> +#endif
> +
> +/* HW credit checks can only be turned off for DLB2 device if following
> + * is true for each created eventdev
> + * LDB credits <= DIR credits + minimum CQ Depth
> + * (CQ Depth is minimum of all ports configured within eventdev)
> + * This needs to be true for all eventdevs created on any DLB2 device
> + * managed by this driver.
> + * DLB2.5 does not any such restriction as it has single credit pool
> + */
> +#ifndef DLB_HW_CREDITS_CHECKS
> +#define DLB_HW_CREDITS_CHECKS 1
> +#endif
> +
> +/*
> + * SW credit checks can only be turned off if application has a way to
> + * limit input events to the eventdev below assigned credit limit
> + */
> +#ifndef DLB_SW_CREDITS_CHECKS
> +#define DLB_SW_CREDITS_CHECKS 1
> +#endif
> +

> +
> +static void dlb2_check_and_return_credits(struct dlb2_eventdev_port *ev_port,
> +                                         bool cond, uint32_t threshold)
> +{
> +#if DLB_SW_CREDITS_CHECKS || DLB_HW_CREDITS_CHECKS


This new patch is full of compilation flags clutter, can you make it runtime?

>
> diff --git a/drivers/event/dlb2/dlb2_priv.h b/drivers/event/dlb2/dlb2_priv.h
> index dc9f98e142..fd76b5b9fb 100644
> --- a/drivers/event/dlb2/dlb2_priv.h
> +++ b/drivers/event/dlb2/dlb2_priv.h
> @@ -527,6 +527,7 @@ struct __rte_cache_aligned dlb2_eventdev_port {
>         struct rte_event_port_conf conf; /* user-supplied configuration */
>         uint16_t inflight_credits; /* num credits this port has right now */
>         uint16_t credit_update_quanta;
> +       uint32_t credit_return_count; /* count till the credit return condition is true */
>         struct dlb2_eventdev *dlb2; /* backlink optimization */
>         alignas(RTE_CACHE_LINE_SIZE) struct dlb2_port_stats stats;
>         struct dlb2_event_queue_link link[DLB2_MAX_NUM_QIDS_PER_LDB_CQ];
> diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build
> index 515d1795fe..77a197e32c 100644
> --- a/drivers/event/dlb2/meson.build
> +++ b/drivers/event/dlb2/meson.build
> @@ -68,3 +68,15 @@ endif
>  headers = files('rte_pmd_dlb2.h')
>
>  deps += ['mbuf', 'mempool', 'ring', 'pci', 'bus_pci']
> +
> +if meson.version().version_compare('> 0.58.0')
> +fs = import('fs')
> +dlb_options = fs.read('meson_options.txt').strip().split('\n')
> +
> +foreach opt: dlb_options
> +       if (opt.strip().startswith('#') or opt.strip() == '')
> +               continue
> +       endif
> +       cflags += '-D' + opt.strip().to_upper().replace(' ','')
> +endforeach
> +endif
> diff --git a/drivers/event/dlb2/meson_options.txt b/drivers/event/dlb2/meson_options.txt


Adding @Richardson, Bruce   @Thomas Monjalon   to comment on this, I
am not sure driver specific
meson_options.txt is a good path?



> new file mode 100644
> index 0000000000..b57c999e54
> --- /dev/null
> +++ b/drivers/event/dlb2/meson_options.txt
> @@ -0,0 +1,6 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2023-2024 Intel Corporation
> +
> +DLB2_BYPASS_FENCE_ON_PP = 0
> +DLB_HW_CREDITS_CHECKS = 1
> +DLB_SW_CREDITS_CHECKS = 1
> --
> 2.25.1
>

  reply	other threads:[~2024-05-27 15:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 19:46 [PATCH v4 0/3] DLB2 Enhancements Abdullah Sevincer
2024-05-01 19:46 ` [PATCH v4 1/3] event/dlb2: add support for HW delayed token Abdullah Sevincer
2024-05-27 15:19   ` Jerin Jacob
2024-06-19 21:01   ` [PATCH v5 0/5] DLB2 Enhancements Abdullah Sevincer
2024-06-19 21:01     ` [PATCH v5 1/5] event/dlb2: add support for HW delayed token Abdullah Sevincer
2024-06-20 12:01       ` Jerin Jacob
2024-06-19 21:01     ` [PATCH v5 2/5] event/dlb2: add support for dynamic HL entries Abdullah Sevincer
2024-06-19 21:01     ` [PATCH v5 3/5] event/dlb2: enhance DLB credit handling Abdullah Sevincer
2024-06-20 12:09       ` Jerin Jacob
2024-06-26  0:26         ` Sevincer, Abdullah
2024-06-26  9:37           ` Jerin Jacob
2024-06-19 21:01     ` [PATCH v5 4/5] doc: update DLB2 documentation Abdullah Sevincer
2024-06-19 21:01     ` [PATCH v5 5/5] doc: update release notes for 24.07 Abdullah Sevincer
2024-06-20  7:02       ` David Marchand
2024-05-01 19:46 ` [PATCH v4 2/3] event/dlb2: add support for dynamic HL entries Abdullah Sevincer
2024-05-27 15:23   ` Jerin Jacob
2024-05-01 19:46 ` [PATCH v4 3/3] event/dlb2: enhance DLB credit handling Abdullah Sevincer
2024-05-27 15:30   ` Jerin Jacob [this message]
2024-06-04 18:22     ` Sevincer, Abdullah
2024-06-05  4:02       ` Jerin Jacob
2024-06-19 21:07         ` Sevincer, Abdullah
2024-05-02  7:34 ` [PATCH v4 0/3] DLB2 Enhancements Bruce Richardson
2024-05-02 15:52   ` Sevincer, Abdullah

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='CALBAE1NsnNjK3Uca7EX3j4nmCCM7gsVB5v1YE3=q81mTPqutnA@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=abdullah.sevincer@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=mike.ximing.chen@intel.com \
    --cc=pravin.pathak@intel.com \
    --cc=shivani.doneria@intel.com \
    --cc=tirthendu.sarkar@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).