setup.sh: Watch for NUMA_NO_NODE value
The -1 is valid value indicating that the node id for given device has not been specified. Detect it and map it to "unknown". Change-Id: Id97d9046be0e4d5ff257bca66ae3e73e906253fe Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2229 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
5853749ba0
commit
15f52aec2f
@ -612,6 +612,9 @@ function status_linux() {
|
||||
node="-"
|
||||
else
|
||||
node=$(cat /sys/bus/pci/devices/$bdf/numa_node)
|
||||
if ((node == -1)); then
|
||||
node=unknown
|
||||
fi
|
||||
fi
|
||||
device=$(cat /sys/bus/pci/devices/$bdf/device)
|
||||
vendor=$(cat /sys/bus/pci/devices/$bdf/vendor)
|
||||
@ -637,6 +640,9 @@ function status_linux() {
|
||||
node="-"
|
||||
else
|
||||
node=$(cat /sys/bus/pci/devices/$bdf/numa_node)
|
||||
if ((node == -1)); then
|
||||
node=unknown
|
||||
fi
|
||||
fi
|
||||
device=$(cat /sys/bus/pci/devices/$bdf/device)
|
||||
vendor=$(cat /sys/bus/pci/devices/$bdf/vendor)
|
||||
@ -679,6 +685,9 @@ function status_linux() {
|
||||
node="-"
|
||||
else
|
||||
node=$(cat /sys/bus/pci/devices/$bdf/numa_node)
|
||||
if ((node == -1)); then
|
||||
node=unknown
|
||||
fi
|
||||
fi
|
||||
device=$(cat /sys/bus/pci/devices/$bdf/device)
|
||||
vendor=$(cat /sys/bus/pci/devices/$bdf/vendor)
|
||||
@ -698,6 +707,9 @@ function status_linux() {
|
||||
for bdf in ${pci_bus_cache["0x8086:0x$dev_id"]}; do
|
||||
driver=$(grep DRIVER /sys/bus/pci/devices/$bdf/uevent | awk -F"=" '{print $2}')
|
||||
node=$(cat /sys/bus/pci/devices/$bdf/numa_node)
|
||||
if ((node == -1)); then
|
||||
node=unknown
|
||||
fi
|
||||
echo -e "$bdf\t$node\t\t$driver"
|
||||
done
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user