From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: <dev@dpdk.org>
Cc: <thomas.monjalon@6wind.com>,
Jerin Jacob <jerin.jacob@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH 2/2] tools/setup.sh: Support built-in kernel modules
Date: Mon, 14 Mar 2016 17:45:32 +0530 [thread overview]
Message-ID: <1457957732-24066-3-git-send-email-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <1457957732-24066-1-git-send-email-jerin.jacob@caviumnetworks.com>
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>
---
tools/setup.sh | 6 +++---
1 file 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: "
--
2.1.0
next prev parent reply other threads:[~2016-03-14 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 12:15 [dpdk-dev] [PATCH 0/2] tools/setup.sh fixes Jerin Jacob
2016-03-14 12:15 ` [dpdk-dev] [PATCH 1/2] tools/setup.sh: remove 2MB huge page size hard-cording Jerin Jacob
2016-03-14 12:15 ` Jerin Jacob [this message]
2016-03-24 21:02 ` [dpdk-dev] [PATCH 0/2] tools/setup.sh fixes Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457957732-24066-3-git-send-email-jerin.jacob@caviumnetworks.com \
--to=jerin.jacob@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).