DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] DPDK cpuflag check failure
@ 2014-09-28  7:39 Zhang, Jerry
  2014-09-28 12:41 ` Neil Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Jerry @ 2014-09-28  7:39 UTC (permalink / raw)
  To: dev

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.

    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);
		}
	}
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-28 12:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-28  7:39 [dpdk-dev] DPDK cpuflag check failure Zhang, Jerry
2014-09-28 12:41 ` Neil Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).