[v2,1/6] usertools/setup: remove make based build
diff mbox series

Message ID 20201126141832.2277628-2-ferruh.yigit@intel.com
State Rejected, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • update dpdk-setup.sh
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ferruh Yigit Nov. 26, 2020, 2:18 p.m. UTC
DPDK build system is switched to 'meson' based build, please check the
documentation for details: "doc/guides/linux_gsg/build_dpdk.rst"

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

Comments

Walsh, Conor Nov. 26, 2020, 2:44 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 1/6] usertools/setup: remove make based build
> 
> DPDK build system is switched to 'meson' based build, please check the
> documentation for details: "doc/guides/linux_gsg/build_dpdk.rst"
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

Patch
diff mbox series

diff --git a/doc/guides/linux_gsg/quick_start.rst b/doc/guides/linux_gsg/quick_start.rst
index 181ec00ad41d..b9ac94bd6f4b 100644
--- a/doc/guides/linux_gsg/quick_start.rst
+++ b/doc/guides/linux_gsg/quick_start.rst
@@ -8,8 +8,6 @@  Quick Start Setup Script
 
 The dpdk-setup.sh script, found in the usertools subdirectory, allows the user to perform the following tasks:
 
-*   Build the DPDK libraries
-
 *   Insert and remove the DPDK IGB_UIO kernel module
 
 *   Insert and remove VFIO kernel modules
@@ -28,10 +26,7 @@  The dpdk-setup.sh script, found in the usertools subdirectory, allows the user t
 
 *   List hugepages in ``/mnt/huge``
 
-*   Remove built DPDK libraries
-
-Once these steps have been completed for one of the EAL targets,
-the user may compile their own application that links in the EAL libraries to create the DPDK image.
+Please refer to :doc:`../prog_guide/build-sdk-meson` for building DPDK.
 
 Script Organization
 -------------------
@@ -40,31 +35,24 @@  The dpdk-setup.sh script is logically organized into a series of steps that a us
 Each step provides a number of options that guide the user to completing the desired task.
 The following is a brief synopsis of each step.
 
-**Step 1: Build DPDK Libraries**
-
-Initially, the user must select a DPDK target to choose the correct target type and compiler options to use when building the libraries.
-
-The user must have all libraries, modules, updates and compilers installed in the system prior to this,
-as described in the earlier chapters in this Getting Started Guide.
-
-**Step 2: Setup Environment**
+**Step 1: Setup Environment**
 
 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.
 
-**Step 3: Run an Application**
+**Step 2: Run an Application**
 
 The user may run the test application once the other steps have been performed.
 The test application allows the user to run a series of functional tests for the DPDK.
 The testpmd application, which supports the receiving and sending of packets, can also be run.
 
-**Step 4: Examining the System**
+**Step 3: Examining the System**
 
 This step provides some tools for examining the status of hugepage mappings.
 
-**Step 5: System Cleanup**
+**Step 4: System Cleanup**
 
 The final step has options for restoring the system to its original state.
 
@@ -89,109 +77,71 @@  Some options in the script prompt the user for further data before proceeding.
 
     ------------------------------------------------------------------------
 
-    Step 1: Select the DPDK environment to build
-
-    ------------------------------------------------------------------------
-
-    [1] i686-native-linux-gcc
-
-    [2] i686-native-linux-icc
-
-    [3] ppc_64-power8-linux-gcc
-
-    [4] x86_64-native-freebsd-clang
-
-    [5] x86_64-native-freebsd-gcc
-
-    [6] x86_64-native-linux-clang
-
-    [7] x86_64-native-linux-gcc
-
-    [8] x86_64-native-linux-icc
-
-    ------------------------------------------------------------------------
-
-    Step 2: Setup linux environment
+    Step 1: Setup linux environment
 
     ------------------------------------------------------------------------
 
-    [11] Insert IGB UIO module
+    [1] Insert IGB UIO module
 
-    [12] Insert VFIO module
+    [2] Insert VFIO module
 
-    [13] Insert KNI module
+    [3] Insert KNI module
 
-    [14] Setup hugepage mappings for non-NUMA systems
+    [4] Setup hugepage mappings for non-NUMA systems
 
-    [15] Setup hugepage mappings for NUMA systems
+    [5] Setup hugepage mappings for NUMA systems
 
-    [16] Display current Ethernet device settings
+    [6] Display current Ethernet device settings
 
-    [17] Bind Ethernet device to IGB UIO module
+    [7] Bind Ethernet device to IGB UIO module
 
-    [18] Bind Ethernet device to VFIO module
+    [8] Bind Ethernet device to VFIO module
 
-    [19] Setup VFIO permissions
+    [9] Setup VFIO permissions
 
     ------------------------------------------------------------------------
 
-    Step 3: Run test application for linux environment
+    Step 2: Run test application for linux environment
 
     ------------------------------------------------------------------------
 
-    [20] Run test application ($RTE_TARGET/app/test)
+    [10] Run test application ($RTE_TARGET/app/test)
 
