From 0a985b37272b563b1f8414431c6064eb1aa0c97b Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Thu, 20 Feb 2014 15:40:43 +0100 Subject: net: Disable netmap backend when not supported This patch fixes configure so that the netmap backend is not compiled in if the host doesn't support an API version >= 11. A version upper bound (15) has been added so that the netmap API can be extended with some minor features without requiring QEMU code modifications. Moreover, some changes have been done to net/netmap.c in order to reflect the current netmap API/ABI (11). The NETMAP_WITH_LIBS macro makes possible to include some utilities (e.g. netmap ring macros, D(), RD() and other high level functions) through the netmap headers. In this way we get rid of the D and RD macro definitions in the QEMU code, and we open the way for further code simplifications that will be introduced by future patches. Signed-off-by: Vincenzo Maffione Signed-off-by: Stefan Hajnoczi --- configure | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 00f90702bc..9ad3ff3aeb 100755 --- a/configure +++ b/configure @@ -2215,13 +2215,21 @@ EOF fi ########################################## -# netmap headers probe +# netmap support probe +# Apart from looking for netmap headers, we make sure that the host API version +# supports the netmap backend (>=11). The upper bound (15) is meant to simulate +# a minor/major version number. Minor new features will be marked with values 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" != "no" ; then cat > $TMPC << EOF #include #include #include #include +#if (NETMAP_API < 11) || (NETMAP_API > 15) +#error +#endif int main(void) { return 0; } EOF if compile_prog "" "" ; then -- cgit v1.2.1