qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Luigi Rizzo <rizzo@iet.unipi.it>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@amazon.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Vincenzo Maffione <v.maffione@gmail.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Giuseppe Lettieri <g.lettieri@iet.unipi.it>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] net: Disable netmap backend when not supported
Date: Thu, 20 Feb 2014 10:46:56 +0100	[thread overview]
Message-ID: <20140220094656.GA1272@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CA+hQ2+h0Vk3v6aC4RQ3c4Lbe9Nq8FO93z1H8rYyt1ZOex4S1Hg@mail.gmail.com>

On Wed, Feb 19, 2014 at 10:30:03AM -0800, Luigi Rizzo wrote:
> On Wed, Feb 19, 2014 at 7:30 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> 
> > On Fri, Feb 14, 2014 at 05:40:24PM +0100, Vincenzo Maffione wrote:
> > > diff --git a/configure b/configure
> > > index 88133a1..61eb932 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -2118,6 +2118,9 @@ if test "$netmap" != "no" ; then
> > >  #include <net/if.h>
> > >  #include <net/netmap.h>
> > >  #include <net/netmap_user.h>
> > > +#if (NETMAP_API < 11) || (NETMAP_API > 15)
> > > +#error
> > > +#endif
> >
> > Why error when NETMAP_API > 15?
> >
> 
> this is meant to simulate a minor/major version number.
> We will mark minor new features with values up to 15,
> and if something happens that requires a change in the
> backend we will move above 15, at which point we
> will submit backend fixes and also the necessary
> update to ./configure

I see.  A comment in the code would be nice to explain that.

> > > -    ring->cur = NETMAP_RING_NEXT(ring, i);
> > > -    ring->avail--;
> > > +    ring->cur = ring->head = nm_ring_next(ring, i);
> > >      ioctl(s->me.fd, NIOCTXSYNC, NULL);
> > >
> > >      return size;
> >
> > Are these changes related to the NETMAP_WITH_LIBS macro?  Please do that
> > in a separate patch so we keep the version checking change separate from
> > the NETMAP_WITH_LIBS change.
> >
> 
> netmap version 11 and above has NETMAP_WITH_LIBS,
> while previous versions do not, so this ./configure
> change has to go together with the change in the backend.
> 
> The netmap 11 code has already been committed to the FreeBSD
> source repositories (for HEAD, 10 and 9) and to
> code.google.com/p/netmap/ (for those who want it on linux).
> 
> So there is really no point, in my opinion, to make one
> intermediate commit just to ./configure to disable
> netmap detection on FreeBSD (it is already off on linux),
> immediately followed by this one that uses the new feature.
> 
> Just to clarify: with one exception (fields in struct netmap_ring)
> the netmap changes that we have are not at the kernel/user boundary
> but in a library which avoids replicating long and boring code
> (interface name parsing, parameter setting) in applications.
> 
> Avoiding the single incompatible struct change would have
> been of course possible, but at the cost
> extra complexity in the kernel and in userspace
> (to support two slightly different interfaces).
> Since netmap is (so far) relatively little used I thought it
> was more important to fix the API and keep it simple.

Thanks for explaining.  Please put justification for the
NETMAP_WITH_LIBS changes in the commit description.

Stefan

      reply	other threads:[~2014-02-20  9:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 16:40 [Qemu-devel] [PATCH] net: Disable netmap backend when not supported Vincenzo Maffione
2014-02-19 15:30 ` Stefan Hajnoczi
2014-02-19 15:57   ` Vincenzo Maffione
2014-02-20  9:49     ` Stefan Hajnoczi
2014-02-21 19:44       ` Luigi Rizzo
2014-02-19 18:30   ` Luigi Rizzo
2014-02-20  9:46     ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140220094656.GA1272@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=aliguori@amazon.com \
    --cc=g.lettieri@iet.unipi.it \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rizzo@iet.unipi.it \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=v.maffione@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).