From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 98F8C4240D; Wed, 18 Jan 2023 13:49:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4989B400D6; Wed, 18 Jan 2023 13:49:35 +0100 (CET) Received: from mail-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) by mails.dpdk.org (Postfix) with ESMTP id D0AAC4003F for ; Wed, 18 Jan 2023 13:49:33 +0100 (CET) Received: by mail-ua1-f41.google.com with SMTP id g25so4044815uaw.8 for ; Wed, 18 Jan 2023 04:49:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uOPTKMsV0NnlZJm6J6qeKUOWKbuynidKCJR9t93bMnQ=; b=q5BkCsqOo52B5cniMlzzqlGKdZNCJ7+ZmJrMxCucpkURzOwRVKVRwGuqwPj5HQu/Ml 8AFhUvdOsBK6Z44XdjnLxE5X4DrbFWVOYV2H1Zaz4ZaDcibTM+CduzUYpe+W5Qun4t+W SnwmGIEjHJNUw1qoBsnsARTJJNKR2D07/Sh8lO6vowoQA3RVbmKrsy6XhnszzwL8ULj8 5Ndfl7srdahWHxnwXRE30AhUxwRLxnyTPees8BjuYclgjGonj8ZCvwXI0czwen6UP3Wa r1hmH3r9lbJJCoFMGf1ZqJ7RydJH30QrOX2jJKj8eJcSTj7wrXooOWTLp0Mu2AS+ItCS 8zKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uOPTKMsV0NnlZJm6J6qeKUOWKbuynidKCJR9t93bMnQ=; b=lBnxeI5/ca85qVHRO7+a0flrg5pSHzv0KuPgyJuY9OqRfB12/dkMBWrkIsH6gWv/Tf aVQm5eHNCV4HmE3trSWgOrTqQRmk0gIOH3LlJEIcDYwRUaWfoh1ImLg97jOFFN7PWWY+ sCCSbckYDotnNU5yo4HfsxPGd/9LTKog7Gb/SXbVQr+t4RfFZyhqQ+sXZ+s5rcZSHIgy jxsOs9BHZoM2PsfOlYSD5VBra2dNb7lgacZJcjPqIBwqBV5kecumwaEm7AzZCBWRpnqr ImAhjV6KGM6LdbKLLWkPELeWrqu1RXNL1XEhVEYNhf9hH4ttCzjxdRL3tTPG2v/D+W98 hRvA== X-Gm-Message-State: AFqh2kqlkXOnOQoLjA9bKl11ETtnpDZp7f0Lv2VptP5GAHMUVOe942YP 3os9I+M/ntGCgNq0qZSTr7Zpu0vOgucIR7UZqWo= X-Google-Smtp-Source: AMrXdXtDukTUhTLRcOEdL4Kly6fZIbgORYDPyPsxAsuLWPYlScVMgnHyKgbaqzHajQBT2fSuXVRUgFMNxRdJ21c7TLk= X-Received: by 2002:ab0:7206:0:b0:5ef:293:84c6 with SMTP id u6-20020ab07206000000b005ef029384c6mr717919uao.52.1674046173092; Wed, 18 Jan 2023 04:49:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jerin Jacob Date: Wed, 18 Jan 2023 18:19:06 +0530 Message-ID: Subject: Re: [PATCH] event/cnxk: arm early to account for software delays To: Shijith Thotton Cc: jerinj@marvell.com, dev@dpdk.org, pbhagavatula@marvell.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Dec 13, 2022 at 8:41 PM Shijith Thotton wrote: > > Arm a bucket early to account for software delays in timer arm routine. > > Signed-off-by: Shijith Thotton 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 >