From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fedorov Sergey <s.fedorov@samsung.com>
Cc: aliguori@us.ibm.com, a.basov@samsung.com, qemu-devel@nongnu.org,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler
Date: Tue, 23 Apr 2013 14:00:21 +0200 [thread overview]
Message-ID: <20130423120021.GC2431@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <51763B36.1000701@samsung.com>
On Tue, Apr 23, 2013 at 11:41:42AM +0400, Fedorov Sergey wrote:
> >Beyond that, we also want to avoid growing net queues indefinitely. If
> >the hub does not implement .can_receive() then it relies on growing
> >queues (keeping packets buffered in memory).
> No, net_hub_receive() calls qemu_send_packet(). If the destination
> queue cannot receive the packet qemu_net_queue_append() will take
> care of queue->nq_maxlen.
You are right, sorry. We do discard packets at nq_maxlen.
The problem with ignoring .can_receive() on the hub is that it breaks
flow control. For example, net/tap.c is designed to avoid reading more
packets if its peer cannot receive (see tap_can_send()).
If the hub claims it can always receive we waste cycles reading packets
from the tap device only to discard them.
Since qemu.git already has a fix which preserves flow control, I am not
going to merge your patch.
Stefan
next prev parent reply other threads:[~2013-04-23 12:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 11:31 [Qemu-devel] [PATCH] net/hub: remove can_receive handler Sergey Fedorov
2013-04-22 11:47 ` Stefan Hajnoczi
2013-04-22 12:26 ` Fedorov Sergey
2013-04-22 14:57 ` Stefan Hajnoczi
2013-04-22 15:27 ` Fedorov Sergey
2013-04-22 16:09 ` Paolo Bonzini
2013-04-23 7:27 ` Fedorov Sergey
2013-04-23 6:58 ` Stefan Hajnoczi
2013-04-23 7:41 ` Fedorov Sergey
2013-04-23 12:00 ` Stefan Hajnoczi [this message]
2013-04-23 13:14 ` Fedorov Sergey
2013-10-21 11:44 ` Fedorov Sergey
2013-10-21 11:52 ` Fedorov Sergey
2013-10-28 7:26 ` Fedorov Sergey
2013-10-29 14:55 ` Stefan Hajnoczi
2013-10-30 10:29 ` Fedorov Sergey
2013-10-30 12:55 ` Stefan Hajnoczi
2013-04-23 9:32 ` Fedorov Sergey
2013-04-23 11:48 ` Stefan Hajnoczi
2013-04-23 11:58 ` Fedorov Sergey
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=20130423120021.GC2431@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=a.basov@samsung.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=s.fedorov@samsung.com \
--cc=stefanha@redhat.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).