From nobody Wed Nov 12 10:11:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1570200771; cv=none; d=zoho.com; s=zohoarc; b=Ox9mG84SeKq0YdVo75YjEtydTZBMvztT4TS9EDXdHas2D3fsTGwAQxVfochOGnauDVbs+EYv8v589u6rLmx857ibzOJDVoftyOskUTSOTt0YIOAelOYHLJnEkIsU7J5dTSzXE/E5u5pYP7IEoOo5HliOJ0e+KsV1iST9/YVYHJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570200771; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=UTbyOejre6kCZEgr0x8P/T6Nsp7bTHA92d1BVGWLyQo=; b=GJAW6LAiCcrC+AIPBMyU5/Mjmy45wL7M6PSabVfHdp1yUSgRqDGzMYhdxdGhDi4SJW1rvcHOWpFdUngqwTay7dRFEOIZ57TnBNgjZUuyHtEsNiWjkgS4qk11Z76TyYZbxBwbdBpiUxqKEb5kpTlfFS850F45QyTg2at2UrXRobs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1570200770770409.053149675593; Fri, 4 Oct 2019 07:52:50 -0700 (PDT) Received: from localhost ([::1]:49494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGOwr-0008Pd-9h for importer@patchew.org; Fri, 04 Oct 2019 10:52:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40494) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGNF5-00033N-Ph for qemu-devel@nongnu.org; Fri, 04 Oct 2019 09:03:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGNF4-0002ak-7U for qemu-devel@nongnu.org; Fri, 04 Oct 2019 09:03:31 -0400 Received: from smtp2.unipi.it ([131.114.21.21]:44168 helo=smtp.unipi.it) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iGNF3-0002UG-Tu for qemu-devel@nongnu.org; Fri, 04 Oct 2019 09:03:30 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.unipi.it (Postfix) with ESMTP id 2F16440EAB; Fri, 4 Oct 2019 15:03:22 +0200 (CEST) Received: from lettieri.iet.unipi.it (triderg7.iet.unipi.it [131.114.58.42]) (Authenticated User) by smtp.unipi.it (Postfix) with ESMTPSA id 855A340EAA; Fri, 4 Oct 2019 15:03:20 +0200 (CEST) Received: by lettieri.iet.unipi.it (Postfix, from userid 1000) id 4AFE040AC; Fri, 4 Oct 2019 15:03:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at unipi.it From: Giuseppe Lettieri To: Markus Armbruster Subject: [PATCH] netmap: support git-submodule build otption Date: Fri, 4 Oct 2019 15:02:42 +0200 Message-Id: <20191004130242.27267-1-g.lettieri@iet.unipi.it> X-Mailer: git-send-email 2.21.0 In-Reply-To: <874l13qmvb.fsf@dusky.pond.sub.org> References: <874l13qmvb.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.114.21.21 X-Mailman-Approved-At: Fri, 04 Oct 2019 10:50:00 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Daniel P . Berrange" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jason Wang , qemu-devel@nongnu.org, Vincenzo Maffione , Giuseppe Lettieri , Stefan Hajnoczi , Luigi Rizzo Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Giuseppe Lettieri With this patch, netmap support can be enabled with the following options to the configure script: --enable-netmap[=3Dsystem] Use the host system netmap installation. Fail if not found. --enable-netmap=3Dgit clone the official netmap repository on github (mostly useful for CI) Signed-off-by: Giuseppe Lettieri --- .gitmodules | 3 +++ configure | 64 +++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/.gitmodules b/.gitmodules index c5c474169d..bf75dbc5e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,3 +58,6 @@ [submodule "roms/opensbi"] path =3D roms/opensbi url =3D https://git.qemu.org/git/opensbi.git +[submodule "netmap"] + path =3D netmap + url =3D https://github.com/luigirizzo/netmap.git diff --git a/configure b/configure index 8f8446f52b..cb2c6c70d6 100755 --- a/configure +++ b/configure @@ -1132,6 +1132,10 @@ for opt do ;; --enable-netmap) netmap=3D"yes" ;; + --enable-netmap=3Dgit) netmap=3D"git" + ;; + --enable-netmap=3Dsystem) netmap=3D"system" + ;; --disable-xen) xen=3D"no" ;; --enable-xen) xen=3D"yes" @@ -3318,8 +3322,9 @@ fi # a minor/major version number. Minor new features will be marked with val= ues up # to 15, and if something happens that requires a change to the backend we= will # move above 15, submit the backend fixes and modify this two bounds. -if test "$netmap" !=3D "no" ; then - cat > $TMPC << EOF +case "$netmap" in + "" | yes | system) + cat > $TMPC << EOF #include #include #include @@ -3330,14 +3335,55 @@ if test "$netmap" !=3D "no" ; then int main(void) { return 0; } EOF if compile_prog "" "" ; then - netmap=3Dyes + netmap_system=3Dyes else - if test "$netmap" =3D "yes" ; then - feature_not_found "netmap" - fi - netmap=3Dno + netmap_system=3Dno fi -fi + ;; +esac + +case "$netmap" in + "" | yes) + if test "$netmap_system" =3D "yes"; then + netmap=3Dsystem + elif test -e "${source_path}/.git" && test $git_update =3D 'yes' ; then + netmap=3Dgit + elif test -e "${source_path}/netmap/configure" ; then + netmap=3Dinternal + elif test -z "$netmap" ; then + netmap=3Dno + else + feature_not_found "netmap" "Install netmap or git submodule" + fi + ;; + + system) + if test "$netmap_system" =3D "no"; then + feature_not_found "netmap" "Install netmap" + fi + ;; +esac + +case "$netmap" in + git | internal) + if test "$netmap" =3D git; then + git_submodules=3D"${git_submodules} netmap" + fi + mkdir -p netmap + QEMU_CFLAGS=3D"$QEMU_CFLAGS -I\$(SRC_PATH)/netmap/sys" + ;; + + system) + ;; + + no) + ;; + *) + error_exit "Unknown state for netmap: $netmap" + ;; +esac + +########################################## =20 ########################################## # libcap-ng library probe @@ -6585,7 +6631,7 @@ if test "$vde" =3D "yes" ; then echo "CONFIG_VDE=3Dy" >> $config_host_mak echo "VDE_LIBS=3D$vde_libs" >> $config_host_mak fi -if test "$netmap" =3D "yes" ; then +if test "$netmap" !=3D "no" ; then echo "CONFIG_NETMAP=3Dy" >> $config_host_mak fi if test "$l2tpv3" =3D "yes" ; then --=20 2.21.0