diff mbox series

[v2,2/6] usertools/setup: remove inserting custom kernel modules

Message ID 20201126141832.2277628-3-ferruh.yigit@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Thomas Monjalon
Headers show
Series update dpdk-setup.sh | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ferruh Yigit Nov. 26, 2020, 2:18 p.m. UTC
Custom DPDK kernel module insert support relies on make based build
variable 'RTE_TARGET' to find the location of the kernel modules, which
is not valid anymore.

Also 'igb_uio' kernel module moved to another git repository:
https://git.dpdk.org/dpdk-kmods/

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/linux_gsg/quick_start.rst | 51 +++++++---------
 usertools/dpdk-setup.sh              | 91 +++++-----------------------
 2 files changed, 37 insertions(+), 105 deletions(-)

Comments

Walsh, Conor Nov. 26, 2020, 2:49 p.m. UTC | #1
Hi Ferruh,

Tested V2 patch, the docs also build successfully.

Thanks,
Conor.

> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Thursday 26 November 2020 14:18
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; dev@dpdk.org;
> techboard@dpdk.org; Stephen Hemminger
> <stephen@networkplumber.org>; Richardson, Bruce
> <bruce.richardson@intel.com>; Walsh, Conor <conor.walsh@intel.com>
> Subject: [PATCH v2 2/6] usertools/setup: remove inserting custom kernel
> modules
> 
> Custom DPDK kernel module insert support relies on make based build
> variable 'RTE_TARGET' to find the location of the kernel modules, which
> is not valid anymore.
> 
> Also 'igb_uio' kernel module moved to another git repository:
> https://git.dpdk.org/dpdk-kmods/
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Tested-by: Conor Walsh <conor.walsh@intel.com>
diff mbox series

Patch

diff --git a/doc/guides/linux_gsg/quick_start.rst b/doc/guides/linux_gsg/quick_start.rst
index b9ac94bd6f4b..14c4c7763aed 100644
--- a/doc/guides/linux_gsg/quick_start.rst
+++ b/doc/guides/linux_gsg/quick_start.rst
@@ -8,11 +8,11 @@  Quick Start Setup Script
 
 The dpdk-setup.sh script, found in the usertools subdirectory, allows the user to perform the following tasks:
 
-*   Insert and remove the DPDK IGB_UIO kernel module
-
 *   Insert and remove VFIO kernel modules
 
-*   Insert and remove the DPDK KNI kernel module
+*   Remove the DPDK IGB_UIO kernel module
+
+*   Remove the DPDK KNI kernel module
 
 *   Create and delete hugepages for NUMA and non-NUMA cases
 
@@ -39,8 +39,7 @@  The following is a brief synopsis of each step.
 
 The user configures the Linux* environment to support the running of DPDK applications.
 Hugepages can be set up for NUMA or non-NUMA systems. Any existing hugepages will be removed.
-The DPDK kernel module that is needed can also be inserted in this step,
-and network ports may be bound to this module for DPDK application use.
+Network ports may be bound to DPDK kernel module for DPDK application use.
 
 **Step 2: Run an Application**
 
@@ -81,23 +80,19 @@  Some options in the script prompt the user for further data before proceeding.
 
     ------------------------------------------------------------------------
 
-    [1] Insert IGB UIO module
-
-    [2] Insert VFIO module
-
-    [3] Insert KNI module
+    [1] Insert VFIO module
 
-    [4] Setup hugepage mappings for non-NUMA systems
+    [2] Setup hugepage mappings for non-NUMA systems
 
-    [5] Setup hugepage mappings for NUMA systems
+    [3] Setup hugepage mappings for NUMA systems
 
-    [6] Display current Ethernet device settings
+    [4] Display current Ethernet device settings
 
-    [7] Bind Ethernet device to IGB UIO module
+    [5] Bind Ethernet device to IGB UIO module
 
-    [8] Bind Ethernet device to VFIO module
+    [6] Bind Ethernet device to VFIO module
 
-    [9] Setup VFIO permissions
+    [7] Setup VFIO permissions
 
     ------------------------------------------------------------------------
 
@@ -105,9 +100,9 @@  Some options in the script prompt the user for further data before proceeding.
 
     ------------------------------------------------------------------------
 
-    [10] Run test application ($RTE_TARGET/app/test)
+    [8] Run test application ($RTE_TARGET/app/test)
 
-    [11] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
+    [9] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
 
     ------------------------------------------------------------------------
 
@@ -115,7 +110,7 @@  Some options in the script prompt the user for further data before proceeding.
 
     ------------------------------------------------------------------------
 
-    [12] List hugepage info from /proc/meminfo
+    [10] List hugepage info from /proc/meminfo
 
     ------------------------------------------------------------------------
 
@@ -123,17 +118,17 @@  Some options in the script prompt the user for further data before proceeding.
 
     ------------------------------------------------------------------------
 
-    [13] Unbind NICs from IGB UIO driver
+    [11] Unbind NICs from IGB UIO driver
 
-    [14] Remove IGB UIO module
+    [12] Remove IGB UIO module
 
-    [15] Remove VFIO module
+    [13] Remove VFIO module
 
-    [16] Remove KNI module
+    [14] Remove KNI module
 
-    [17] Remove hugepage mappings
+    [15] Remove hugepage mappings
 
-    [18] Exit Script
+    [16] Exit Script
 
     Option:
 