-    [21] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
+    [11] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
 
     ------------------------------------------------------------------------
 
-    Step 4: Other tools
+    Step 3: Other tools
 
     ------------------------------------------------------------------------
 
-    [22] List hugepage info from /proc/meminfo
+    [12] List hugepage info from /proc/meminfo
 
     ------------------------------------------------------------------------
 
-    Step 5: Uninstall and system cleanup
+    Step 4: Uninstall and system cleanup
 
     ------------------------------------------------------------------------
 
-    [23] Uninstall all targets
-
-    [24] Unbind NICs from IGB UIO driver
-
-    [25] Remove IGB UIO module
-
-    [26] Remove VFIO module
-
-    [27] Remove KNI module
-
-    [28] Remove hugepage mappings
-
-    [29] Exit Script
+    [13] Unbind NICs from IGB UIO driver
 
-Option:
+    [14] Remove IGB UIO module
 
-The following selection demonstrates the creation of the ``x86_64-native-linux-gcc`` DPDK library.
+    [15] Remove VFIO module
 
-.. code-block:: console
+    [16] Remove KNI module
 
-    Option: 9
+    [17] Remove hugepage mappings
 
-    ================== Installing x86_64-native-linux-gcc
+    [18] Exit Script
 
-    Configuration done
-    == Build lib
-    ...
-    Build complete
-    RTE_TARGET exported as x86_64-native-linux-gcc
+    Option:
 
 The following selection demonstrates the starting of the DPDK UIO driver.
 
 .. code-block:: console
 
-    Option: 25
+    Option: 14
 
     Unloading any existing DPDK UIO module
     Loading DPDK UIO module
@@ -207,7 +157,7 @@  The result is that the application should use -m 4096 for starting the applicati
 
 .. code-block:: console
 
-    Option: 15
+    Option: 5
 
     Removing currently reserved hugepages
     mounting /mnt/huge and removing directory
@@ -223,7 +173,7 @@  The following selection demonstrates the launch of the test application to run o
 
 .. code-block:: console
 
-    Option: 20
+    Option: 10
 
     Enter hex bitmask of cores to execute test app on
     Example: to execute app on cores 0 to 7, enter 0xff
@@ -234,71 +184,3 @@  The following selection demonstrates the launch of the test application to run o
     ...
     EAL: Main core 0 is ready (tid=1b2ad720)
     RTE>>
-
-Applications
-------------
-
-Once the user has run the dpdk-setup.sh script, built one of the EAL targets and set up hugepages (if using one of the Linux EAL targets),
-the user can then move on to building and running their application or one of the examples provided.
-
-The examples in the /examples directory provide a good starting point to gain an understanding of the operation of the DPDK.
-The following command sequence shows how the helloworld sample application is built and run.
-As recommended in Section 4.2.1 , "Logical Core Use by Applications",
-the logical core layout of the platform should be determined when selecting a core mask to use for an application.
-
-.. code-block:: console
-
-    cd helloworld/
-    make
-      CC main.o
-      LD helloworld
-      INSTALL-APP helloworld
-      INSTALL-MAP helloworld.map
-
-    sudo ./build/app/helloworld -l 0-3 -n 3
-    [sudo] password for rte:
-
-    EAL: coremask set to f
-    EAL: Detected lcore 0 as core 0 on socket 0
-    EAL: Detected lcore 1 as core 0 on socket 1
-    EAL: Detected lcore 2 as core 1 on socket 0
-    EAL: Detected lcore 3 as core 1 on socket 1
-    EAL: Setting up hugepage memory...
-    EAL: Ask a virtual area of 0x200000 bytes
-    EAL: Virtual area found at 0x7f0add800000 (size = 0x200000)
-    EAL: Ask a virtual area of 0x3d400000 bytes
-    EAL: Virtual area found at 0x7f0aa0200000 (size = 0x3d400000)
-    EAL: Ask a virtual area of 0x400000 bytes
-    EAL: Virtual area found at 0x7f0a9fc00000 (size = 0x400000)
-    EAL: Ask a virtual area of 0x400000 bytes
-    EAL: Virtual area found at 0x7f0a9f600000 (size = 0x400000)
-    EAL: Ask a virtual area of 0x400000 bytes
-    EAL: Virtual area found at 0x7f0a9f000000 (size = 0x400000)
-    EAL: Ask a virtual area of 0x800000 bytes
-    EAL: Virtual area found at 0x7f0a9e600000 (size = 0x800000)
-    EAL: Ask a virtual area of 0x800000 bytes
-    EAL: Virtual area found at 0x7f0a9dc00000 (size = 0x800000)
-    EAL: Ask a virtual area of 0x400000 bytes
-    EAL: Virtual area found at 0x7f0a9d600000 (size = 0x400000)
-    EAL: Ask a virtual area of 0x400000 bytes
-    EAL: Virtual area found at 0x7f0a9d000000 (size = 0x400000)
-    EAL: Ask a virtual area of 0x400000 bytes
-    EAL: Virtual area found at 0x7f0a9ca00000 (size = 0x400000)
-    EAL: Ask a virtual area of 0x200000 bytes
-    EAL: Virtual area found at 0x7f0a9c600000 (size = 0x200000)
-    EAL: Ask a virtual area of 0x200000 bytes
-    EAL: Virtual area found at 0x7f0a9c200000 (size = 0x200000)
-    EAL: Ask a virtual area of 0x3fc00000 bytes
-    EAL: Virtual area found at 0x7f0a5c400000 (size = 0x3fc00000)
-    EAL: Ask a virtual area of 0x200000 bytes
-    EAL: Virtual area found at 0x7f0a5c000000 (size = 0x200000)
-    EAL: Requesting 1024 pages of size 2MB from socket 0
-    EAL: Requesting 1024 pages of size 2MB from socket 1
-    EAL: Main core 0 is ready (tid=de25b700)
-    EAL: Core 1 is ready (tid=5b7fe700)
-    EAL: Core 3 is ready (tid=5a7fc700)
-    EAL: Core 2 is ready (tid=5affd700)
-    hello from core 1
-    hello from core 2
-    hello from core 3
-    hello from core 0
diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
index 411bf2e07f5e..d1eb188692a6 100755
--- a/usertools/dpdk-setup.sh
+++ b/usertools/dpdk-setup.sh
@@ -36,53 +36,6 @@  q()
 	quit
 }
 
