qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Anton Ivanov (antivano)" <antivano@cisco.com>
Cc: Luigi Rizzo <rizzo@iet.unipi.it>,
	"Qemu-devel@nongnu.org" <Qemu-devel@nongnu.org>,
	Vincenzo Maffione <v.maffione@gmail.com>
Subject: Re: [Qemu-devel] Contribution - L2TPv3 transport
Date: Wed, 5 Mar 2014 09:59:48 +0100	[thread overview]
Message-ID: <20140305085948.GA18052@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <5315A119.2090600@cisco.com>

On Tue, Mar 04, 2014 at 09:47:09AM +0000, Anton Ivanov (antivano) wrote:
> On 04/03/14 09:36, Stefan Hajnoczi wrote:
> > On Mon, Mar 03, 2014 at 02:01:00PM +0000, Anton Ivanov (antivano) wrote:
> >> On 03/03/14 13:27, Stefan Hajnoczi wrote:
> >>> On Fri, Feb 28, 2014 at 08:28:11AM +0000, Anton Ivanov (antivano) wrote:
> >>>> 3. Qemu to communicate with the local host, remote vms, network devices,
> >>>> etc at speeds which for a number of use cases exceed the speed of the
> >>>> legacy tap driver.
> >>> This surprises me.  It's odd that tap performs significantly worse.
> >>
> >> Multipacket RX can go a very long way and it does not work on tap's
> >> emulation of a raw socket. At least in 3.2 :)
> > Luigi and Vincenzo had ideas on making QEMU's net layer support
> > multipacket tx using something like TCP_CORK.  This would map to
> > sendmmsg(2).
> >
> > Basically the net client gets multiple .receive() calls but is told to
> > hold off on submitting the packets.  Then, when it finally gets
> > uncorked, it can sendmmsg(2).  The only issue is we need to hold on to
> > the tx buffers longer than normal.
> 
> Cool, I will be happy to give a hand with that.
> 
> My main problem so far trying to implement it has been the timers - the 
> qemu internal timer API has no relative timers, only absolute. So you 
> end up with a very high cost of setting and checking a delayed xmit timer.

I'm thinking about something simpler that doesn't use a timer:

Rely on the guest to submit a batch of packets for tx.  When processing
the descriptor ring in the device emulation code (virtio-net, etc), use
the CORK flag on all packets except the final one.

This essentially hands the contents of the tx ring to the netdev (tap,
L2TPv3, etc) and then lets them submit the entire batch using
sendmmsg(2).

When we discussed this previously there was concern about the latency
added by CORK.

  reply	other threads:[~2014-03-05  9:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28  8:28 [Qemu-devel] Contribution - L2TPv3 transport Anton Ivanov (antivano)
2014-02-28 10:02 ` Paolo Bonzini
2014-02-28 11:17   ` Anton Ivanov (antivano)
2014-02-28 11:36     ` Paolo Bonzini
2014-02-28 12:59       ` Anton Ivanov (antivano)
2014-02-28 13:55   ` Anton Ivanov (antivano)
2014-03-04 15:19   ` Anton Ivanov (antivano)
2014-03-04 15:22     ` Anton Ivanov (antivano)
2014-03-04 15:53       ` Eric Blake
2014-03-04 16:05         ` Anton Ivanov (antivano)
2014-03-05  8:49         ` Anton Ivanov (antivano)
2014-03-05 11:38           ` Peter Maydell
2014-03-04 15:41     ` Eric Blake
2014-03-04 15:58       ` Anton Ivanov (antivano)
2014-03-04 16:04         ` Paolo Bonzini
2014-03-04 16:33     ` Eric Blake
2014-03-04 16:48       ` Anton Ivanov (antivano)
2014-03-04 16:55         ` Paolo Bonzini
2014-03-04 17:28           ` Anton Ivanov (antivano)
2014-03-04 17:30             ` Paolo Bonzini
2014-02-28 13:40 ` Eric Blake
2014-02-28 13:52   ` Anton Ivanov (antivano)
2014-02-28 13:57     ` Eric Blake
2014-02-28 14:03       ` Anton Ivanov (antivano)
2014-02-28 14:00   ` Paolo Bonzini
2014-02-28 15:06     ` Eric Blake
2014-02-28 15:20       ` Paolo Bonzini
2014-03-03 13:27 ` Stefan Hajnoczi
2014-03-03 14:01   ` Anton Ivanov (antivano)
2014-03-04  9:36     ` Stefan Hajnoczi
2014-03-04  9:47       ` Anton Ivanov (antivano)
2014-03-05  8:59         ` Stefan Hajnoczi [this message]
2014-03-05  9:13           ` Vincenzo Maffione
2014-03-03 14:53 ` Stefan Hajnoczi
2014-03-04 11:32   ` Anton Ivanov (antivano)
2014-03-05  9:07     ` Stefan Hajnoczi

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=20140305085948.GA18052@stefanha-thinkpad.muc.redhat.com \
    --to=stefanha@gmail.com \
    --cc=Qemu-devel@nongnu.org \
    --cc=antivano@cisco.com \
    --cc=rizzo@iet.unipi.it \
    --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).