diff --git a/test/common/config/patch/vpp/workaround-dont-notify-transport-closing.patch b/test/common/config/patch/vpp/workaround-dont-notify-transport-closing.patch new file mode 100644 index 000000000..716a3cd4e --- /dev/null +++ b/test/common/config/patch/vpp/workaround-dont-notify-transport-closing.patch @@ -0,0 +1,13 @@ +diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c +index 392d694..e7efa77 100644 +--- a/src/vnet/tcp/tcp_input.c ++++ b/src/vnet/tcp/tcp_input.c +@@ -1644,6 +1644,8 @@ tcp_handle_disconnects (tcp_worker_ctx_t * wrk) + for (i = 0; i < vec_len (pending_disconnects); i++) + { + tc = tcp_connection_get (pending_disconnects[i], thread_index); ++ if (tc == NULL) ++ continue; + tcp_disconnect_pending_off (tc); + session_transport_closing_notify (&tc->connection); + } diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index 3f53f01c3..6d1ee9b5f 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -216,64 +216,34 @@ function install_qemu() function install_vpp() { if echo $CONF | grep -q vpp; then - # Vector packet processing (VPP) is installed for use with iSCSI tests. - # At least on fedora 28, the yum setup that vpp uses is deprecated and fails. - # The actions taken under the vpp_setup script are necessary to fix this issue. - if [ -d vpp_setup ]; then - echo "vpp setup already done." - elif [ "$PACKAGEMNG" = "dnf" ]; then - echo "%_topdir $HOME/vpp_setup/src/rpm" >> ~/.rpmmacros - sudo dnf install -y perl-generators - mkdir -p ~/vpp_setup/src/rpm - mkdir -p vpp_setup/src/rpm/BUILD vpp_setup/src/rpm/RPMS vpp_setup/src/rpm/SOURCES \ - vpp_setup/src/rpm/SPECS vpp_setup/src/rpm/SRPMS - dnf download --downloaddir=./vpp_setup/src/rpm --source redhat-rpm-config - rpm -ivh ~/vpp_setup/src/rpm/redhat-rpm-config* - sed -i s/"Requires: (annobin if gcc)"//g ~/vpp_setup/src/rpm/SPECS/redhat-rpm-config.spec - rpmbuild -ba ~/vpp_setup/src/rpm/SPECS/*.spec - sudo dnf remove -y --noautoremove redhat-rpm-config - sudo rpm -Uvh ~/vpp_setup/src/rpm/RPMS/noarch/* - fi - - if [ -d vpp ]; then + if [ -d /usr/local/src/vpp ]; then echo "vpp already cloned." - if [ ! -d vpp/build-root ]; then + if [ ! -d /usr/local/src/vpp/build-root ]; then echo "build-root has not been done" echo "remove the `pwd` and start again" exit 1 fi else git clone "${GIT_REPO_VPP}" - git -C ./vpp checkout v18.01.1 - if [ "$PACKAGEMNG" = "dnf" ]; then - # VPP 18.01.1 does not support OpenSSL 1.1. - # For compilation, a compatibility package is used temporarily. - sudo dnf install -y --allowerasing compat-openssl10-devel - # Installing required dependencies for building VPP - yes | make -C ./vpp install-dep + git -C ./vpp checkout v19.01.1 + git -C ./vpp cherry-pick 97dcf5bd26ca6de580943f5d39681f0144782c3d + git -C ./vpp cherry-pick f5dc9fbf814865b31b52b20f5bf959e9ff818b25 - make -C ./vpp pkg-rpm -j${jobs} - # Reinstall latest OpenSSL devel package. - sudo dnf install -y --allowerasing openssl-devel - sudo dnf install -y \ - ./vpp/build_root/vpp-lib-18.01.1-release.x86_64.rpm \ - ./vpp/build_root/vpp-devel-18.01.1-release.x86_64.rpm \ - ./vpp/build_root/vpp-18.01.1-release.x86_64.rpm - # Since hugepage configuration is done via spdk/scripts/setup.sh, - # this default config is not needed. - # - # NOTE: Parameters kernel.shmmax and vm.max_map_count are set to - # very low count and cause issues with hugepage total sizes above 1GB. - sudo rm -f /etc/sysctl.d/80-vpp.conf - elif [ "$PACKAGEMNG" = "apt-get" ]; then - yes | make -C ./vpp install-dep - make -C ./vpp bootstrap -j${jobs} - make -C ./vpp pkg-deb -j${jobs} - yes | sudo dpkg -i vpp/build-root/vpp-lib_18.01.1-release_amd64.deb \ - vpp/build-root/vpp-dev_18.01.1-release_amd64.deb \ - vpp/build-root/vpp_18.01.1-release_amd64.deb - sudo rm -f /etc/sysctl.d/80-vpp.conf - fi + # Following patch for VPP is required due to the VPP tries to close + # connections to the non existing applications after timeout. + # It causes intermittent VPP application segfaults in our tests + # when few instances of VPP clients connects and disconnects several + # times. + # This workaround is only for VPP v19.01.1 and should be solved in + # the next release. + git -C ./vpp apply ${VM_SETUP_PATH}/patch/vpp/workaround-dont-notify-transport-closing.patch + + # Installing required dependencies for building VPP + yes | make -C ./vpp install-dep + + make -C ./vpp build -j${jobs} + + sudo mv ./vpp /usr/local/src/ fi fi }