Re: [lng-odp] [PATCH v11] Misc fixes
muvarov replied on github web page: example/ipfragreass/Makefile.am line 3 @@ -1,5 +1,7 @@ include $(top_srcdir)/example/Makefile.inc +LDADD += $(ATOMIC_LIBS) Comment: Ok, Than. Agree. > muvarov wrote > also please add link to bugz if it's bug fix to git comment. >> muvarov wrote >> gettimeofday() may be changed on NTP/PTP and it's not good for measuring >> intervals. clock_gettime(CLOCK_MONOTONIC, ...) I think will be good one >> here. >>> Dmitry Eremin-Solenikov(lumag) wrote: >>> This example is not generic enough. It uses atomic primitives directly. muvarov wrote This kind of thing which is better to avoid. If we are going to merge odp implementations platforms to common repo then it might be libs which are suitable for linux-generic are not needed for other platform. I think examples Makefiles have to be more common. > Dmitry Eremin-Solenikov(lumag) wrote: > I will change that to `gettimeofday()`. >> Petri Savolainen(psavol) wrote: >> time_t is an integer value of seconds, right? sec_c is the reference >> that we compare ODP time measurement against. Test passes if ODP >> measures within +-5% the reference. Usage of time() change the reference >> to be very coarse grained (e.g. 4, 5 or 6 sec), while the real time >> spent on the wait loop may be e.g. 5.453 sec and ODP may measure 5.461 >> sec and the time() measures just 5.0 sec. So, test result would be >> "fail" (5.461 vs 5.0) although ODP measurement error was only+0.14% >> (5.461 vs 5.453). >>> Dmitry Eremin-Solenikov(lumag) wrote: >>> Well, no. Please recheck. I will update description to mention that is >>> means static linking of libodp-linux into examples. muvarov wrote At his time if --disable-static-link is specified then linking is static. If it's not specified that it's dynamic. I'm looking on odp_generator. https://github.com/Linaro/odp/pull/377#discussion_r161399700 updated_at 2018-01-14 14:38:28
Re: [lng-odp] [PATCH v11] Misc fixes
muvarov replied on github web page: test/validation/api/time/time.c line 19 @@ -423,11 +423,12 @@ static void time_test_accuracy(time_cb time_cur, time_from_ns_cb time_from_ns) { int i; odp_time_t t1, t2, wait, diff; - clock_t c1, c2; + struct timeval tv1, tv2, tvdiff; double sec_t, sec_c; odp_time_t sec = time_from_ns(ODP_TIME_SEC_IN_NS); - c1 = clock(); + i = gettimeofday(, NULL); Comment: gettimeofday() may be changed on NTP/PTP and it's not good for measuring intervals. clock_gettime(CLOCK_MONOTONIC, ...) I think will be good one here. > Dmitry Eremin-Solenikov(lumag) wrote: > This example is not generic enough. It uses atomic primitives directly. >> muvarov wrote >> This kind of thing which is better to avoid. If we are going to merge odp >> implementations platforms to common repo then it might be libs which are >> suitable for linux-generic are not needed for other platform. I think >> examples Makefiles have to be more common. >>> Dmitry Eremin-Solenikov(lumag) wrote: >>> I will change that to `gettimeofday()`. Petri Savolainen(psavol) wrote: time_t is an integer value of seconds, right? sec_c is the reference that we compare ODP time measurement against. Test passes if ODP measures within +-5% the reference. Usage of time() change the reference to be very coarse grained (e.g. 4, 5 or 6 sec), while the real time spent on the wait loop may be e.g. 5.453 sec and ODP may measure 5.461 sec and the time() measures just 5.0 sec. So, test result would be "fail" (5.461 vs 5.0) although ODP measurement error was only+0.14% (5.461 vs 5.453). > Dmitry Eremin-Solenikov(lumag) wrote: > Well, no. Please recheck. I will update description to mention that is > means static linking of libodp-linux into examples. >> muvarov wrote >> At his time if --disable-static-link is specified then linking is >> static. If it's not specified that it's dynamic. I'm looking on >> odp_generator. https://github.com/Linaro/odp/pull/377#discussion_r161399543 updated_at 2018-01-14 14:33:36
Re: [lng-odp] [PATCH v11] Misc fixes
muvarov replied on github web page: example/ipfragreass/Makefile.am line 3 @@ -1,5 +1,7 @@ include $(top_srcdir)/example/Makefile.inc +LDADD += $(ATOMIC_LIBS) Comment: This kind of thing which is better to avoid. If we are going to merge odp implementations platforms to common repo then it might be libs which are suitable for linux-generic are not needed for other platform. I think examples Makefiles have to be more common. > Dmitry Eremin-Solenikov(lumag) wrote: > I will change that to `gettimeofday()`. >> Petri Savolainen(psavol) wrote: >> time_t is an integer value of seconds, right? sec_c is the reference that we >> compare ODP time measurement against. Test passes if ODP measures within >> +-5% the reference. Usage of time() change the reference to be very coarse >> grained (e.g. 4, 5 or 6 sec), while the real time spent on the wait loop may >> be e.g. 5.453 sec and ODP may measure 5.461 sec and the time() measures just >> 5.0 sec. So, test result would be "fail" (5.461 vs 5.0) although ODP >> measurement error was only+0.14% (5.461 vs 5.453). >>> Dmitry Eremin-Solenikov(lumag) wrote: >>> Well, no. Please recheck. I will update description to mention that is >>> means static linking of libodp-linux into examples. muvarov wrote At his time if --disable-static-link is specified then linking is static. If it's not specified that it's dynamic. I'm looking on odp_generator. https://github.com/Linaro/odp/pull/377#discussion_r161399172 updated_at 2018-01-14 14:22:38
Re: [lng-odp] [PATCH v11] Misc fixes
muvarov replied on github web page: test/validation/api/time/time.c line 19 @@ -423,11 +423,12 @@ static void time_test_accuracy(time_cb time_cur, time_from_ns_cb time_from_ns) { int i; odp_time_t t1, t2, wait, diff; - clock_t c1, c2; + struct timeval tv1, tv2, tvdiff; double sec_t, sec_c; odp_time_t sec = time_from_ns(ODP_TIME_SEC_IN_NS); - c1 = clock(); + i = gettimeofday(, NULL); Comment: also please add link to bugz if it's bug fix to git comment. > muvarov wrote > gettimeofday() may be changed on NTP/PTP and it's not good for measuring > intervals. clock_gettime(CLOCK_MONOTONIC, ...) I think will be good one here. >> Dmitry Eremin-Solenikov(lumag) wrote: >> This example is not generic enough. It uses atomic primitives directly. >>> muvarov wrote >>> This kind of thing which is better to avoid. If we are going to merge odp >>> implementations platforms to common repo then it might be libs which are >>> suitable for linux-generic are not needed for other platform. I think >>> examples Makefiles have to be more common. Dmitry Eremin-Solenikov(lumag) wrote: I will change that to `gettimeofday()`. > Petri Savolainen(psavol) wrote: > time_t is an integer value of seconds, right? sec_c is the reference that > we compare ODP time measurement against. Test passes if ODP measures > within +-5% the reference. Usage of time() change the reference to be > very coarse grained (e.g. 4, 5 or 6 sec), while the real time spent on > the wait loop may be e.g. 5.453 sec and ODP may measure 5.461 sec and the > time() measures just 5.0 sec. So, test result would be "fail" (5.461 vs > 5.0) although ODP measurement error was only+0.14% (5.461 vs 5.453). >> Dmitry Eremin-Solenikov(lumag) wrote: >> Well, no. Please recheck. I will update description to mention that is >> means static linking of libodp-linux into examples. >>> muvarov wrote >>> At his time if --disable-static-link is specified then linking is >>> static. If it's not specified that it's dynamic. I'm looking on >>> odp_generator. https://github.com/Linaro/odp/pull/377#discussion_r161399563 updated_at 2018-01-14 14:34:05
Re: [lng-odp] [PATCH v11] Misc fixes
Dmitry Eremin-Solenikov(lumag) replied on github web page: test/validation/api/time/time.c line 19 @@ -423,11 +423,12 @@ static void time_test_accuracy(time_cb time_cur, time_from_ns_cb time_from_ns) { int i; odp_time_t t1, t2, wait, diff; - clock_t c1, c2; + struct timeval tv1, tv2, tvdiff; double sec_t, sec_c; odp_time_t sec = time_from_ns(ODP_TIME_SEC_IN_NS); - c1 = clock(); + i = gettimeofday(, NULL); Comment: Nice idea, I will update this PR. > muvarov wrote > Ok, Than. Agree. >> muvarov wrote >> also please add link to bugz if it's bug fix to git comment. >>> muvarov wrote >>> gettimeofday() may be changed on NTP/PTP and it's not good for measuring >>> intervals. clock_gettime(CLOCK_MONOTONIC, ...) I think will be good one >>> here. Dmitry Eremin-Solenikov(lumag) wrote: This example is not generic enough. It uses atomic primitives directly. > muvarov wrote > This kind of thing which is better to avoid. If we are going to merge odp > implementations platforms to common repo then it might be libs which are > suitable for linux-generic are not needed for other platform. I think > examples Makefiles have to be more common. >> Dmitry Eremin-Solenikov(lumag) wrote: >> I will change that to `gettimeofday()`. >>> Petri Savolainen(psavol) wrote: >>> time_t is an integer value of seconds, right? sec_c is the reference >>> that we compare ODP time measurement against. Test passes if ODP >>> measures within +-5% the reference. Usage of time() change the >>> reference to be very coarse grained (e.g. 4, 5 or 6 sec), while the >>> real time spent on the wait loop may be e.g. 5.453 sec and ODP may >>> measure 5.461 sec and the time() measures just 5.0 sec. So, test result >>> would be "fail" (5.461 vs 5.0) although ODP measurement error was >>> only+0.14% (5.461 vs 5.453). Dmitry Eremin-Solenikov(lumag) wrote: Well, no. Please recheck. I will update description to mention that is means static linking of libodp-linux into examples. > muvarov wrote > At his time if --disable-static-link is specified then linking is > static. If it's not specified that it's dynamic. I'm looking on > odp_generator. https://github.com/Linaro/odp/pull/377#discussion_r161400055 updated_at 2018-01-14 14:50:03
Re: [lng-odp] [PATCH v11] Misc fixes
Dmitry Eremin-Solenikov(lumag) replied on github web page: example/ipfragreass/Makefile.am line 3 @@ -1,5 +1,7 @@ include $(top_srcdir)/example/Makefile.inc +LDADD += $(ATOMIC_LIBS) Comment: This example is not generic enough. It uses atomic primitives directly. > muvarov wrote > This kind of thing which is better to avoid. If we are going to merge odp > implementations platforms to common repo then it might be libs which are > suitable for linux-generic are not needed for other platform. I think > examples Makefiles have to be more common. >> Dmitry Eremin-Solenikov(lumag) wrote: >> I will change that to `gettimeofday()`. >>> Petri Savolainen(psavol) wrote: >>> time_t is an integer value of seconds, right? sec_c is the reference that >>> we compare ODP time measurement against. Test passes if ODP measures within >>> +-5% the reference. Usage of time() change the reference to be very coarse >>> grained (e.g. 4, 5 or 6 sec), while the real time spent on the wait loop >>> may be e.g. 5.453 sec and ODP may measure 5.461 sec and the time() measures >>> just 5.0 sec. So, test result would be "fail" (5.461 vs 5.0) although ODP >>> measurement error was only+0.14% (5.461 vs 5.453). Dmitry Eremin-Solenikov(lumag) wrote: Well, no. Please recheck. I will update description to mention that is means static linking of libodp-linux into examples. > muvarov wrote > At his time if --disable-static-link is specified then linking is static. > If it's not specified that it's dynamic. I'm looking on odp_generator. https://github.com/Linaro/odp/pull/377#discussion_r161399518 updated_at 2018-01-14 14:32:54
Re: [lng-odp] [PATCH v11] Misc fixes
Dmitry Eremin-Solenikov(lumag) replied on github web page: test/validation/api/time/time.c @@ -436,12 +436,12 @@ static void time_test_accuracy(time_cb time_cur, time_from_ns_cb time_from_ns) wait = odp_time_sum(wait, sec); } + c2 = time(NULL); t2 = time_cur(); - c2 = clock(); diff = odp_time_diff(t2, t1); sec_t = ((double)odp_time_to_ns(diff)) / ODP_TIME_SEC_IN_NS; - sec_c = ((double)(c2 - c1)) / CLOCKS_PER_SEC; + sec_c = ((double)(c2 - c1)); Comment: I will change that to `gettimeofday()`. > Petri Savolainen(psavol) wrote: > time_t is an integer value of seconds, right? sec_c is the reference that we > compare ODP time measurement against. Test passes if ODP measures within +-5% > the reference. Usage of time() change the reference to be very coarse grained > (e.g. 4, 5 or 6 sec), while the real time spent on the wait loop may be e.g. > 5.453 sec and ODP may measure 5.461 sec and the time() measures just 5.0 sec. > So, test result would be "fail" (5.461 vs 5.0) although ODP measurement error > was only+0.14% (5.461 vs 5.453). >> Dmitry Eremin-Solenikov(lumag) wrote: >> Well, no. Please recheck. I will update description to mention that is means >> static linking of libodp-linux into examples. >>> muvarov wrote >>> At his time if --disable-static-link is specified then linking is static. >>> If it's not specified that it's dynamic. I'm looking on odp_generator. https://github.com/Linaro/odp/pull/377#discussion_r159528690 updated_at 2018-01-03 21:54:54