[3/6] usertools/setup: remove running built applications

Message ID 20201125191908.1867106-4-ferruh.yigit@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series update dpdk-setup.sh |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ferruh Yigit Nov. 25, 2020, 7:19 p.m. UTC
  Running application relies on make based build variable 'RTE_TARGET' to
find the location of the applications, which is not valid anymore.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 usertools/dpdk-setup.sh | 52 ++---------------------------------------
 1 file changed, 2 insertions(+), 50 deletions(-)
  

Comments

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

Patch tested.

Thanks,
Conor.

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Ferruh Yigit
> Sent: Wednesday 25 November 2020 19:19
> 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>
> Subject: [dpdk-dev] [PATCH 3/6] usertools/setup: remove running built
> applications
> 
> Running application relies on make based build variable 'RTE_TARGET' to
> find the location of the applications, which is not valid anymore.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

> ---
>  usertools/dpdk-setup.sh | 52 ++---------------------------------------
>  1 file changed, 2 insertions(+), 50 deletions(-)
> 
> diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
> index bcf0c843678f..759f6c096536 100755
> --- a/usertools/dpdk-setup.sh
> +++ b/usertools/dpdk-setup.sh
> @@ -17,11 +17,6 @@ echo "-----------------------------------------------------------
> ---------------
> 
>  HUGEPGSZ=`cat /proc/meminfo  | grep Hugepagesize | cut -d : -f 2 | tr -d ' '`
> 
> -#
> -# Application EAL parameters for setting memory options
> (amount/channels/ranks).
> -#
> -EAL_PARAMS='-n 4'
> -
>  #
>  # Sets QUIT variable so script will finish.
>  #
> @@ -252,34 +247,6 @@ set_numa_pages()
>  	create_mnt_huge
>  }
> 
> -#
> -# Run unit test application.
> -#
> -run_test_app()
> -{
> -	echo ""
> -	echo "  Enter hex bitmask of cores to execute test app on"
> -	echo "  Example: to execute app on cores 0 to 7, enter 0xff"
> -	echo -n "bitmask: "
> -	read Bitmask
> -	echo "Launching app"
> -	sudo ${RTE_TARGET}/app/test -c $Bitmask $EAL_PARAMS
> -}
> -
> -#
> -# Run unit testpmd application.
> -#
> -run_testpmd_app()
> -{
> -	echo ""
> -	echo "  Enter hex bitmask of cores to execute testpmd app on"
> -	echo "  Example: to execute app on cores 0 to 7, enter 0xff"
> -	echo -n "bitmask: "
> -	read Bitmask
> -	echo "Launching app"
> -	sudo ${RTE_TARGET}/app/testpmd -c $Bitmask $EAL_PARAMS -- -i
> -}
> -
>  #
>  # Print hugepage information.
>  #
> @@ -381,24 +348,10 @@ step1_func()
>  	FUNC[7]="set_vfio_permissions"
>  }
> 
> -#
> -# Options for running applications.
> -#
> -step2_func()
> -{
> -	TITLE="Run test application for linux environment"
> -
> -	TEXT[1]="Run test application (\$RTE_TARGET/app/test)"
> -	FUNC[1]="run_test_app"
> -
> -	TEXT[2]="Run testpmd application in interactive mode
> (\$RTE_TARGET/app/testpmd)"
> -	FUNC[2]="run_testpmd_app"
> -}
> -
>  #
>  # Other options
>  #
> -step3_func()
> +step2_func()
>  {
>  	TITLE="Other tools"
> 
> @@ -410,7 +363,7 @@ step3_func()
>  #
>  # Options for cleaning up the system
>  #
> -step4_func()
> +step3_func()
>  {
>  	TITLE="Uninstall and system cleanup"
> 
> @@ -433,7 +386,6 @@ step4_func()
>  STEPS[1]="step1_func"
>  STEPS[2]="step2_func"
>  STEPS[3]="step3_func"
> -STEPS[4]="step4_func"
> 
>  QUIT=0
> 
> --
> 2.26.2
  
Thomas Monjalon Nov. 26, 2020, 2:04 p.m. UTC | #2
26/11/2020 15:02, Walsh, Conor:
> Hi Ferruh,
> 
> Patch tested.
> 
> Thanks,
> Conor.
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Ferruh Yigit
> > Sent: Wednesday 25 November 2020 19:19
> > 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>
> > Subject: [dpdk-dev] [PATCH 3/6] usertools/setup: remove running built
> > applications
> > 
> > Running application relies on make based build variable 'RTE_TARGET' to
> > find the location of the applications, which is not valid anymore.
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Tested-by: Conor Walsh <conor.walsh@intel.com>

Hi Conor,
If no comment on code below, you can remove the below lines from your reply.
Thanks


> 
> > ---
> >  usertools/dpdk-setup.sh | 52 ++---------------------------------------
> >  1 file changed, 2 insertions(+), 50 deletions(-)
> > 
> > diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
> > index bcf0c843678f..759f6c096536 100755
> > --- a/usertools/dpdk-setup.sh
> > +++ b/usertools/dpdk-setup.sh
> > @@ -17,11 +17,6 @@ echo "-----------------------------------------------------------
> > ---------------
> > 
> >  HUGEPGSZ=`cat /proc/meminfo  | grep Hugepagesize | cut -d : -f 2 | tr -d ' '`
> > 
> > -#
> > -# Application EAL parameters for setting memory options
> > (amount/channels/ranks).
> > -#
> > -EAL_PARAMS='-n 4'
> > -
> >  #
> >  # Sets QUIT variable so script will finish.
> >  #
> > @@ -252,34 +247,6 @@ set_numa_pages()
> >  	create_mnt_huge
> >  }
> > 
> > -#
> > -# Run unit test application.
> > -#
> > -run_test_app()
> > -{
> > -	echo ""
> > -	echo "  Enter hex bitmask of cores to execute test app on"
> > -	echo "  Example: to execute app on cores 0 to 7, enter 0xff"
> > -	echo -n "bitmask: "
> > -	read Bitmask
> > -	echo "Launching app"
> > -	sudo ${RTE_TARGET}/app/test -c $Bitmask $EAL_PARAMS
> > -}
> > -
> > -#
> > -# Run unit testpmd application.
> > -#
> > -run_testpmd_app()
> > -{
> > -	echo ""
> > -	echo "  Enter hex bitmask of cores to execute testpmd app on"
> > -	echo "  Example: to execute app on cores 0 to 7, enter 0xff"
> > -	echo -n "bitmask: "
> > -	read Bitmask
> > -	echo "Launching app"
> > -	sudo ${RTE_TARGET}/app/testpmd -c $Bitmask $EAL_PARAMS -- -i
> > -}
> > -
> >  #
> >  # Print hugepage information.
> >  #
> > @@ -381,24 +348,10 @@ step1_func()
> >  	FUNC[7]="set_vfio_permissions"
> >  }
> > 
> > -#
> > -# Options for running applications.
> > -#
> > -step2_func()
> > -{
> > -	TITLE="Run test application for linux environment"
> > -
> > -	TEXT[1]="Run test application (\$RTE_TARGET/app/test)"
> > -	FUNC[1]="run_test_app"
> > -
> > -	TEXT[2]="Run testpmd application in interactive mode
> > (\$RTE_TARGET/app/testpmd)"
> > -	FUNC[2]="run_testpmd_app"
> > -}
> > -
> >  #
> >  # Other options
> >  #
> > -step3_func()
> > +step2_func()
> >  {
> >  	TITLE="Other tools"
> > 
> > @@ -410,7 +363,7 @@ step3_func()
> >  #
> >  # Options for cleaning up the system
> >  #
> > -step4_func()
> > +step3_func()
> >  {
> >  	TITLE="Uninstall and system cleanup"
> > 
> > @@ -433,7 +386,6 @@ step4_func()
> >  STEPS[1]="step1_func"
> >  STEPS[2]="step2_func"
> >  STEPS[3]="step3_func"
> > -STEPS[4]="step4_func"
> > 
> >  QUIT=0
> > 
> > --
> > 2.26.2
> 
>
  

Patch

diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
index bcf0c843678f..759f6c096536 100755
--- a/usertools/dpdk-setup.sh
+++ b/usertools/dpdk-setup.sh
@@ -17,11 +17,6 @@  echo "--------------------------------------------------------------------------
 
 HUGEPGSZ=`cat /proc/meminfo  | grep Hugepagesize | cut -d : -f 2 | tr -d ' '`
 
-#
-# Application EAL parameters for setting memory options (amount/channels/ranks).
-#
-EAL_PARAMS='-n 4'
-
 #
 # Sets QUIT variable so script will finish.
 #
@@ -252,34 +247,6 @@  set_numa_pages()
 	create_mnt_huge
 }
 
-#
-# Run unit test application.
-#
-run_test_app()
-{
-	echo ""
-	echo "  Enter hex bitmask of cores to execute test app on"
-	echo "  Example: to execute app on cores 0 to 7, enter 0xff"
-	echo -n "bitmask: "
-	read Bitmask
-	echo "Launching app"
-	sudo ${RTE_TARGET}/app/test -c $Bitmask $EAL_PARAMS
-}
-
-#
-# Run unit testpmd application.
-#
-run_testpmd_app()
-{
-	echo ""
-	echo "  Enter hex bitmask of cores to execute testpmd app on"
-	echo "  Example: to execute app on cores 0 to 7, enter 0xff"
-	echo -n "bitmask: "
-	read Bitmask
-	echo "Launching app"
-	sudo ${RTE_TARGET}/app/testpmd -c $Bitmask $EAL_PARAMS -- -i
-}
-
 #
 # Print hugepage information.
 #
@@ -381,24 +348,10 @@  step1_func()
 	FUNC[7]="set_vfio_permissions"
 }
 
-#
-# Options for running applications.
-#
-step2_func()
-{
-	TITLE="Run test application for linux environment"
-
-	TEXT[1]="Run test application (\$RTE_TARGET/app/test)"
-	FUNC[1]="run_test_app"
-
-	TEXT[2]="Run testpmd application in interactive mode (\$RTE_TARGET/app/testpmd)"
-	FUNC[2]="run_testpmd_app"
-}
-
 #
 # Other options
 #
-step3_func()
+step2_func()
 {
 	TITLE="Other tools"
 
@@ -410,7 +363,7 @@  step3_func()
 #
 # Options for cleaning up the system
 #
-step4_func()
+step3_func()
 {
 	TITLE="Uninstall and system cleanup"
 
@@ -433,7 +386,6 @@  step4_func()
 STEPS[1]="step1_func"
 STEPS[2]="step2_func"
 STEPS[3]="step3_func"
-STEPS[4]="step4_func"
 
 QUIT=0