summaryrefslogtreecommitdiffstats
path: root/scripts/trex-cfg
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2017-01-29 10:08:52 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2017-01-29 10:08:52 +0200
commit2010a51c58f6ff45f0dd5bc60e8a3b71dab45bd4 (patch)
tree3ea498230a12c8cff994defcff50ffd7ab67dcdb /scripts/trex-cfg
parent895da2ca2e7fd54693441c54bc92af995984a9da (diff)
.ko module automatic generation: build first, load afterwards.
Change-Id: I1d6db501c4a3ca6029c2ee42ea13d5fabb0fa02a Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/trex-cfg')
-rwxr-xr-xscripts/trex-cfg15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/trex-cfg b/scripts/trex-cfg
index 08e1110f..02d50eb6 100755
--- a/scripts/trex-cfg
+++ b/scripts/trex-cfg
@@ -47,13 +47,7 @@ if ! lsmod | grep -q igb_uio ; then
exit 1
fi
km=ko/$SYS/igb_uio.ko
- if [ -e $km ] ; then
- insmod $km
- if [ $? -ne 0 ]; then
- echo "Failed inserting igb_uio module"
- exit 1
- fi
- else
+ if [ ! -e $km ]; then
echo "ERROR: We don't have precompiled igb_uio.ko module for your kernel version"
echo Will try compiling automatically.
{
@@ -73,6 +67,13 @@ if ! lsmod | grep -q igb_uio ; then
}
echo Success.
fi
+ if [ -e $km ]; then
+ insmod $km
+ if [ $? -ne 0 ]; then
+ echo "Failed inserting igb_uio module"
+ exit 1
+ fi
+ fi
fi
# try to bind the ports from the configuration file (new DPDK)