From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 5AC887E0F for ; Sun, 28 Sep 2014 14:34:44 +0200 (CEST) Received: from [2001:470:8:a08:215:ff:fecc:4872] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1XYDmq-00051q-Be; Sun, 28 Sep 2014 08:41:14 -0400 Date: Sun, 28 Sep 2014 08:41:09 -0400 From: Neil Horman To: "Zhang, Jerry" Message-ID: <20140928124109.GD30445@localhost.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] DPDK cpuflag check failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 12:34:44 -0000 On Sun, Sep 28, 2014 at 07:39:57AM +0000, Zhang, Jerry wrote: > Hi all, > > Do you know why DPDK(shared library) constructor function rte_cpu_check_supported() needs to check some unnecessary CPU flags which is not used by current DPDK such as "AES"? > > On Hehalem platform with GCC4.8, using shard DPDK library, it will report AES is not supported. But actually AES instructions is not used by current DPDK. > The function you reference is meant to assert that all the cpu features that were enabled during the build are supported on the processor. I expect you enabled the crypto test, and as such the AES instructions were enabled in the build. disable the examples build and you'll probably be ok. Neil > Thanks! > > #ifndef __INTEL_COMPILER > void __attribute__ ((__constructor__)) > #else > void > #endif > rte_cpu_check_supported(void) > { > /* This is generated at compile-time by the build system */ > static const enum rte_cpu_flag_t compile_time_flags[] = { > RTE_COMPILE_TIME_CPUFLAGS > }; > unsigned i; > int ret; > > for (i = 0; i < sizeof(compile_time_flags)/sizeof(compile_time_flags[0]); i++) { > ret = rte_cpu_get_flag_enabled(compile_time_flags[i]); > > if (ret < 0) { > fprintf(stderr, > "ERROR: CPU feature flag lookup failed with error %d\n", > ret); > exit(1); > } > if (!ret) { > fprintf(stderr, > "ERROR: This system does not support \"%s\".\n" > "Please check that RTE_MACHINE is set correctly.\n", > cpu_feature_table[compile_time_flags[i]].name); > exit(1); > } > } > }