Add dpdk pktio compilation and run under native make check. Huge pages have to be mounted: echo 1000 > /proc/sys/vm/nr_hugepages mount -t hugetlbfs nodev /mnt/huge also no other mount points for hugepages, in my case I need to do: umount /sys/fs/cgroup/hugetlb
make check should pass without dpdk hardware and loaded dpdk modules using pcap PMD. Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org> --- apply-and-build.sh | 7 +++---- helper/platform/generic | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/apply-and-build.sh b/apply-and-build.sh index 99f3d45..6168e29 100755 --- a/apply-and-build.sh +++ b/apply-and-build.sh @@ -8,6 +8,7 @@ source ${ROOT_DIR}/helper/toolchain source ${ROOT_DIR}/helper/openssl source ${ROOT_DIR}/helper/cunit +export PLATFORM=${PLATFORM:-linux-generic} export GIT_BRANCH="${GIT_BRANCH:-master}" export PATCH_DIR=${PATCH_DIR:-"$HOME/incoming"} export CLEANUP="${CLEANUP:-1}" @@ -29,6 +30,7 @@ usage() { tc_usage cunit_usage openssl_usage + echo -e "\tPLATFORM=linux-generic\t export platfrom to tested platform" echo -e "\tPATCH_DIR:\t where to look for patches, default: $HOME/incoming" echo -e "\tCLEANUP:\t set to 0 to save *.log files, default: ${CLEANUP}" echo -e "\tCHECKPATCH:\t set to 0 to disable checkpatch test, default: ${CHECKPATCH}" @@ -36,7 +38,7 @@ usage() { echo -e "\tPLATFORM:\t set platform, default: ${PLATFORM}" echo -e "\tDRYRUN:\t\t set to 1 to enable a dryrun, default: ${DRYRUN}" echo -e "\tENABLE_NETMAP:\t set to 1 to enable netmap build, default: ${ENABLE_NETMAP}" - echo -e "\tENABLE_DPDK:\t set to 1 to enable DPDK build, default: 0" + echo -e "\tENABLE_DPDK:\t set to 1 to enable dpdk build, default: ${ENABLE_DPDK}" echo -e "\tNUM_CPUS:\t add parallel make, default: _NPROCESSORS_ONLN" echo -e "\tFILE_EXT:\t supported extensions in patch file names, default: ${FILE_EXT}" echo -e "\tM32_ON_64:\t enable 32 bit builds on a 64 bit host, default: 0" @@ -54,9 +56,6 @@ if [[ ${M32_ON_64} -eq 1 ]]; then CUNIT_BUILD=1 fi -PLATFORM=${PLATFORM:-linux-generic} -[[ ${ENABLE_DPDK} -eq 1 ]] && PLATFORM="linux-dpdk" - display_os prepare_platform diff --git a/helper/platform/generic b/helper/platform/generic index 49ddd65..560e694 100644 --- a/helper/platform/generic +++ b/helper/platform/generic @@ -1,6 +1,9 @@ [ -n "$GENERIC_PLATFORM_HELPER" ] && return || readonly GENERIC_PLATFORM_HELPER=1 export NETMAP_SRCDIR=${ROOT_DIR}/netmap +if [[ ${ENABLE_DPDK} -eq 1 ]]; then + . helper/platform/dpdk +fi generic_usage() { echo -e "\tENABLE_NETMAP:\t enable build with netmap, default: ${ENABLE_NETMAP}" @@ -14,6 +17,10 @@ generic_prepare() { export NETMAP_DIR=${NETMAP_SRCDIR} export CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-netmap-path=${NETMAP_DIR}" fi + + if [[ ${ENABLE_DPDK} -eq 1 ]]; then + export CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-dpdk-path=${ROOT_DIR_DPDK}/x86_64-native-linuxapp-gcc" + fi } generic_get() { @@ -26,14 +33,21 @@ generic_get() { git reset --hard $NETMAP_REV popd > /dev/null fi + + if [[ ${ENABLE_DPDK} -eq 1 ]]; then + dpdk_get + fi } generic_build() { - : + if [[ ${ENABLE_DPDK} -eq 1 ]]; then + dpdk_build + fi } generic_cleanup() { rm -rf ${NETMAP_SRCDIR} + dpdk_cleanup } ## vim: set ft=sh sw=4 sts=4 et foldmethod=syntax : ## -- 2.7.1.250.gff4ea60 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp