On 19 Dec 2022, at 13:20, Ilya Maximets wrote:

> AF_XDP bits was removed from kernel's libbpf in 6.0.  libbpf
> and libxdp are now primary way to build AF_XDP applications.
> Most of modern distributions are already packaging some version
> of libbpf, so it's better to test building with it instead
> of building old unsupported kernel tree.
>
> Ubuntu started packaging libxdp only in 22.10, so not using
> it for now.
>
> Kernel build infrastructure in CI scripts is not needed anymore.
> Removed.
>
> Signed-off-by: Ilya Maximets <i.maxim...@ovn.org>

Changes look good to me, I just hope that the issue I see on Fedora35 is not 
compiler related and make it’s way to the distro used for testing.

Acked-by: Eelco Chaudron <echau...@redhat.com>

> ---
>  .ci/linux-build.sh                   | 77 ----------------------------
>  .github/workflows/build-and-test.yml | 10 ++--
>  2 files changed, 3 insertions(+), 84 deletions(-)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index 6d2b90ccf..f492b8c47 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -22,79 +22,6 @@ on_exit() {
>  # them via a EXIT handler.
>  [ -n "$GITHUB_WORKFLOW" ] || trap on_exit EXIT
>
> -function install_kernel()
> -{
> -    if [[ "$1" =~ ^5.* ]]; then
> -        PREFIX="v5.x"
> -    elif [[ "$1" =~ ^4.* ]]; then
> -        PREFIX="v4.x"
> -    elif [[ "$1" =~ ^3.* ]]; then
> -        PREFIX="v3.x"
> -    else
> -        PREFIX="v2.6/longterm/v2.6.32"
> -    fi
> -
> -    base_url="https://cdn.kernel.org/pub/linux/kernel/${PREFIX}";
> -    # Download page with list of all available kernel versions.
> -    wget ${base_url}/
> -    # Uncompress in case server returned gzipped page.
> -    (file index* | grep ASCII) || (mv index* index.new.gz && gunzip index*)
> -    # Get version of the latest stable release.
> -    hi_ver=$(echo ${1} | sed 's/\./\\\./')
> -    lo_ver=$(cat ./index* | grep -P -o "${hi_ver}\.[0-9]+" | \
> -             sed 's/.*\..*\.\(.*\)/\1/' | sort -h | tail -1)
> -    version="${1}.${lo_ver}"
> -
> -    rm -rf index* linux-*
> -
> -    url="${base_url}/linux-${version}.tar.xz"
> -    # Download kernel sources. Try direct link on CDN failure.
> -    wget ${url} ||
> -    (rm -f linux-${version}.tar.xz && wget ${url}) ||
> -    (rm -f linux-${version}.tar.xz && wget ${url/cdn/www})
> -
> -    tar xvf linux-${version}.tar.xz > /dev/null
> -    pushd linux-${version}
> -    make allmodconfig
> -
> -    # Cannot use CONFIG_KCOV: -fsanitize-coverage=trace-pc is not supported 
> by compiler
> -    sed -i 's/CONFIG_KCOV=y/CONFIG_KCOV=n/' .config
> -
> -    # stack validation depends on tools/objtool, but objtool does not 
> compile on travis.
> -    # It is giving following error.
> -    #  >>> GEN      arch/x86/insn/inat-tables.c
> -    #  >>> Semantic error at 40: Unknown imm opnd: AL
> -    # So for now disable stack-validation for the build.
> -
> -    sed -i 's/CONFIG_STACK_VALIDATION=y/CONFIG_STACK_VALIDATION=n/' .config
> -    make oldconfig
> -
> -    # Older kernels do not include openvswitch
> -    if [ -d "net/openvswitch" ]; then
> -        make net/openvswitch/
> -    else
> -        make net/bridge/
> -    fi
> -
> -    if [ "$AFXDP" ]; then
> -        sudo make headers_install INSTALL_HDR_PATH=/usr
> -        pushd tools/lib/bpf/
> -        # Bulding with gcc because there are some issues in make files
> -        # that breaks building libbpf with clang on Travis.
> -        CC=gcc sudo make install
> -        CC=gcc sudo make install_headers
> -        sudo ldconfig
> -        popd
> -        # The Linux kernel defines __always_inline in stddef.h (283d7573), 
> and
> -        # sys/cdefs.h tries to re-define it.  Older libc-dev package in 
> xenial
> -        # doesn't have a fix for this issue.  Applying it manually.
> -        sudo sed -i '/^# define __always_inline .*/i # undef 
> __always_inline' \
> -                    /usr/include/x86_64-linux-gnu/sys/cdefs.h || true
> -        EXTRA_OPTS="${EXTRA_OPTS} --enable-afxdp"
> -    fi
> -    popd
> -}
> -
>  function install_dpdk()
>  {
>      local DPDK_VER=$1
> @@ -227,10 +154,6 @@ assert ovs.json.from_string('{\"a\": 42}') == {'a': 42}"
>      exit 0
>  fi
>
> -if [ "$KERNEL" ]; then
> -    install_kernel $KERNEL
> -fi
> -
>  if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
>      if [ -z "$DPDK_VER" ]; then
>          DPDK_VER="22.11.1"
> diff --git a/.github/workflows/build-and-test.yml 
> b/.github/workflows/build-and-test.yml
> index e08d7b1ba..286e088c8 100644
> --- a/.github/workflows/build-and-test.yml
> +++ b/.github/workflows/build-and-test.yml
> @@ -8,14 +8,12 @@ jobs:
>        dependencies: |
>          automake libtool gcc bc libjemalloc2 libjemalloc-dev    \
>          libssl-dev llvm-dev libelf-dev libnuma-dev libpcap-dev  \
> -        ninja-build selinux-policy-dev
> -      AFXDP:       ${{ matrix.afxdp }}
> +        ninja-build selinux-policy-dev libbpf-dev
>        ASAN:        ${{ matrix.asan }}
>        UBSAN:       ${{ matrix.ubsan }}
>        CC:          ${{ matrix.compiler }}
>        DPDK:        ${{ matrix.dpdk }}
>        DPDK_SHARED: ${{ matrix.dpdk_shared }}
> -      KERNEL:      ${{ matrix.kernel }}
>        LIBS:        ${{ matrix.libs }}
>        M32:         ${{ matrix.m32 }}
>        OPTS:        ${{ matrix.opts }}
> @@ -65,11 +63,9 @@ jobs:
>              libs:         -ljemalloc
>
>            - compiler:     gcc
> -            afxdp:        afxdp
> -            kernel:       5.3
> +            opts:         --enable-afxdp
>            - compiler:     clang
> -            afxdp:        afxdp
> -            kernel:       5.3
> +            opts:         --enable-afxdp
>
>            - compiler:     gcc
>              dpdk:         dpdk
> -- 
> 2.38.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to