summaryrefslogtreecommitdiffstats
path: root/scripts/t-rex-64
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-06-24 14:03:29 +0300
committerHanoh Haim <hhaim@cisco.com>2015-06-24 14:03:29 +0300
commit8b52a31ed2c299b759f330c4f976b9c70f5765f4 (patch)
tree9d6da5438b5b56b1d2d57e6c13494b4e65d000e7 /scripts/t-rex-64
first version
Diffstat (limited to 'scripts/t-rex-64')
-rwxr-xr-xscripts/t-rex-6425
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/t-rex-64 b/scripts/t-rex-64
new file mode 100755
index 00000000..d33cc3e8
--- /dev/null
+++ b/scripts/t-rex-64
@@ -0,0 +1,25 @@
+#! /bin/bash
+./trex-cfg $@
+RESULT=$?
+if [ $RESULT -ne 0 ]; then
+ exit $RESULT
+fi
+
+
+cd $(dirname $0)
+export LD_LIBRARY_PATH=$PWD
+saveterm="$(stty -g)"
+# if we have a new core run optimized trex
+if cat /proc/cpuinfo | grep -q avx ; then
+ ./_$(basename $0) $@
+ if [ $? -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 $@
+ fi
+else
+ ./_t-rex-64-o $@
+fi
+stty $saveterm
+