From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhQuL-00027C-1j for qemu-devel@nongnu.org; Tue, 06 Sep 2016 20:40:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhQuJ-0001jD-Jr for qemu-devel@nongnu.org; Tue, 06 Sep 2016 20:40:05 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:36251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhQuJ-0001j5-FP for qemu-devel@nongnu.org; Tue, 06 Sep 2016 20:40:03 -0400 Received: by mail-qt0-x243.google.com with SMTP id 11so10694qtc.3 for ; Tue, 06 Sep 2016 17:40:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Mateus Krepsky Ludwich Date: Tue, 6 Sep 2016 21:39:42 -0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] eepro100: Frame Reception List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jason Wang Ping. http://patchwork.ozlabs.org/patch/662355/ On Tue, Aug 23, 2016 at 1:46 PM, Mateus Krepsky Ludwich wrote: > Changed E100 device so it updates EOF, F, and Actual Count fields of Receive > Frame Descriptor (RFD). > Assuming RFD.actual_count equals to size. > > Signed-off-by: Mateus Krepsky Ludwich > --- > hw/net/eepro100.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c > index bab4dbf..c0f3816 100644 > --- a/hw/net/eepro100.c > +++ b/hw/net/eepro100.c > @@ -1739,6 +1739,7 @@ static ssize_t nic_receive(NetClientState *nc, > const uint8_t * buf, size_t size) > &rx, sizeof(eepro100_rx_t)); > uint16_t rfd_command = le16_to_cpu(rx.command); > uint16_t rfd_size = le16_to_cpu(rx.size); > + uint16_t rfd_count = size | 0xc000 ; /* Setting EOF and F bits */ > > if (size > rfd_size) { > logout("Receive buffer (%" PRId16 " bytes) too small for data " > @@ -1756,6 +1757,8 @@ static ssize_t nic_receive(NetClientState *nc, > const uint8_t * buf, size_t size) > offsetof(eepro100_rx_t, status), rfd_status); > stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset + > offsetof(eepro100_rx_t, count), size); > + stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset + > + offsetof(eepro100_rx_t, count), rfd_count); > /* Early receive interrupt not supported. */ > #if 0 > eepro100_er_interrupt(s); > -- > 1.9.1