summaryrefslogtreecommitdiffstats
path: root/scripts/t-rex-64
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/t-rex-64')
-rwxr-xr-xscripts/t-rex-649
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/t-rex-64 b/scripts/t-rex-64
index 4e5c0fae..4d0d7813 100755
--- a/scripts/t-rex-64
+++ b/scripts/t-rex-64
@@ -12,6 +12,15 @@ if [ $RESULT -ne 0 ]; then
exit $RESULT
fi
+pci_desc_re='^(\S+) - (.+)$'
+source find_python.sh
+while read line
+do
+ if [[ "$line" =~ $pci_desc_re ]]; then
+ pci_name="pci$(echo ${BASH_REMATCH[1]} | tr ':' '_' | tr '.' '_')" # make alphanumeric name
+ export $pci_name="${BASH_REMATCH[2]}"
+ fi
+done <<< "$($PYTHON dpdk_setup_ports.py --dump-pci-description)"
cd $(dirname $0)
export LD_LIBRARY_PATH=$PWD