From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Chen Gang <gang.chen.5i5j@gmail.com>
Cc: jasowang@redhat.com, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] xen: Drop net_rx_ok
Date: Mon, 27 Jul 2015 14:16:04 +0100 [thread overview]
Message-ID: <20150727131604.GC12145@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20150720171209.GD3607@stefanha-thinkpad.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]
On Mon, Jul 20, 2015 at 06:12:09PM +0100, Stefan Hajnoczi wrote:
> On Thu, Jul 02, 2015 at 01:39:16PM +0100, Stefan Hajnoczi wrote:
> > On Tue, Jun 30, 2015 at 10:42:37AM +0800, Fam Zheng wrote:
> > > This is necessary because once we return false from .can_receive, we
> > > need to flush the queue when the .can_receive conditions become true
> > > again, (for example when more buffer is available).
> > >
> > > We can rely on net_rx_packet (which checks the same conditions) to drop
> > > the packet if the device is not ready, so drop net_xen_info.can_receive.
> >
> > This patch changes behavior:
> >
> > Previously can_receive() false meant packets are queued.
> >
> > Now those same conditions result in net_rx_packet() returning -1, so
> > packets are discarded.
> >
> > In order to keep the spirit of the queuing mechanism - where we tell a
> > sender to hold off until more rx buffers become available - I think the
> > following line in net_rx_packet() needs to be changed:
> >
> > if (rc == rp || RING_REQUEST_CONS_OVERFLOW(&netdev->rx_ring, rc)) {
> > xen_be_printf(&netdev->xendev, 2, "no buffer, drop packet\n");
> > return -1; <-- this should be changed to return 0
> > }
> >
> > That change assumes that net_event()'s flush is always called when the
> > rx ring gets more free space.
> >
> > Any thoughts from Xen folks?
>
> Ping?
Need input from Xen developers.
Ping?
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-07-27 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 2:42 [Qemu-devel] [PATCH] xen: Drop net_rx_ok Fam Zheng
2015-07-02 12:39 ` Stefan Hajnoczi
2015-07-20 17:12 ` Stefan Hajnoczi
2015-07-27 13:16 ` Stefan Hajnoczi [this message]
2015-07-27 22:05 ` Chen Gang
2015-07-29 9:28 ` Stefano Stabellini
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=20150727131604.GC12145@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=gang.chen.5i5j@gmail.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=stefano.stabellini@eu.citrix.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).