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 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455336
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
yidong0635 2019-05-22 07:27:53 -04:00 committed by Jim Harris
parent fd50b50738
commit 0a48fd0601

View File

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