[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-devel
Subject:    [Qemu-devel] FW: [Xen-devel] [PATCH] Fox for pcnet device model
From:       "Kamble, Nitin A" <nitin.a.kamble () intel ! com>
Date:       2006-02-25 15:38:17
Message-ID: E305A4AFB7947540BC487567B5449BA80BD2F1 () scsmsx402 ! amr ! corp ! intel ! com
[Download RAW message or body]

Thanks & Regards,
Nitin
--------------------------------------------------
Open Source Technology Center, Intel Corp



-----Original Message-----
From: xen-devel-bounces@lists.xensource.com on behalf of Kamble, Nitin A
Sent: Fri 2/24/2006 4:10 PM
To: xen-devel@lists.xensource.com
Cc: Ian Pratt
Subject: [Xen-devel] [PATCH] Fox for pcnet device model data corruption
 


Thanks & Regards,
Nitin
--------------------------------------------------
Open Source Technology Center, Intel Corp



-----Original Message-----
From: xen-devel-bounces@lists.xensource.com on behalf of Kamble, Nitin A
Sent: Fri 2/24/2006 4:10 PM
To: xen-devel@lists.xensource.com
Cc: Ian Pratt
Subject: [Xen-devel] [PATCH] Fox for pcnet device model data corruption
 
Hi Antony,
  This patch is also application to your pcnet patch for qemu. There is one more \
patch to fix the packet size if it is too small for the pcnet, if you have not see \
it, let me know. 

Thanks & Regards,
Nitin
--------------------------------------------------
Open Source Technology Center, Intel Corp



-----Original Message-----
From: xen-devel-bounces@lists.xensource.com on behalf of Kamble, Nitin A
Sent: Fri 2/24/2006 4:10 PM
To: xen-devel@lists.xensource.com
Cc: Ian Pratt
Subject: [Xen-devel] [PATCH] Fox for pcnet device model data corruption
 
Hi Ian,

   The attached patch fixes pcnet data corruption for VMX guests as reported by you.

All the packets go through the qemu generic packet interface to the specific device \
model. In this case the device model is pcnet.

   The pcnet device model receiver is registered with it like this.

qemu_add_read_packet(nd, pcnet_can_receive, pcnet_receive, d);

   pcnet_can_receive function is used to tell the generic qemu framework that the DM \
can receive packets. It is suppose block incoming packets in the cases such as when \
the pcnet driver is not yet started by the OS or pcnet device is suspended or stopped \
by the OS or it is not ready to receive more packets.

    When the traffic is heavy on the DM, its receive rings can get filled up, and it \
will has to drop the receiving packets. This patch detects this situation in the \
pcnet_can_receive() function and avoids dropping of packets. This mechanism is \
working as a bandwidth handshaking between device model and the sender. Dm is saying \
send me up to the rate at which I can handle it.

 

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>

 

Thanks & Regards,

Nitin

-----------------------------------------------------------------------------------

Open Source Technology Center, Intel Corp

 


["pcnet_corruption_fix.patch" (application/octet-stream)]

diff -r c646586d10651e94c2b56a370e3f737c19883726 tools/ioemu/hw/pcnet.c
--- a/tools/ioemu/hw/pcnet.c    Thu Feb 23 17:40:08 2006
+++ b/tools/ioemu/hw/pcnet.c    Fri Feb 24 04:00:07 2006
@@ -375,7 +375,11 @@

     if (s->recv_pos > 0)
         return 0;
-
+
+    pcnet_rdte_poll(s);
+    if (!(CSR_CRST(s) & 0x8000)) {
+        return 0;
+    }
     return sizeof(s->buffer)-16;
 }


["ATT1497362.txt" (text/plain)]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic