DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Shijith Thotton <sthotton@marvell.com>
Cc: jerinj@marvell.com, dev@dpdk.org, pbhagavatula@marvell.com
Subject: Re: [PATCH] event/cnxk: arm early to account for software delays
Date: Wed, 18 Jan 2023 18:19:06 +0530	[thread overview]
Message-ID: <CALBAE1O7Z5e8ryz=6sa6WdPKk8bPhvDY_PPSxO+euC_f1L-9Ew@mail.gmail.com> (raw)
In-Reply-To: <bd8a2f1697e86cd3eac0463fa7d0e26516a073bc.1670944154.git.sthotton@marvell.com>

On Tue, Dec 13, 2022 at 8:41 PM Shijith Thotton <sthotton@marvell.com> wrote:
>
> Arm a bucket early to account for software delays in timer arm routine.
>
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>

Updated the git commit title as follows and applied to
dpdk-next-net-mrvl/for-next-net. Thanks


event/cnxk: arm timer early to account for software delays
> ---
>  drivers/event/cnxk/cnxk_tim_worker.h | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/event/cnxk/cnxk_tim_worker.h b/drivers/event/cnxk/cnxk_tim_worker.h
> index eda84c6f31..16909ef06d 100644
> --- a/drivers/event/cnxk/cnxk_tim_worker.h
> +++ b/drivers/event/cnxk/cnxk_tim_worker.h
> @@ -133,11 +133,13 @@ cnxk_tim_get_target_bucket(struct cnxk_tim_ring *const tim_ring,
>  {
>         const uint64_t bkt_cyc =
>                 tim_ring->tick_fn(tim_ring->tbase) - tim_ring->ring_start_cyc;
> -       uint64_t bucket =
> -               rte_reciprocal_divide_u64(bkt_cyc, &tim_ring->fast_div) +
> -               rel_bkt;
> +       uint64_t bucket = rte_reciprocal_divide_u64(bkt_cyc, &tim_ring->fast_div);
>         uint64_t mirr_bucket = 0;
>
> +       if ((bkt_cyc - bucket * tim_ring->tck_int) < tim_ring->tck_int / 2)
> +               bucket--;
> +
> +       bucket += rel_bkt;
>         bucket = cnxk_tim_bkt_fast_mod(bucket, tim_ring->nb_bkts,
>                                        tim_ring->fast_bkt);
>         mirr_bucket =
> --
> 2.25.1
>

      reply	other threads:[~2023-01-18 12:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 15:10 Shijith Thotton
2023-01-18 12:49 ` 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='CALBAE1O7Z5e8ryz=6sa6WdPKk8bPhvDY_PPSxO+euC_f1L-9Ew@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=sthotton@marvell.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).