test/vm_setup: install VPP 19.01.1

NOTE:

Due to some changes in VPP two cherry-picks from newer version of VPP
(at least 19.04):

	"sock api: allow to start client with no rx_thread"
		commit: 97dcf5bd26ca6de580943f5d39681f0144782c3d

	"dlmalloc: honor 8 byte alignment requests"
		commit: f5dc9fbf814865b31b52b20f5bf959e9ff818b25

These commits are already merged in VPP 19.04.

This patch includes also workaround for VPP 19.01.1 to prevent closing
sessions to already closed applications after timeout. It causes
intermittent segfaults.
This is temporal solution and should be solved with next releases of
VPP, but is required now to create more stable VPP environment.

Change-Id: If4b45b7159819cfd836dd7d50f333dbab2b38eab
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456462
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Tomasz Kulasek 2018-06-25 08:44:59 -04:00 committed by Ben Walker
parent 338d4a2611
commit 29408ebaa9
2 changed files with 33 additions and 50 deletions

View File

@ -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);
}

View File

@ -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
}