qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] e1000: clear EOP for multi-buffer descriptors


From: Stefan Hajnoczi
Subject: [Qemu-devel] Re: [PATCH] e1000: clear EOP for multi-buffer descriptors
Date: Mon, 7 Feb 2011 13:36:36 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Feb 07, 2011 at 02:30:26PM +0200, Michael S. Tsirkin wrote:
> The e1000 spec says: 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 is not a hardware requirement (moving the
> hardware tail pointer is), but is necessary for performing an in–memory
> scan.
> 
> Thus the guest does not have to clear the status byte.  In case it
> doesn't we need to clear EOP for all descriptors
> except the last.  While I don't know of any such guests,
> it's probably a good idea to stick to the spec.
> 
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> Reported-by: Juan Quintela <address@hidden>
> 
> ---
>  hw/e1000.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

This makes sense: if the guest didn't clear the end-of-packet bit but
we're receiving a multi-buffer packet, clear EOP for all but the last
descriptor.

Reviewed-by: Stefan Hajnoczi <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]