All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: alex.williamson@hp.com
Subject: Re: [Qemu-devel] [PATCH][RESEND] qemu:e1000: Fix RX descriptor low threshold interrupt logic
Date: Fri, 20 Mar 2009 12:31:48 -0500	[thread overview]
Message-ID: <49C3D304.5070507@us.ibm.com> (raw)
In-Reply-To: <20090319161936.24035.95774.stgit@kvm.aw>

Alex Williamson wrote:
> The RXDMT0 interrupt is supposed to fire when the number of free
> RX descriptors drops to some fraction of the total descriptors.
> However in practice, it seems like we're adding this interrupt
> cause on every RX.  Fix the logic to treat (tail - head) as the
> number of free entries rather than the number of used entries.
>
> Signed-off-by: Alex Williamson <alex.williamson@hp.com>
>   

Applied to trunk and stable, thanks.

Regards,

Anthony Liguori

> ---
>
>  hw/e1000.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/e1000.c b/hw/e1000.c
> index e6155d6..1644201 100644
> --- a/hw/e1000.c
> +++ b/hw/e1000.c
> @@ -666,8 +666,8 @@ e1000_receive(void *opaque, const uint8_t *buf, int size)
>      n = E1000_ICS_RXT0;
>      if ((rdt = s->mac_reg[RDT]) < s->mac_reg[RDH])
>          rdt += s->mac_reg[RDLEN] / sizeof(desc);
> -    if (((rdt - s->mac_reg[RDH]) * sizeof(desc)) << s->rxbuf_min_shift >=
> -        s->mac_reg[RDLEN])
> +    if (((rdt - s->mac_reg[RDH]) * sizeof(desc)) <= s->mac_reg[RDLEN] >>
> +        s->rxbuf_min_shift)
>          n |= E1000_ICS_RXDMT0;
>  
>      set_ics(s, 0, n);
>
>
>
>
>   

      reply	other threads:[~2009-03-20 17:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-19 16:19 [Qemu-devel] [PATCH][RESEND] qemu:e1000: Fix RX descriptor low threshold interrupt logic Alex Williamson
2009-03-20 17:31 ` Anthony Liguori [this message]

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=49C3D304.5070507@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=alex.williamson@hp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.