summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJerin Jacob <jerin.jacob@caviumnetworks.com>2016-03-14 17:45:32 +0530
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-03-24 22:04:10 +0100
commit4e72892c3367b9fcff70868c29d1e9236ee57d04 (patch)
treea6566c0f63bdfafe1110ba3b48c2e5011ab7fb4c /tools
parent080358a3155b73dd00f5abe8290c6e84e595b03b (diff)
downloaddpdk-4e72892c3367b9fcff70868c29d1e9236ee57d04.zip
dpdk-4e72892c3367b9fcff70868c29d1e9236ee57d04.tar.gz
dpdk-4e72892c3367b9fcff70868c29d1e9236ee57d04.tar.xz
tools: fix setup with built-in kernel modules
probe the kernel module existence through /sys/module/ to make it work with both module and inbuilt kernel module Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/setup.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/setup.sh b/tools/setup.sh
index b290b87..6097ab7 100755
--- a/tools/setup.sh
+++ b/tools/setup.sh
@@ -427,7 +427,7 @@ grep_meminfo()
#
show_nics()
{
- if /sbin/lsmod | grep -q -e igb_uio -e vfio_pci; then
+ if [ -d /sys/module/vfio_pci -o -d /sys/module/igb_uio ]; then
${RTE_SDK}/tools/dpdk_nic_bind.py --status
else
echo "# Please load the 'igb_uio' or 'vfio-pci' kernel module before "
@@ -440,7 +440,7 @@ show_nics()
#
bind_nics_to_vfio()
{
- if /sbin/lsmod | grep -q vfio_pci ; then
+ if [ -d /sys/module/vfio_pci ]; then
${RTE_SDK}/tools/dpdk_nic_bind.py --status
echo ""
echo -n "Enter PCI address of device to bind to VFIO driver: "
@@ -458,7 +458,7 @@ bind_nics_to_vfio()
#
bind_nics_to_igb_uio()
{
- if /sbin/lsmod | grep -q igb_uio ; then
+ if [ -d /sys/module/igb_uio ]; then
${RTE_SDK}/tools/dpdk_nic_bind.py --status
echo ""
echo -n "Enter PCI address of device to bind to IGB UIO driver: "