diff mbox series

[ovs-dev,v2] travis: Don't install kernel for DPDK checks.

Message ID 20190611153121.25723-1-i.maximets@samsung.com
State Accepted
Headers show
Series [ovs-dev,v2] travis: Don't install kernel for DPDK checks. | expand

Commit Message

Ilya Maximets June 11, 2019, 3:31 p.m. UTC
We don't need to build DPDK kernel modules to test build with OVS.
And we don't need to build OVS datapath modules for checking
userspace with DPDK.

Removed 'max-inline-insns-single' changes that only was needed for
DPDK kernel modules. Config modifications changed to update
generated build/.config instead of changing sources.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---

Version 2:

  * Removed -Wno-error=inline.
  * config/common_base --> build/.config

 .travis.yml            |  8 ++++----
 .travis/linux-build.sh | 25 +++++++++++++------------
 2 files changed, 17 insertions(+), 16 deletions(-)

Comments

David Marchand June 11, 2019, 5:13 p.m. UTC | #1
On Tue, Jun 11, 2019 at 5:32 PM Ilya Maximets <i.maximets@samsung.com>
wrote:

> We don't need to build DPDK kernel modules to test build with OVS.
> And we don't need to build OVS datapath modules for checking
> userspace with DPDK.
>
> Removed 'max-inline-insns-single' changes that only was needed for
> DPDK kernel modules. Config modifications changed to update
> generated build/.config instead of changing sources.
>
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>
> Version 2:
>
>   * Removed -Wno-error=inline.
>   * config/common_base --> build/.config
>
>  .travis.yml            |  8 ++++----
>  .travis/linux-build.sh | 25 +++++++++++++------------
>  2 files changed, 17 insertions(+), 16 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 6621fb535..7addcb231 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -31,10 +31,10 @@ env:
>    - TESTSUITE=1 KERNEL=3.16
>    - TESTSUITE=1 OPTS="--enable-shared"
>    - BUILD_ENV="-m32" OPTS="--disable-ssl"
> -  - KERNEL=3.16 DPDK=1 OPTS="--enable-shared"
> -  - KERNEL=3.16 TESTSUITE=1 DPDK=1
> -  - KERNEL=3.16 DPDK_SHARED=1
> -  - KERNEL=3.16 DPDK_SHARED=1 OPTS="--enable-shared"
> +  - DPDK=1 OPTS="--enable-shared"
> +  - TESTSUITE=1 DPDK=1
> +  - DPDK_SHARED=1
> +  - DPDK_SHARED=1 OPTS="--enable-shared"
>    - KERNEL=4.20
>    - KERNEL=4.19
>    - KERNEL=4.18
> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
> index 123cde575..b88bfb53e 100755
> --- a/.travis/linux-build.sh
> +++ b/.travis/linux-build.sh
> @@ -3,7 +3,6 @@
>  set -o errexit
>  set -x
>
> -KERNELSRC=""
>  CFLAGS=""
>  SPARSE_FLAGS=""
>  EXTRA_OPTS="--enable-Werror"
> @@ -57,10 +56,7 @@ function install_kernel()
>          make net/bridge/
>      fi
>
> -    KERNELSRC=$(pwd)
> -    if [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
> -        EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
> -    fi
> +    EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
>      echo "Installed kernel source in $(pwd)"
>      cd ..
>  }
> @@ -78,16 +74,21 @@ function install_dpdk()
>          if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
>          cd dpdk-$1
>      fi
> -    find ./ -type f | xargs sed -i
> 's/max-inline-insns-single=100/max-inline-insns-single=400/'
> -    find ./ -type f | xargs sed -i 's/-Werror/-Werror -Wno-error=inline/'
>      echo 'CONFIG_RTE_BUILD_FPIC=y' >>config/common_linuxapp
>      sed -ri '/EXECENV_CFLAGS  = -pthread -fPIC/{s/$/\nelse ifeq
> ($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS  = -pthread -fPIC/}'
> mk/exec-env/linuxapp/rte.vars.mk
> +
> +    make config CC=gcc T=$TARGET
> +
>      if [ "$DPDK_SHARED" ]; then
> -        sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/'
> config/common_base
> +        sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' build/.config
>          export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib
>      fi
> -    make config CC=gcc T=$TARGET
> -    make -j4 CC=gcc RTE_KERNELDIR=$KERNELSRC
> +
> +    # Disable building DPDK kernel modules. Not needed for OVS build or
> tests.
> +    sed -i '/CONFIG_RTE_EAL_IGB_UIO=y/s/=y/=n/' build/.config
> +    sed -i '/CONFIG_RTE_KNI_KMOD=y/s/=y/=n/' build/.config
>

We could also disable the librte_kni but we are fine with just disabling
the kmods.


