patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH] test/event: fix timeout accuracy
@ 2021-03-06 20:26 pbhagavatula
  2021-03-08 17:20 ` Carrillo, Erik G
  0 siblings, 1 reply; 4+ messages in thread
From: pbhagavatula @ 2021-03-06 20:26 UTC (permalink / raw)
  To: jerinj, Erik Gabriel Carrillo; +Cc: dev, Pavan Nikhilesh, stable

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Round timeout ticks when converting from nanoseconds, this prevents
loss of accuracy and deviation from requested timeout value.

Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test/test_event_timer_adapter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index ad3f4dcc2..b536ddef4 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -3,6 +3,8 @@
  * Copyright(c) 2017-2018 Intel Corporation.
  */
 
+#include <math.h>
+
 #include <rte_atomic.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
@@ -46,7 +48,7 @@ static uint64_t global_info_bkt_tck_ns;
 static volatile uint8_t arm_done;
 
 #define CALC_TICKS(tks)					\
-	((tks * global_bkt_tck_ns) / global_info_bkt_tck_ns)
+	ceil((double)(tks * global_bkt_tck_ns) / global_info_bkt_tck_ns)
 
 
 static bool using_services;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] test/event: fix timeout accuracy
  2021-03-06 20:26 [dpdk-stable] [dpdk-dev] [PATCH] test/event: fix timeout accuracy pbhagavatula
@ 2021-03-08 17:20 ` Carrillo, Erik G
  2021-03-08 18:09   ` Jerin Jacob
  2021-03-16 11:46   ` Pavan Nikhilesh Bhagavatula
  0 siblings, 2 replies; 4+ messages in thread
From: Carrillo, Erik G @ 2021-03-08 17:20 UTC (permalink / raw)
  To: pbhagavatula, jerinj; +Cc: dev, stable

> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Saturday, March 6, 2021 2:27 PM
> To: jerinj@marvell.com; Carrillo, Erik G <erik.g.carrillo@intel.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] test/event: fix timeout accuracy
> 
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Round timeout ticks when converting from nanoseconds, this prevents loss
> of accuracy and deviation from requested timeout value.
> 
> Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Thanks, Pavan:

Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] test/event: fix timeout accuracy
  2021-03-08 17:20 ` Carrillo, Erik G
@ 2021-03-08 18:09   ` Jerin Jacob
  2021-03-16 11:46   ` Pavan Nikhilesh Bhagavatula
  1 sibling, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2021-03-08 18:09 UTC (permalink / raw)
  To: Carrillo, Erik G; +Cc: pbhagavatula, jerinj, dev, stable

On Mon, Mar 8, 2021 at 10:50 PM Carrillo, Erik G
<erik.g.carrillo@intel.com> wrote:
>
> > -----Original Message-----
> > From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> > Sent: Saturday, March 6, 2021 2:27 PM
> > To: jerinj@marvell.com; Carrillo, Erik G <erik.g.carrillo@intel.com>
> > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>;
> > stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] test/event: fix timeout accuracy
> >
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > Round timeout ticks when converting from nanoseconds, this prevents loss
> > of accuracy and deviation from requested timeout value.
> >
> > Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Thanks, Pavan:
>
> Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>

Applied to dpdk-next-net-eventdev/for-main. Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] test/event: fix timeout accuracy
  2021-03-08 17:20 ` Carrillo, Erik G
  2021-03-08 18:09   ` Jerin Jacob
@ 2021-03-16 11:46   ` Pavan Nikhilesh Bhagavatula
  1 sibling, 0 replies; 4+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2021-03-16 11:46 UTC (permalink / raw)
  To: Carrillo, Erik G, Jerin Jacob Kollanukkaran; +Cc: dev, stable

>> -----Original Message-----
>> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
>> Sent: Saturday, March 6, 2021 2:27 PM
>> To: jerinj@marvell.com; Carrillo, Erik G <erik.g.carrillo@intel.com>
>> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>;
>> stable@dpdk.org
>> Subject: [dpdk-dev] [PATCH] test/event: fix timeout accuracy
>>
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Round timeout ticks when converting from nanoseconds, this
>prevents loss
>> of accuracy and deviation from requested timeout value.
>>
>> Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
>Thanks, Pavan:
>
>Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>

Thanks, Gabriel,

Could you take a look at [1] too? It fixes a similar problem

[1]http://patches.dpdk.org/project/dpdk/patch/20210225120144.2591-1-pbhagavatula@marvell.com/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-16 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06 20:26 [dpdk-stable] [dpdk-dev] [PATCH] test/event: fix timeout accuracy pbhagavatula
2021-03-08 17:20 ` Carrillo, Erik G
2021-03-08 18:09   ` Jerin Jacob
2021-03-16 11:46   ` Pavan Nikhilesh Bhagavatula

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).