diff options
author | Yichen Wang <yicwang@cisco.com> | 2017-03-04 23:58:41 -0800 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2017-03-05 23:39:29 +0200 |
commit | 90c88873e54d100a944761f69a998085cae3f14b (patch) | |
tree | 4ce284dd2bc3193acaea7172a1fa1071ae9c451b /scripts/trex-cfg | |
parent | 0bbb5c5fc9934d516337602ac3bdb80d60302be4 (diff) |
Use vfio-pci as DPDK driver if prerequisites are satisfied
Change-Id: Ic43742256e3f69361d0413b672341f1ea4cc02fc
Signed-off-by: Yichen Wang <yicwang@cisco.com>
Conflicts:
scripts/dpdk_setup_ports.py
Diffstat (limited to 'scripts/trex-cfg')
-rwxr-xr-x | scripts/trex-cfg | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/trex-cfg b/scripts/trex-cfg index aaaa2a32..5945a074 100755 --- a/scripts/trex-cfg +++ b/scripts/trex-cfg @@ -45,7 +45,10 @@ done PATH=$PATH:/sbin:/usr/sbin -if ! lsmod | grep -q igb_uio ; then +VFIO_PCI_KO=`find /lib/modules/$(uname -r) -type f -name vfio-pci.ko` +if [ $VFIO_PCI_KO ] && grep "iommu=pt" /proc/cmdline | grep -q "intel_iommu=on" ; then + modprobe vfio-pci +elif ! lsmod | grep -q igb_uio ; then echo "Loading kernel drivers for the first time" modprobe uio if [ $? -ne 0 ]; then |