From: "Zhang, Jerry" <jerry.zhang@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] DPDK cpuflag check failure
Date: Sun, 28 Sep 2014 07:39:57 +0000 [thread overview]
Message-ID: <FA09AAB07F084C4DA208D537E2734D2C374BE405@CDSMSX102.ccr.corp.intel.com> (raw)
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);
}
}
}
next reply other threads:[~2014-09-28 7:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-28 7:39 Zhang, Jerry [this message]
2014-09-28 12:41 ` Neil Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FA09AAB07F084C4DA208D537E2734D2C374BE405@CDSMSX102.ccr.corp.intel.com \
--to=jerry.zhang@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).