@@ -141,7 +136,7 @@  The following selection demonstrates the starting of the DPDK UIO driver.
 
 .. code-block:: console
 
-    Option: 14
+    Option: 12
 
     Unloading any existing DPDK UIO module
     Loading DPDK UIO module
@@ -157,7 +152,7 @@  The result is that the application should use -m 4096 for starting the applicati
 
 .. code-block:: console
 
-    Option: 5
+    Option: 3
 
     Removing currently reserved hugepages
     mounting /mnt/huge and removing directory
@@ -173,7 +168,7 @@  The following selection demonstrates the launch of the test application to run o
 
 .. code-block:: console
 
-    Option: 10
+    Option: 8
 
     Enter hex bitmask of cores to execute test app on
     Example: to execute app on cores 0 to 7, enter 0xff
diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
index d1eb188692a6..bcf0c843678f 100755
--- a/usertools/dpdk-setup.sh
+++ b/usertools/dpdk-setup.sh
@@ -78,39 +78,6 @@  remove_igb_uio_module()
 	fi
 }
 
-#
-# Loads new igb_uio.ko (and uio module if needed).
-#
-load_igb_uio_module()
-{
-	if [ ! -f $RTE_SDK/$RTE_TARGET/kmod/igb_uio.ko ];then
-		echo "## ERROR: Target does not have the DPDK UIO Kernel Module."
-		echo "       To fix, please try to rebuild target."
-		return
-	fi
-
-	remove_igb_uio_module
-
-	/sbin/lsmod | grep -s uio > /dev/null
-	if [ $? -ne 0 ] ; then
-		modinfo uio > /dev/null
-		if [ $? -eq 0 ]; then
-			echo "Loading uio module"
-			sudo /sbin/modprobe uio
-		fi
-	fi
-
-	# UIO may be compiled into kernel, so it may not be an error if it can't
-	# be loaded.
-
-	echo "Loading DPDK UIO module"
-	sudo /sbin/insmod $RTE_SDK/$RTE_TARGET/kmod/igb_uio.ko
-	if [ $? -ne 0 ] ; then
-		echo "## ERROR: Could not load kmod/igb_uio.ko."
-		quit
-	fi
-}
-
 #
 # Unloads VFIO modules.
 #
@@ -171,30 +138,6 @@  remove_kni_module()
 	fi
 }
 
-#
-# Loads the rte_kni.ko module.
-#
-load_kni_module()
-{
-    # Check that the KNI module is already built.
-	if [ ! -f $RTE_SDK/$RTE_TARGET/kmod/rte_kni.ko ];then
-		echo "## ERROR: Target does not have the DPDK KNI Module."
-		echo "       To fix, please try to rebuild target."
-		return
-	fi
-
-    # Unload existing version if present.
-	remove_kni_module
-
-    # Now try load the KNI module.
-	echo "Loading DPDK KNI module"
-	sudo /sbin/insmod $RTE_SDK/$RTE_TARGET/kmod/rte_kni.ko
-	if [ $? -ne 0 ] ; then
-		echo "## ERROR: Could not load kmod/rte_kni.ko."
-		quit
-	fi
-}
-
 #
 # Sets appropriate permissions on /dev/vfio/* files
 #
@@ -416,32 +359,26 @@  step1_func()
 {
 	TITLE="Setup linux environment"
 
-	TEXT[1]="Insert IGB UIO module"
-	FUNC[1]="load_igb_uio_module"
-
-	TEXT[2]="Insert VFIO module"
-	FUNC[2]="load_vfio_module"
-
-	TEXT[3]="Insert KNI module"
-	FUNC[3]="load_kni_module"
+	TEXT[1]="Insert VFIO module"
+	FUNC[1]="load_vfio_module"
 
-	TEXT[4]="Setup hugepage mappings for non-NUMA systems"
-	FUNC[4]="set_non_numa_pages"
+	TEXT[2]="Setup hugepage mappings for non-NUMA systems"
+	FUNC[2]="set_non_numa_pages"
 
-	TEXT[5]="Setup hugepage mappings for NUMA systems"
-	FUNC[5]="set_numa_pages"
+	TEXT[3]="Setup hugepage mappings for NUMA systems"
+	FUNC[3]="set_numa_pages"
 
-	TEXT[6]="Display current Ethernet/Baseband/Crypto device settings"
-	FUNC[6]="show_devices"
+	TEXT[4]="Display current Ethernet/Baseband/Crypto device settings"
+	FUNC[4]="show_devices"
 
-	TEXT[7]="Bind Ethernet/Baseband/Crypto device to IGB UIO module"
-	FUNC[7]="bind_devices_to_igb_uio"
+	TEXT[5]="Bind Ethernet/Baseband/Crypto device to IGB UIO module"
+	FUNC[5]="bind_devices_to_igb_uio"
 
-	TEXT[8]="Bind Ethernet/Baseband/Crypto device to VFIO module"
-	FUNC[8]="bind_devices_to_vfio"
+	TEXT[6]="Bind Ethernet/Baseband/Crypto device to VFIO module"
+	FUNC[6]="bind_devices_to_vfio"
 
-	TEXT[9]="Setup VFIO permissions"
-	FUNC[9]="set_vfio_permissions"
+	TEXT[7]="Setup VFIO permissions"
+	FUNC[7]="set_vfio_permissions"
 }
 
 #