Re: [dpdk-dev] [PATCH v2 1/6] eal: add internal API for current time

2021-03-17 Thread Morten Brørup
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Dmitry Kozlyuk > Sent: Tuesday, March 16, 2021 9:08 PM > > 2021-03-16 11:59 (UTC-0700), Stephen Hemminger: > > On Sun, 14 Feb 2021 05:16:11 +0300 > > Dmitry Kozlyuk wrote: > > > > > +rte_time_get_us(struct rte_time_us *now) > > > +{ > > > + s

Re: [dpdk-dev] [PATCH v2 1/6] eal: add internal API for current time

2021-03-16 Thread Dmitry Kozlyuk
2021-03-16 11:59 (UTC-0700), Stephen Hemminger: > On Sun, 14 Feb 2021 05:16:11 +0300 > Dmitry Kozlyuk wrote: > > > +rte_time_get_us(struct rte_time_us *now) > > +{ > > + struct timeval sys; > > + > > + gettimeofday(&sys, NULL); > > + now->sec = sys.tv_sec; > > + now->usec = sys.tv_usec; >

Re: [dpdk-dev] [PATCH v2 1/6] eal: add internal API for current time

2021-03-16 Thread Stephen Hemminger
On Sun, 14 Feb 2021 05:16:11 +0300 Dmitry Kozlyuk wrote: > +rte_time_get_us(struct rte_time_us *now) > +{ > + struct timeval sys; > + > + gettimeofday(&sys, NULL); > + now->sec = sys.tv_sec; > + now->usec = sys.tv_usec; > +} Why would drivers want the default (wall clock) time in

Re: [dpdk-dev] [PATCH v2 1/6] eal: add internal API for current time

2021-03-16 Thread Thomas Monjalon
14/02/2021 03:16, Dmitry Kozlyuk: > Many PMDs use POSIX gettimeofday(). Add rte_time_get_us() function > to obtain current time with microsecond precision on all platforms. Please could you replace the current use of gettimeofday?

Re: [dpdk-dev] [PATCH v2 1/6] eal: add internal API for current time

2021-03-05 Thread Jie Zhou
On Sun, Feb 14, 2021 at 05:16:11AM +0300, Dmitry Kozlyuk wrote: > Many PMDs use POSIX gettimeofday(). Add rte_time_get_us() function > to obtain current time with microsecond precision on all platforms. > > Signed-off-by: Dmitry Kozlyuk > --- > lib/librte_eal/include/rte_time.h| 17 +

Re: [dpdk-dev] [PATCH v2 1/6] eal: add internal API for current time

2021-03-01 Thread Nick Connolly
Many PMDs use POSIX gettimeofday(). Add rte_time_get_us() function to obtain current time with microsecond precision on all platforms. Acked-by: Nick Connolly