Re: [dpdk-dev] [PATCH 4/4] eal/x86: implement arch-specific TSC freq query

2017-10-13 Thread Bruce Richardson
On Fri, Oct 13, 2017 at 08:13:06AM -0700, Stephen Hemminger wrote: > On Fri, 13 Oct 2017 09:30:43 +0200 > Thomas Monjalon wrote: > > > 13/10/2017 05:47, Stephen Hemminger: > > > On Fri, 13 Oct 2017 02:02:47 +0200 > > > Thomas Monjalon wrote: > > > > > > > +static uint32_t > > > > +check_model

Re: [dpdk-dev] [PATCH 4/4] eal/x86: implement arch-specific TSC freq query

2017-10-13 Thread Stephen Hemminger
On Fri, 13 Oct 2017 09:30:43 +0200 Thomas Monjalon wrote: > 13/10/2017 05:47, Stephen Hemminger: > > On Fri, 13 Oct 2017 02:02:47 +0200 > > Thomas Monjalon wrote: > > > > > +static uint32_t > > > +check_model_wsm_nhm(uint8_t model) > > > +{ > > > + switch (model) { > > > + /* Westmere */ > >

Re: [dpdk-dev] [PATCH 4/4] eal/x86: implement arch-specific TSC freq query

2017-10-13 Thread Thomas Monjalon
13/10/2017 05:47, Stephen Hemminger: > On Fri, 13 Oct 2017 02:02:47 +0200 > Thomas Monjalon wrote: > > > +static uint32_t > > +check_model_wsm_nhm(uint8_t model) > > +{ > > + switch (model) { > > + /* Westmere */ > > + case 0x25: > > + case 0x2C: > > + case 0x2F: > > + /* Nehalem */ >

Re: [dpdk-dev] [PATCH 4/4] eal/x86: implement arch-specific TSC freq query

2017-10-12 Thread Stephen Hemminger
On Fri, 13 Oct 2017 02:02:47 +0200 Thomas Monjalon wrote: > +static uint32_t > +check_model_wsm_nhm(uint8_t model) > +{ > + switch (model) { > + /* Westmere */ > + case 0x25: > + case 0x2C: > + case 0x2F: > + /* Nehalem */ > + case 0x1E: > + case 0x1F: > + case

[dpdk-dev] [PATCH 4/4] eal/x86: implement arch-specific TSC freq query

2017-10-12 Thread Thomas Monjalon
From: Sergio Gonzalez Monroy First, try to use CPUID Time Stamp Counter and Nominal Core Crystal Clock Information Leaf to determine the tsc hz on platforms that supports it (does not require privileged user). If the CPUID leaf is not available, then try to determine the tsc hz by reading the MS