+
> +    make -j4 CC=gcc
>      echo "Installed DPDK source in $(pwd)"
>      cd ..
>  }
> @@ -97,7 +98,7 @@ function configure_ovs()
>      ./boot.sh && ./configure $* || { cat config.log; exit 1; }
>  }
>
> -if [ "$KERNEL" ] || [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
> +if [ "$KERNEL" ]; then
>      install_kernel $KERNEL
>  fi
>
> @@ -141,7 +142,7 @@ else
>      make selinux-policy
>
>      # Only build datapath if we are testing kernel w/o running testsuite
> -    if [ "$KERNEL" ] && [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
> +    if [ "$KERNEL" ]; then
>          cd datapath
>      fi
>      make -j4
> --
> 2.17.1
>
>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Stokes, Ian June 12, 2019, 9:56 a.m. UTC | #2
On 6/11/2019 6:13 PM, David Marchand wrote:
> 
> 
> On Tue, Jun 11, 2019 at 5:32 PM Ilya Maximets <i.maximets@samsung.com 
> <mailto:i.maximets@samsung.com>> wrote:
> 
>     We don't need to build DPDK kernel modules to test build with OVS.
>     And we don't need to build OVS datapath modules for checking
>     userspace with DPDK.
> 
>     Removed 'max-inline-insns-single' changes that only was needed for
>     DPDK kernel modules. Config modifications changed to update
>     generated build/.config instead of changing sources.
> 
>     Signed-off-by: Ilya Maximets <i.maximets@samsung.com
>     <mailto:i.maximets@samsung.com>>
>     ---
> 
>     Version 2:
> 
>        * Removed -Wno-error=inline.
>        * config/common_base --> build/.config
> 
>       .travis.yml            |  8 ++++----
>       .travis/linux-build.sh | 25 +++++++++++++------------
>       2 files changed, 17 insertions(+), 16 deletions(-)
> 
>     diff --git a/.travis.yml b/.travis.yml
>     index 6621fb535..7addcb231 100644
>     --- a/.travis.yml
>     +++ b/.travis.yml
>     @@ -31,10 +31,10 @@ env:
>         - TESTSUITE=1 KERNEL=3.16
>         - TESTSUITE=1 OPTS="--enable-shared"
>         - BUILD_ENV="-m32" OPTS="--disable-ssl"
>     -  - KERNEL=3.16 DPDK=1 OPTS="--enable-shared"
>     -  - KERNEL=3.16 TESTSUITE=1 DPDK=1
>     -  - KERNEL=3.16 DPDK_SHARED=1
>     -  - KERNEL=3.16 DPDK_SHARED=1 OPTS="--enable-shared"
>     +  - DPDK=1 OPTS="--enable-shared"
>     +  - TESTSUITE=1 DPDK=1
>     +  - DPDK_SHARED=1
>     +  - DPDK_SHARED=1 OPTS="--enable-shared"
>         - KERNEL=4.20
>         - KERNEL=4.19
>         - KERNEL=4.18
>     diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
>     index 123cde575..b88bfb53e 100755
>     --- a/.travis/linux-build.sh
>     +++ b/.travis/linux-build.sh
>     @@ -3,7 +3,6 @@
>       set -o errexit
>       set -x
> 
>     -KERNELSRC=""
>       CFLAGS=""
>       SPARSE_FLAGS=""
>       EXTRA_OPTS="--enable-Werror"
>     @@ -57,10 +56,7 @@ function install_kernel()
>               make net/bridge/
>           fi
> 
>     -    KERNELSRC=$(pwd)
>     -    if [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
>     -        EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
>     -    fi
>     +    EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
>           echo "Installed kernel source in $(pwd)"
>           cd ..
>       }
>     @@ -78,16 +74,21 @@ function install_dpdk()
>               if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
>               cd dpdk-$1
>           fi
>     -    find ./ -type f | xargs sed -i
>     's/max-inline-insns-single=100/max-inline-insns-single=400/'
>     -    find ./ -type f | xargs sed -i 's/-Werror/-Werror
>     -Wno-error=inline/'
>           echo 'CONFIG_RTE_BUILD_FPIC=y' >>config/common_linuxapp
>           sed -ri '/EXECENV_CFLAGS  = -pthread -fPIC/{s/$/\nelse ifeq
>     ($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS  = -pthread
>     -fPIC/}' mk/exec-env/linuxapp/rte.vars.mk <http://rte.vars.mk>
>     +
>     +    make config CC=gcc T=$TARGET
>     +
>           if [ "$DPDK_SHARED" ]; then
>     -        sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/'
>     config/common_base
>     +        sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' build/.config
>               export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib
>           fi
>     -    make config CC=gcc T=$TARGET
>     -    make -j4 CC=gcc RTE_KERNELDIR=$KERNELSRC
>     +
>     +    # Disable building DPDK kernel modules. Not needed for OVS
>     build or tests.
>     +    sed -i '/CONFIG_RTE_EAL_IGB_UIO=y/s/=y/=n/' build/.config
>     +    sed -i '/CONFIG_RTE_KNI_KMOD=y/s/=y/=n/' build/.config
> 
> 
> We could also disable the librte_kni but we are fine with just disabling 
> the kmods.
> 
> 
>     +
>     +    make -j4 CC=gcc
>           echo "Installed DPDK source in $(pwd)"
>           cd ..
>       }
>     @@ -97,7 +98,7 @@ function configure_ovs()
>           ./boot.sh && ./configure $* || { cat config.log; exit 1; }
>       }
> 
>     -if [ "$KERNEL" ] || [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
>     +if [ "$KERNEL" ]; then
>           install_kernel $KERNEL
>       fi
> 
>     @@ -141,7 +142,7 @@ else
>           make selinux-policy
> 
>           # Only build datapath if we are testing kernel w/o running
>     testsuite
>     -    if [ "$KERNEL" ] && [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
>     +    if [ "$KERNEL" ]; then
>               cd datapath
>           fi
>           make -j4
>     -- 
>     2.17.1
> 
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com 
> <mailto:david.marchand@redhat.com>>
> Tested-by: David Marchand <david.marchand@redhat.com 
> <mailto:david.marchand@redhat.com>>
> 
> 
> -- 
> David Marchand

Thanks all, LGTM, pushed to master.

Regards
Ian
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 6621fb535..7addcb231 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,10 +31,10 @@  env:
   - TESTSUITE=1 KERNEL=3.16
   - TESTSUITE=1 OPTS="--enable-shared"
   - BUILD_ENV="-m32" OPTS="--disable-ssl"
-  - KERNEL=3.16 DPDK=1 OPTS="--enable-shared"
-  - KERNEL=3.16 TESTSUITE=1 DPDK=1
-  - KERNEL=3.16 DPDK_SHARED=1
-  - KERNEL=3.16 DPDK_SHARED=1 OPTS="--enable-shared"
+  - DPDK=1 OPTS="--enable-shared"
+  - TESTSUITE=1 DPDK=1
+  - DPDK_SHARED=1
+  - DPDK_SHARED=1 OPTS="--enable-shared"
   - KERNEL=4.20
   - KERNEL=4.19
   - KERNEL=4.18
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 123cde575..b88bfb53e 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -3,7 +3,6 @@ 
 set -o errexit
 set -x
 
-KERNELSRC=""
 CFLAGS=""
 SPARSE_FLAGS=""
 EXTRA_OPTS="--enable-Werror"
@@ -57,10 +56,7 @@  function install_kernel()
         make net/bridge/
     fi
 
-    KERNELSRC=$(pwd)
-    if [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
-        EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
-    fi
+    EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"
     echo "Installed kernel source in $(pwd)"
     cd ..
 }
@@ -78,16 +74,21 @@  function install_dpdk()
         if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
         cd dpdk-$1
     fi
-    find ./ -type f | xargs sed -i 's/max-inline-insns-single=100/max-inline-insns-single=400/'
-    find ./ -type f | xargs sed -i 's/-Werror/-Werror -Wno-error=inline/'
     echo 'CONFIG_RTE_BUILD_FPIC=y' >>config/common_linuxapp
     sed -ri '/EXECENV_CFLAGS  = -pthread -fPIC/{s/$/\nelse ifeq ($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS  = -pthread -fPIC/}' mk/exec-env/linuxapp/rte.vars.mk
+
+    make config CC=gcc T=$TARGET
+
     if [ "$DPDK_SHARED" ]; then
-        sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' config/common_base
+        sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' build/.config
         export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib
     fi
-    make config CC=gcc T=$TARGET
-    make -j4 CC=gcc RTE_KERNELDIR=$KERNELSRC
+
+    # Disable building DPDK kernel modules. Not needed for OVS build or tests.
+    sed -i '/CONFIG_RTE_EAL_IGB_UIO=y/s/=y/=n/' build/.config
+    sed -i '/CONFIG_RTE_KNI_KMOD=y/s/=y/=n/' build/.config
+
+    make -j4 CC=gcc
     echo "Installed DPDK source in $(pwd)"
     cd ..
 }
@@ -97,7 +98,7 @@  function configure_ovs()
     ./boot.sh && ./configure $* || { cat config.log; exit 1; }
 }
 
-if [ "$KERNEL" ] || [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
+if [ "$KERNEL" ]; then
     install_kernel $KERNEL
 fi
 
@@ -141,7 +142,7 @@  else
     make selinux-policy
 
     # Only build datapath if we are testing kernel w/o running testsuite
-    if [ "$KERNEL" ] && [ ! "$DPDK" ] && [ ! "$DPDK_SHARED" ]; then
+    if [ "$KERNEL" ]; then
         cd datapath
     fi
     make -j4