X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fdpdk.sh;h=4298e79e6266ac2c4548f832174056a1f474aacf;hb=91ff7a3f99ecb6e1e849bb9ee0b58b22d0be0b5a;hp=da46c6d49cb69d33272caff8bd42d5dfbfee7bfd;hpb=54beb458703ff91e9f522f8af0a57722966f093e;p=csit.git diff --git a/resources/libraries/bash/function/dpdk.sh b/resources/libraries/bash/function/dpdk.sh index da46c6d49c..4298e79e62 100644 --- a/resources/libraries/bash/function/dpdk.sh +++ b/resources/libraries/bash/function/dpdk.sh @@ -108,6 +108,12 @@ function dpdk_compile () { sed -i "${sed_i40e}" "${sed_file}" || die "Patch failed" + sed_build_fix='s/#include <\(rte_ethdev.*.h\)>/#include "\1"/g' + # can't put the filename in quotes so that shell expands it + sed -i "${sed_build_fix}" ./lib/librte_ethdev/rte_ethdev*.h || { + die "DPDK build patch failed" + } + # Compile make install T="${arch}"-"${machine}"-linuxapp-gcc -j || { die "Failed to compile DPDK!" @@ -206,7 +212,7 @@ function dpdk_kill () { fi # Remove hugepages - sudo rm -f /dev/hugepages/* || die "Removing hugepages failed!" + sudo rm -rf /dev/hugepages/* || die "Removing hugepages failed!" } @@ -350,9 +356,11 @@ function dpdk_testpmd () { for attempt in {1..60}; do echo "Checking if testpmd is alive, attempt nr ${attempt}" - if fgrep "Press enter to exit" screenlog.0; then - cat screenlog.0 - exit 0 + if fgrep "Press enter to exit" screenlog.0 && \ + fgrep "Port 0: link state change event" screenlog.0 && \ + fgrep "Port 1: link state change event" screenlog.0; then + cat screenlog.0 + exit 0 fi sleep 1 done