From 0a48fd060178ec709c3f98158d1cee82d6693f7d Mon Sep 17 00:00:00 2001 From: yidong0635 Date: Wed, 22 May 2019 07:27:53 -0400 Subject: [PATCH] vm_setup:install right packages on ubuntu for SoftRoCE Ubuntu18 integrates librxe to rdma-core, libibverbs-dev no longer ships infiniband/driver.h. Don't compile librxe on ubuntu18, install package rdma-core instead. ubuntu16 keeps the old method. Otherwise, there's no NIC can be found for SoftRoCE failed. Change-Id: Ib639b96a4229c79f2b27fda7b981d7a805f808cb Signed-off-by: yidong0635 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455336 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris --- test/common/config/vm_setup.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index a3881beab..a23de6629 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -25,6 +25,7 @@ VM_SETUP_PATH=$(readlink -f ${BASH_SOURCE%/*}) UPGRADE=false INSTALL=false CONF="librxe,iscsi,rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat,ocf" +LIBRXE_INSTALL=true OSID=$(source /etc/os-release && echo $ID) PACKAGEMNG='undefined' @@ -481,7 +482,13 @@ if $INSTALL; then sudo apt-get install -y libasan2 sudo apt-get install -y libubsan0 fi - + if ! sudo apt-get install -y rdma-core; then + echo "Package rdma-core is avaliable at Ubuntu 18 [universe] repositorium" >&2 + sudo apt-get install -y rdmacm-utils + sudo apt-get install -y ibverbs-utils + else + LIBRXE_INSTALL=false + fi if ! sudo apt-get install -y libpmempool1; then echo "Package libpmempool1 is available at Ubuntu 18 [universe] repositorium" >&2 fi @@ -517,8 +524,6 @@ if $INSTALL; then flex \ bison \ libswitch-perl \ - rdmacm-utils \ - ibverbs-utils \ gdisk \ socat \ sshfs \ @@ -537,7 +542,11 @@ fi sudo mkdir -p /usr/src -install_rxe_cfg& +if [ $LIBRXE_INSTALL = true ]; then + #Ubuntu18 integrates librxe to rdma-core, libibverbs-dev no longer ships infiniband/driver.h. + #Don't compile librxe on ubuntu18 or later version, install package rdma-core instead. + install_rxe_cfg& +fi install_iscsi_adm& install_rocksdb& install_fio&