patch is for check-odp.git has to be [CHECK-ODP PATCHv2]
Maxim.
On 04/27/16 18:00, Maxim Uvarov wrote:
Signed-off-by: Maxim Uvarov <[email protected]>
---
v2: rename option to ENABLE_DPDK_PKTIO and fail if hugepages
already mounted.
apply-and-build.sh | 2 ++
helper/platform/generic | 24 +++++++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/apply-and-build.sh b/apply-and-build.sh
index 3fc9f2b..c3c7973 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}"
@@ -15,6 +16,7 @@ export CHECKPATCH="${CHECKPATCH:-1}"
export CHECKFORMAT="${CHECKFORMAT:-1}"
export DRYRUN="${DRYRUN:-0}"
export ENABLE_NETMAP_PKTIO="${ENABLE_NETMAP_PKTIO:-0}"
+export ENABLE_DPDK_PKTIO="${ENABLE_DPDK_PKTIO:-0}"
export ENABLE_DPDK="${ENABLE_DPDK:-0}"
export NUM_CPUS=${NUM_CPUS:-"$(getconf _NPROCESSORS_ONLN)"}
export FILE_EXT=${FILE_EXT:-"mbox patch"}
diff --git a/helper/platform/generic b/helper/platform/generic
index 9a3d399..8e96a6c 100644
--- a/helper/platform/generic
+++ b/helper/platform/generic
@@ -1,6 +1,14 @@
[ -n "$GENERIC_PLATFORM_HELPER" ] && return || readonly
GENERIC_PLATFORM_HELPER=1
export NETMAP_SRCDIR=${ROOT_DIR}/netmap
+if [[ ${ENABLE_DPDK_PKTIO} -eq 1 ]]; then
+ fgrep hugetlb /proc/mounts
+ if [ $? -ne 0 ]; then
+ echo "Unable to test ENABLE_DPDK_PKTIO due to already mounted
hugetlbfs"
+ exit 1
+ fi
+ source ${ROOT_DIR}/helper/platform/dpdk
+fi
generic_usage() {
echo -e "\tENABLE_NETMAP_PKTIO:\t enable build with netmap, default:
${ENABLE_NETMAP_PKTIO}"
@@ -14,6 +22,11 @@ generic_prepare() {
export NETMAP_DIR=${NETMAP_SRCDIR}
export CONFIGURE_FLAGS="${CONFIGURE_FLAGS}
--with-netmap-path=${NETMAP_DIR}"
fi
+
+ if [[ ${ENABLE_DPDK_PKTIO} -eq 1 ]]; then
+ export CONFIGURE_FLAGS="${CONFIGURE_FLAGS}
--with-dpdk-path=${ROOT_DIR_DPDK}/x86_64-native-linuxapp-gcc"
+ echo 1000 > /proc/sys/vm/nr_hugepages
+ fi
}
generic_get() {
@@ -26,14 +39,23 @@ generic_get() {
git reset --hard $NETMAP_REV
popd > /dev/null
fi
+
+ if [[ ${ENABLE_DPDK_PKTIO} -eq 1 ]]; then
+ dpdk_get
+ fi
}
generic_build() {
- :
+ if [[ ${ENABLE_DPDK_PKTIO} -eq 1 ]]; then
+ dpdk_build
+ fi
}
generic_cleanup() {
rm -rf ${NETMAP_SRCDIR}
+ if [[ ${ENABLE_DPDK_PKTIO} -eq 1 ]]; then
+ dpdk_cleanup
+ fi
}
## vim: set ft=sh sw=4 sts=4 et foldmethod=syntax : ##
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp