From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Vyal Subject: Re: Sporadic errors while initializing NICs in example applications, dpdk-1.5.0r1 Date: Fri, 06 Dec 2013 16:43:11 +0400 Message-ID: <52A1C65F.7000308@gmail.com> References: <528F4E41.2000405@gmail.com> <52987236.3020707@gmail.com> <3439195.NJQbpGS54N@x220> <1535896.tMWsNx1bj7@x220> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Thomas Monjalon Return-path: In-Reply-To: <1535896.tMWsNx1bj7@x220> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On 11/29/2013 04:39 PM, Thomas Monjalon wrote: > 29/11/2013 13:25, Thomas Monjalon : > > Please check that your hardware do not support invariant TSC. > It would explain why you need to fix frequency. > > I attach a simple code to test CPU feature "Invariant TSC". I compiled and ran the code on all the platforms I had troubles on. Invariant TSC is supported everywhere. > It seems that the file is stripped on the mailing-list. > Code inlined: > > #include > #include > #include > #include > > > int main() > { > uint32_t a = 0x80000000; > uint32_t b, d; > > __asm__("cpuid;" > :"=a"(b) > :"0"(a)); > > if (b >= 0x80000007) { > > a = 0x80000007; > __asm__("cpuid;" > :"=a"(b), "=d"(d) > :"0"(a)); > > if (d & (1<<8)) { > printf("Invariant TSC is supported\n"); > } else{ > printf("Invariant TSC is NOT supported\n"); > } > } else { > printf("No support for Advanced Power Management Information in > CPUID\n"); > } > return 0; > } >