qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Beniamino Galvani <b.galvani@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
	"Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Li Guang" <lig.fnst@cn.fujitsu.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes
Date: Tue, 28 Jan 2014 19:48:35 +0100	[thread overview]
Message-ID: <20140128184834.GB4660@gmail.com> (raw)
In-Reply-To: <CAFEAcA9B4QUgz1DcVYtwP+eje_Q5YXRe7D5PqoGZfTjtvBA1Zw@mail.gmail.com>

On Tue, Jan 28, 2014 at 10:43:28AM +0000, Peter Maydell wrote:
> On 28 January 2014 00:04, Peter Crosthwaite
> <peter.crosthwaite@xilinx.com> wrote:
> > On Tue, Jan 28, 2014 at 4:32 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> >>>  void fifo8_reset(Fifo8 *fifo)
> >>>  {
> >>>      fifo->num = 0;
> >>> +    fifo->head = 0;
> >>
> >> This is a bug fix, right? It should go in its own patch.
> >>
> >
> > No bug - where the ring buffer starts following a reset is undefined
> > and need not be defined. But it improves the predicatability of the
> > newly added pop_buf fn as you can now following a reset, guarantee
> > that a single pop_buf will take all contents if its the first pop
> > (which is how its being used in P2).
> 
> True. I still think it should have its own patch (and
> indeed it would be worth saying what you just did as
> part of the commit message for that patch...)

Ok, I will move the change to a new patch.

> I think it's also nicer for any state that gets migrated
> to be reset cleanly.

Do you mean also the buffer content? In the emac the tx fifo gets
reset after each transmission. Isn't this too costly?

Beniamino

  reply	other threads:[~2014-01-28 18:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-26 21:39 [Qemu-devel] [PATCH v4 0/3] hw/arm: add ethernet support to Allwinner A10 Beniamino Galvani
2014-01-26 21:39 ` [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes Beniamino Galvani
2014-01-27 18:32   ` Peter Maydell
2014-01-28  0:04     ` Peter Crosthwaite
2014-01-28 10:43       ` Peter Maydell
2014-01-28 18:48         ` Beniamino Galvani [this message]
2014-01-29 12:02           ` Peter Crosthwaite
2014-01-28 18:44       ` Beniamino Galvani
2014-01-26 21:39 ` [Qemu-devel] [PATCH v4 2/3] hw/net: add support for Allwinner EMAC Fast Ethernet controller Beniamino Galvani
2014-01-27 18:41   ` Peter Maydell
2014-01-28  0:31   ` Peter Crosthwaite
2014-01-26 21:39 ` [Qemu-devel] [PATCH v4 3/3] hw/arm/allwinner-a10: initialize EMAC Beniamino Galvani
2014-01-27 18:44   ` Peter Maydell
2014-01-28  0:32   ` Peter Crosthwaite

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=20140128184834.GB4660@gmail.com \
    --to=b.galvani@gmail.com \
    --cc=afaerber@suse.de \
    --cc=lig.fnst@cn.fujitsu.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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).