scripts: fix configure & autotest scripts that check for Intel proc
Used to determine whether IDXD isto be configured, previous check did not work on FreeBSD, only Linux. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: I70148ee2f0fffc83c2b89d2de6e81193b9357d3f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2060 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
40e5d4a0bc
commit
2755fbdf35
9
configure
vendored
9
configure
vendored
@ -473,8 +473,13 @@ fi
|
||||
|
||||
# IDXD uses Intel specific instructions.
|
||||
if [[ "${CONFIG[IDXD]}" = "y" ]]; then
|
||||
intel="GenuineIntel"
|
||||
cpu_vendor=$(grep -i 'vendor' /proc/cpuinfo --max-count=1)
|
||||
if [ $(uname -s) == "FreeBSD" ]; then
|
||||
intel="hw.model: Intel"
|
||||
cpu_vendor=$(sysctl -a | grep hw.model | cut -c 1-15)
|
||||
else
|
||||
intel="GenuineIntel"
|
||||
cpu_vendor=$(grep -i 'vendor' /proc/cpuinfo --max-count=1)
|
||||
fi
|
||||
if [[ "$cpu_vendor" != *"$intel"* ]]; then
|
||||
echo "ERROR: IDXD cannot be used due to CPU incompatiblity."
|
||||
exit 1
|
||||
|
@ -221,8 +221,13 @@ function get_config_params() {
|
||||
config_params+=' --with-rdma'
|
||||
fi
|
||||
|
||||
intel="GenuineIntel"
|
||||
cpu_vendor=$(grep -i 'vendor' /proc/cpuinfo --max-count=1)
|
||||
if [ $(uname -s) == "FreeBSD" ]; then
|
||||
intel="hw.model: Intel"
|
||||
cpu_vendor=$(sysctl -a | grep hw.model | cut -c 1-15)
|
||||
else
|
||||
intel="GenuineIntel"
|
||||
cpu_vendor=$(grep -i 'vendor' /proc/cpuinfo --max-count=1)
|
||||
fi
|
||||
if [[ "$cpu_vendor" != *"$intel"* ]]; then
|
||||
config_params+=" --without-idxd"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user