From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEFsN-00057p-5A for qemu-devel@nongnu.org; Fri, 14 Feb 2014 05:20:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEFsL-0003rx-Ui for qemu-devel@nongnu.org; Fri, 14 Feb 2014 05:20:07 -0500 Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:38616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEFsL-0003pn-Nx for qemu-devel@nongnu.org; Fri, 14 Feb 2014 05:20:05 -0500 Received: by mail-ob0-f177.google.com with SMTP id wp18so13478582obc.8 for ; Fri, 14 Feb 2014 02:20:05 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20140214095244.GA12053@stefanha-thinkpad.redhat.com> References: <52FBB6DD.6090300@msgid.tls.msk.ru> <20140214095244.GA12053@stefanha-thinkpad.redhat.com> Date: Fri, 14 Feb 2014 11:20:04 +0100 Message-ID: From: Vincenzo Maffione Content-Type: multipart/alternative; boundary=089e0122a6c044e4ec04f25b26bd Subject: Re: [Qemu-devel] net: Adding netmap network backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Luigi Rizzo , Michael Tokarev , qemu-devel --089e0122a6c044e4ec04f25b26bd Content-Type: text/plain; charset=ISO-8859-1 Yes, for sure we need to do a check. However, this would involve - I think - some non-trivial modifications to net/netmap.c, because without NS_MOREFRAG you cannot split a packet over more "netmap slots/descriptors" (both tx and rx side) Therefore I would ask (manly Luigi, since netmap is in-tree in FreeBSD): Wouldn't it be better to force --disable-netmap when we realize that NETMAP_API (version number for the netmap API) is less than the value required by QEMU? This can be done in ./configure. In this way we keep the QEMU code cleaner. Thanks, Vincenzo 2014-02-14 10:52 GMT+01:00 Stefan Hajnoczi : > On Wed, Feb 12, 2014 at 10:01:01PM +0400, Michael Tokarev wrote: > > After this patch, qemu fails to build on freebsd with the following > > error message: > > > > net/netmap.c: In function 'netmap_receive_iov': > > net/netmap.c:307: error: 'NS_MOREFRAG' undeclared (first use in this > function) > > net/netmap.c:307: error: (Each undeclared identifier is reported only > once > > net/netmap.c:307: error: for each function it appears in.) > > net/netmap.c: In function 'netmap_send': > > net/netmap.c:356: error: 'NS_MOREFRAG' undeclared (first use in this > function) > > gmake: *** [net/netmap.o] Error 1 > > > > I didn't enable netmap support by default, configure enabled it > > automatically. > > > > Freebsd has /usr/include/net/netmap.h and netmap_user.h out of the box. > > I've no idea what is inside and how compatible it is with whatever > > qemu expects. > > > > I had to explicitly use --disable-netmap for qemu to build on freebsd. > > > > This is FreeBSD 9.1-RELEASE, FWIW. > > Vincenzo: Do you need to add a ./configure check so NS_MOREFRAG is only > used when the host kernel supports it? > -- Vincenzo Maffione --089e0122a6c044e4ec04f25b26bd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Yes, for sure we need to do a check.
However, this would involve - I think - some non-trivial modifications to = net/netmap.c, because without NS_MOREFRAG you cannot split a packet over mo= re "netmap slots/descriptors" (both tx and rx side)

Therefore I would ask (manly Luigi, since netmap is in-tree in Fr= eeBSD): Wouldn't it be better to force --disable-netmap when we realize= that NETMAP_API (version number for the netmap API) is less than the value= required by QEMU? This can be done in ./configure. In this way we keep the= QEMU code cleaner.

Thanks,
=A0 Vincenzo


2014-02-14 10:52 GMT+01:00 Stefan Hajno= czi <stefanha@redhat.com>:
On W= ed, Feb 12, 2014 at 10:01:01PM +0400, Michael Tokarev wrote:
> After this patch, qemu fails to build on freebsd with the following > error message:
>
> net/netmap.c: In function 'netmap_receive_iov':
> net/netmap.c:307: error: 'NS_MOREFRAG' undeclared (first use i= n this function)
> net/netmap.c:307: error: (Each undeclared identifier is reported only = once
> net/netmap.c:307: error: for each function it appears in.)
> net/netmap.c: In function 'netmap_send':
> net/netmap.c:356: error: 'NS_MOREFRAG' undeclared (first use i= n this function)
> gmake: *** [net/netmap.o] Error 1
>
> I didn't enable netmap support by default, configure enabled it > automatically.
>
> Freebsd has /usr/include/net/netmap.h and netmap_user.h out of the box= .
> I've no idea what is inside and how compatible it is with whatever=
> qemu expects.
>
> I had to explicitly use --disable-netmap for qemu to build on freebsd.=
>
> This is FreeBSD 9.1-RELEASE, FWIW.

Vincenzo: Do you need to add a ./configure check so NS_MOREFRAG= is only
used when the host kernel supports it?



--
Vincenzo Maffione
--089e0122a6c044e4ec04f25b26bd--