summaryrefslogtreecommitdiffstats
path: root/scripts/t-rex-64
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2017-02-07 15:04:41 +0200
committerIdo Barnea <ibarnea@cisco.com>2017-02-13 12:32:26 +0200
commitba126d9dde182599ada3acbcb21f0176bcc90028 (patch)
tree5bba6684bd396f6e402f2f98e8bb28dc90fa0853 /scripts/t-rex-64
parente8b47ff254dc60b7c616d49605dddf99bd6ab64e (diff)
move so flag in case of mellanox
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'scripts/t-rex-64')
-rwxr-xr-xscripts/t-rex-6414
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/t-rex-64 b/scripts/t-rex-64
index e8947f65..9ad96127 100755
--- a/scripts/t-rex-64
+++ b/scripts/t-rex-64
@@ -5,13 +5,19 @@ if [ "$(id -u)" != 0 ]; then
fi
INPUT_ARGS=${@//[–—]/-} # replace bizarre minuses with normal one
+EXTRA_INPUT_ARGS=""
./trex-cfg $INPUT_ARGS
RESULT=$?
-if [ $RESULT -ne 0 ]; then
+if [ $RESULT -lt 0 ]; then
exit $RESULT
fi
+if [ $RESULT -eq 1 ]; then
+EXTRA_INPUT_ARGS="--mlx5-so"
+fi
+
+
pci_desc_re='^(\S+) - (.+)$'
source find_python.sh
while read line
@@ -35,17 +41,17 @@ fi
# if we have a new core run optimized trex
if grep -q avx /proc/cpuinfo ; then
- ./_$(basename $0) $INPUT_ARGS
+ ./_$(basename $0) $INPUT_ARGS $EXTRA_INPUT_ARGS
RESULT=$?
if [ $RESULT -eq 132 ]; then
echo " WARNING this program is optimized for the new Intel processors. "
echo " try the ./t-rex-64-o application that should work for any Intel processor but might be slower. "
echo " try to run t-rex-64-o .. "
- ./_t-rex-64-o $INPUT_ARGS
+ ./_t-rex-64-o $INPUT_ARGS $EXTRA_INPUT_ARGS
RESULT=$?
fi
else
- ./_t-rex-64-o $INPUT_ARGS
+ ./_t-rex-64-o $INPUT_ARGS $EXTRA_INPUT_ARGS
RESULT=$?
fi