From: Kevin Wolf <kwolf@redhat.com>
To: Dmitry Fleytman <dmitry@daynix.com>
Cc: Kevin Wolf <mail@kevin-wolf.de>,
qemu-devel@nongnu.org, jasowang@redhat.com
Subject: Re: [Qemu-devel] [PATCH] e1000e: Don't zero out buffer address in rx descriptor
Date: Tue, 18 Oct 2016 16:27:05 +0200 [thread overview]
Message-ID: <20161018142705.GK4706@noname.str.redhat.com> (raw)
In-Reply-To: <E34ADA36-74A5-439D-9459-B5F753292CF9@daynix.com>
Am 18.10.2016 um 16:10 hat Dmitry Fleytman geschrieben:
> On 17 Oct 2016, at 01:35 AM, Kevin Wolf <mail@kevin-wolf.de> wrote:
>
> The e1000e emulation zeroes out any used rx descriptor and then writes a
> completely newly constructed value there. By doing this, it doesn't only
> update the write-back area of the descriptors (as it's supposed to do),
> but it also clears the buffer address, which real hardware doesn't do.
>
> The spec explicitly mentions in chapter 7.1.8 that it is valid for a
> driver to reuse a descriptor and only update the status field while
> doing so, i.e. reusing the old buffer address:
>
> If software statically allocates buffers, and uses memory read to
> check for completed descriptors, it simply has to zero the status
> byte in the descriptor to make it ready for reuse by hardware.
>
> This patch fixes the behaviour to leave the buffer address in
> descriptors unchanged even after the descriptor has been used.
>
>
> Hi Kevin,
>
> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
>
> Thanks for catching this!
Thanks, Dmitry!
I assume that your R-b implies that you don't send a pull request
yourself. If so, what's the process for getting the patch merged? Is
Jason going to pick it up normally or should I send a pull request of my
own?
Another related thing that I noticed while debugging this and turning on
tracing is that the interrupt throttling timers kept firing even if
there was no activity at all. Something might be wrong, there, too.
Next thing I wondered why throttling was enabled at all because the spec
says the default is 0 (turned off). So one thing that I'm pretty sure is
just a misunderstanding is the following defintion:
#define E1000E_MIN_XITR (500) /* No more then 7813 interrupts per
second according to spec 10.2.4.2 */
As I understand it, the spec is just giving an example there and lower
values are valid as well. At the very least, 0 should be accepted as a
special case because it means "disabled" and it's specified to be the
default.
As this wasn't blocking me after I had patched the above constant
locally to 0 so that I could see the actually meaningful trace events, I
didn't dig deeper, but I suspect that my local workaround for the
trace point spam may actually be a valid fix.
Kevin
next prev parent reply other threads:[~2016-10-18 14:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-16 22:35 [Qemu-devel] [PATCH] e1000e: Don't zero out buffer address in rx descriptor Kevin Wolf
2016-10-18 14:10 ` Dmitry Fleytman
2016-10-18 14:27 ` Kevin Wolf [this message]
2016-10-19 6:48 ` Dmitry Fleytman
2016-10-19 7:25 ` Kevin Wolf
2016-10-19 7:57 ` Dmitry Fleytman
2016-10-19 10:07 ` Kevin Wolf
2016-10-19 10:15 ` Dmitry Fleytman
2016-10-21 2:01 ` Jason Wang
2016-10-21 1:58 ` Jason Wang
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=20161018142705.GK4706@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=dmitry@daynix.com \
--cc=jasowang@redhat.com \
--cc=mail@kevin-wolf.de \
--cc=qemu-devel@nongnu.org \
/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).