Netmap got moved into repository ODP and the linux-generic implementation.
The odp-netmap repository will be deleted from git.linaro.org/lng/

Modifications needed following the move of netmap in linux-generic.
ENABLE_NETMAP is set to one to download and build the netmap code in
linux-generic.
Note: It does not use the netmap interface, it's as broken as it is today.
Thanks to Stuart, who initiated this work.

Signed-off-by: Christophe Milard <christophe.mil...@linaro.org>
---
 apply-and-build.sh      |  1 -
 build-netmap.sh         | 14 ++------------
 build.sh                |  1 +
 helper/platform/generic | 22 +++++++++++++++++++---
 helper/platform/netmap  | 35 -----------------------------------
 5 files changed, 22 insertions(+), 51 deletions(-)
 delete mode 100644 helper/platform/netmap

diff --git a/apply-and-build.sh b/apply-and-build.sh
index 8083ddd..5dbd346 100755
--- a/apply-and-build.sh
+++ b/apply-and-build.sh
@@ -53,7 +53,6 @@ fi
 
 PLATFORM=${PLATFORM:-linux-generic}
 [[ ${ENABLE_KS2} -eq 1 ]] && { PLATFORM="linux-keystone2"; ARCH=arm; }
-[[ ${ENABLE_NETMAP} -eq 1 ]] && PLATFORM="linux-netmap"
 [[ ${ENABLE_DPDK} -eq 1 ]] && PLATFORM="linux-dpdk"
 
 display_os
diff --git a/build-netmap.sh b/build-netmap.sh
index 92a6adc..01d6ca4 100755
--- a/build-netmap.sh
+++ b/build-netmap.sh
@@ -1,16 +1,6 @@
 #!/bin/bash
-set -e
 
-export PLATFORM=${PLATFORM:-linux-netmap}
-export ROOT_DIR=$(readlink -f $(dirname $0))
-source ${ROOT_DIR}/helper/generic
-export ODP_BUILDDIR="${ODP_BUILDDIR:-${BUILDDIR}/odp-netmap}"
+export ENABLE_NETMAP=1
+./build.sh
 
-${ROOT_DIR}/build.sh "$@"
-
-if [[ $? -eq 1 ]]; then
-    exit 1
-else
-    exit 0
-fi
 ## vim: set sw=4 sts=4 et foldmethod=syntax : ##
diff --git a/build.sh b/build.sh
index f3e8322..aba9498 100755
--- a/build.sh
+++ b/build.sh
@@ -32,6 +32,7 @@ export DISTCHECK="${DISTCHECK:-0}"
 export DRYRUN="${DRYRUN:-0}"
 export BUILD_DEPS="${BUILD_DEPS:-1}"
 export RELOCATE_TEST="${RELOCATE_TEST:-1}"
+export ENABLE_NETMAP="${ENABLE_NETMAP:-0}"
 E_VALGRIND="${E_VALGRIND:-0}"
 if [[ ! -z ${TEST_LIST} ]]; then
     export TESTS="${TEST_LIST}"
diff --git a/helper/platform/generic b/helper/platform/generic
index 8829588..85ddacc 100644
--- a/helper/platform/generic
+++ b/helper/platform/generic
@@ -1,15 +1,31 @@
 [ -n "$GENERIC_PLATFORM_HELPER" ] && return || readonly 
GENERIC_PLATFORM_HELPER=1
 
+export NETMAP_SRCDIR=${ROOT_DIR}/netmap
+
 generic_usage() {
-    :
+    echo -e "\tENABLE_NETMAP:\t enable build with netmap, default: 
${ENABLE_NETMAP}"
+    echo -e "\tNETMAP_GIT:\t which NETMAP git repo to use"
+    echo -e "\tNETMAP_REV:\t which NETMAP version to use"
 }
 
 generic_prepare() {
     export GIT_ODP="${GIT_ODP:-git://git.linaro.org/lng/odp.git}"
+    if [[ ${ENABLE_NETMAP} -eq 1 ]]; then
+        export NETMAP_DIR=${NETMAP_SRCDIR}
+        export CONFIGURE_FLAGS="${CONFIGURE_FLAGS} 
--with-netmap-path=${NETMAP_DIR}"
+    fi
 }
 
 generic_get() {
-    :
+    if [[ ${ENABLE_NETMAP} -eq 1 ]]; then
+        #get netmap so that linux-generic netmap based pktio interfaces can be 
tested:
+        NETMAP_GIT=${NETMAP_GIT:-https://code.google.com/p/netmap}
+        NETMAP_REV=${NETMAP_REV:-7e9e5e7602f5c620ade87b722bed266dd4226031}
+        git clone ${NETMAP_GIT} ${NETMAP_SRCDIR}
+        pushd ${NETMAP_SRCDIR} > /dev/null
+        git reset --hard $NETMAP_REV
+        popd > /dev/null
+    fi
 }
 
 generic_build() {
@@ -17,7 +33,7 @@ generic_build() {
 }
 
 generic_cleanup() {
-    :
+    rm -rf ${NETMAP_SRCDIR}
 }
 
 ## vim: set ft=sh sw=4 sts=4 et foldmethod=syntax : ##
diff --git a/helper/platform/netmap b/helper/platform/netmap
deleted file mode 100644
index 65b19d1..0000000
--- a/helper/platform/netmap
+++ /dev/null
@@ -1,35 +0,0 @@
-[ -n "$NETMAP_HELPER" ] && return || readonly NETMAP_HELPER=1
-
-export NETMAP_SRCDIR=$ROOT_DIR/netmap
-
-netmap_get(){
-    GIT_NETMAP=${GIT_NETMAP:-https://code.google.com/p/netmap}
-    NETMAP_REV=${NETMAP_REV:-7e9e5e7602f5c620ade87b722bed266dd4226031}
-
-    git clone ${GIT_NETMAP} ${NETMAP_SRCDIR}
-    pushd ${NETMAP_SRCDIR} > /dev/null
-    git reset --hard $NETMAP_REV
-    popd > /dev/null
-}
-
-netmap_prepare(){
-    #configure the build for ODP
-    export NETMAP_DIR=${NETMAP_SRCDIR}
-    export CONFIGURE_FLAGS="${CONFIGURE_FLAGS} 
--with-sdk-install-path=${NETMAP_DIR}"
-    export GIT_ODP="${GIT_ODP:-git://git.linaro.org/lng/odp-netmap.git}"
-}
-
-netmap_build() {
-    :
-}
-
-netmap_cleanup()
-{
-    rm -rf ${NETMAP_SRCDIR}
-}
-
-netmap_usage() {
-    echo -e "\tGIT_NETMAP:\t which NETMAP git repo to use"
-}
-
-## vim: set ft=sh sw=4 sts=4 et foldmethod=syntax : ##
-- 
2.1.4

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to