-#
-# Sets up environmental variables for ICC.
-#
-setup_icc()
-{
-	DEFAULT_PATH=/opt/intel/bin/iccvars.sh
-	param=$1
-	shpath=`which iccvars.sh 2> /dev/null`
-	if [ $? -eq 0 ] ; then
-		echo "Loading iccvars.sh from $shpath for $param"
-		source $shpath $param
-	elif [ -f $DEFAULT_PATH ] ; then
-		echo "Loading iccvars.sh from $DEFAULT_PATH for $param"
-		source $DEFAULT_PATH $param
-	else
-		echo "## ERROR: cannot find 'iccvars.sh' script to set up ICC."
-		echo "##     To fix, please add the directory that contains"
-		echo "##     iccvars.sh  to your 'PATH' environment variable."
-		quit
-	fi
-}
-
-#
-# Sets RTE_TARGET and does a "make install".
-#
-setup_target()
-{
-	option=$1
-	export RTE_TARGET=${TARGETS[option]}
-
-	compiler=${RTE_TARGET##*-}
-	if [ "$compiler" == "icc" ] ; then
-		platform=${RTE_TARGET%%-*}
-		if [ "$platform" == "x86_64" ] ; then
-			setup_icc intel64
-		else
-			setup_icc ia32
-		fi
-	fi
-	if [ "$QUIT" == "0" ] ; then
-		make install T=${RTE_TARGET}
-	fi
-	echo "------------------------------------------------------------------------------"
-	echo " RTE_TARGET exported as $RTE_TARGET"
-	echo "------------------------------------------------------------------------------"
-}
-
 #
 # Creates hugepage filesystem.
 #
@@ -456,28 +409,10 @@  unbind_devices()
 	sudo ${RTE_SDK}/usertools/dpdk-devbind.py -b $DRV $PCI_PATH && echo "OK"
 }
 
-#
-# Options for building a target. Note that this step MUST be first as it sets
-# up TARGETS[] starting from 1, and this is accessed in setup_target using the
-# user entered option.
-#
-step1_func()
-{
-	TITLE="Select the DPDK environment to build"
-	CONFIG_NUM=1
-	for cfg in config/defconfig_* ; do
-		cfg=${cfg/config\/defconfig_/}
-		TEXT[$CONFIG_NUM]="$cfg"
-		TARGETS[$CONFIG_NUM]=$cfg
-		FUNC[$CONFIG_NUM]="setup_target"
-		let "CONFIG_NUM+=1"
-	done
-}
-
 #
 # Options for setting up environment.
 #
-step2_func()
+step1_func()
 {
 	TITLE="Setup linux environment"
 
@@ -512,7 +447,7 @@  step2_func()
 #
 # Options for running applications.
 #
-step3_func()
+step2_func()
 {
 	TITLE="Run test application for linux environment"
 
@@ -526,7 +461,7 @@  step3_func()
 #
 # Other options
 #
-step4_func()
+step3_func()
 {
 	TITLE="Other tools"
 
@@ -538,7 +473,7 @@  step4_func()
 #
 # Options for cleaning up the system
 #
-step5_func()
+step4_func()
 {
 	TITLE="Uninstall and system cleanup"
 
@@ -562,7 +497,6 @@  STEPS[1]="step1_func"
 STEPS[2]="step2_func"
 STEPS[3]="step3_func"
 STEPS[4]="step4_func"
-STEPS[5]="step5_func"
 
 QUIT=0