Commit 0a48fd06 authored by yidong0635's avatar yidong0635 Committed by Jim Harris
Browse files

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: default avataryidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455336


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent fd50b507
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -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

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&