Re: [lng-odp] [PATCH] validation: timer: save expected expiration tick only on success

2015-06-08 Thread Ola Liljedahl
On 8 June 2015 at 17:29, Maxim Uvarov  wrote:

> Jerin, please include Ola's reviewed-by to updated patch.
>
Be careful with copy&paste as I copied a reviewed-by from Bill and changed
the name (the text I could see) but I now see that somehow the mail URL
still contains Bill's email!

 -- Ola


> Thanks,
> Maxim.
>
> On 06/08/15 18:24, Ola Liljedahl wrote:
>
>> Approved with one comment below.
>>
>> On 5 June 2015 at 09:52, Jerin Jacob > > wrote:
>>
>> otherwise "tt[i].tick" in "handle_tmo" will be a wrong value
>> in case timer set failed due to
>> ODP_TIMER_NOEVENT(failed to cancel the outstanding timer).
>>
>> some hardware timer implementations needs at least two ticks gap
>> between
>> "current tick" and "future tick" to cancel the outstanding active
>> timer.
>>
>> Signed-off-by: Jerin Jacob > >
>>
>> Reviewed-by: Ola Liljedahl > bill.fischo...@linaro.org>>
>>
>>
>> ---
>>  test/validation/odp_timer.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c
>> index 554b353..852343a 100644
>> --- a/test/validation/odp_timer.c
>> +++ b/test/validation/odp_timer.c
>> @@ -365,9 +365,9 @@ static void *worker_entrypoint(void *arg
>> TEST_UNUSED)
>> } else if (rc != ODP_TIMER_SUCCESS) {
>> /* Set/reset failed, timer already
>> expired */
>> ntoolate++;
>> -   }
>> -   /* Save expected expiration tick */
>> -   tt[i].tick = cur_tick + tck;
>> +   } else if (rc == ODP_TIMER_SUCCESS)
>> +   /* Save expected expiration tick
>> on success */
>> +   tt[i].tick = cur_tick + tck;
>>
>> Should enclose in { } as other if/else-branches use braces.
>>
>>   }
>> struct timespec ts;
>> ts.tv_sec = 0;
>> --
>> 2.1.0
>>
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org 
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>>
>>
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] validation: timer: save expected expiration tick only on success

2015-06-08 Thread Maxim Uvarov

Jerin, please include Ola's reviewed-by to updated patch.

Thanks,
Maxim.

On 06/08/15 18:24, Ola Liljedahl wrote:

Approved with one comment below.

On 5 June 2015 at 09:52, Jerin Jacob > wrote:


otherwise "tt[i].tick" in "handle_tmo" will be a wrong value
in case timer set failed due to
ODP_TIMER_NOEVENT(failed to cancel the outstanding timer).

some hardware timer implementations needs at least two ticks gap
between
"current tick" and "future tick" to cancel the outstanding active
timer.

Signed-off-by: Jerin Jacob mailto:jerin.ja...@caviumnetworks.com>>

Reviewed-by: Ola Liljedahl >


---
 test/validation/odp_timer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c
index 554b353..852343a 100644
--- a/test/validation/odp_timer.c
+++ b/test/validation/odp_timer.c
@@ -365,9 +365,9 @@ static void *worker_entrypoint(void *arg
TEST_UNUSED)
} else if (rc != ODP_TIMER_SUCCESS) {
/* Set/reset failed, timer already
expired */
ntoolate++;
-   }
-   /* Save expected expiration tick */
-   tt[i].tick = cur_tick + tck;
+   } else if (rc == ODP_TIMER_SUCCESS)
+   /* Save expected expiration tick
on success */
+   tt[i].tick = cur_tick + tck;

Should enclose in { } as other if/else-branches use braces.

  }
struct timespec ts;
ts.tv_sec = 0;
--
2.1.0

___
lng-odp mailing list
lng-odp@lists.linaro.org 
https://lists.linaro.org/mailman/listinfo/lng-odp




___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] validation: timer: save expected expiration tick only on success

2015-06-08 Thread Ola Liljedahl
Approved with one comment below.

On 5 June 2015 at 09:52, Jerin Jacob  wrote:

> otherwise "tt[i].tick" in "handle_tmo" will be a wrong value
> in case timer set failed due to
> ODP_TIMER_NOEVENT(failed to cancel the outstanding timer).
>
> some hardware timer implementations needs at least two ticks gap between
> "current tick" and "future tick" to cancel the outstanding active timer.
>
> Signed-off-by: Jerin Jacob 
>
Reviewed-by: Ola Liljedahl >

---
>  test/validation/odp_timer.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c
> index 554b353..852343a 100644
> --- a/test/validation/odp_timer.c
> +++ b/test/validation/odp_timer.c
> @@ -365,9 +365,9 @@ static void *worker_entrypoint(void *arg TEST_UNUSED)
> } else if (rc != ODP_TIMER_SUCCESS) {
> /* Set/reset failed, timer already expired
> */
> ntoolate++;
> -   }
> -   /* Save expected expiration tick */
> -   tt[i].tick = cur_tick + tck;
> +   } else if (rc == ODP_TIMER_SUCCESS)
> +   /* Save expected expiration tick on
> success */
> +   tt[i].tick = cur_tick + tck;
>
Should enclose in { } as other if/else-branches use braces.


> }
> struct timespec ts;
> ts.tv_sec = 0;
> --
> 2.1.0
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] validation: timer: save expected expiration tick only on success

2015-06-05 Thread Jerin Jacob
otherwise "tt[i].tick" in "handle_tmo" will be a wrong value
in case timer set failed due to
ODP_TIMER_NOEVENT(failed to cancel the outstanding timer).

some hardware timer implementations needs at least two ticks gap between
"current tick" and "future tick" to cancel the outstanding active timer.

Signed-off-by: Jerin Jacob 
---
 test/validation/odp_timer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c
index 554b353..852343a 100644
--- a/test/validation/odp_timer.c
+++ b/test/validation/odp_timer.c
@@ -365,9 +365,9 @@ static void *worker_entrypoint(void *arg TEST_UNUSED)
} else if (rc != ODP_TIMER_SUCCESS) {
/* Set/reset failed, timer already expired */
ntoolate++;
-   }
-   /* Save expected expiration tick */
-   tt[i].tick = cur_tick + tck;
+   } else if (rc == ODP_TIMER_SUCCESS)
+   /* Save expected expiration tick on success */
+   tt[i].tick = cur_tick + tck;
}
struct timespec ts;
ts.tv_sec = 0;
-- 
2.1.0

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp