From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] Fix e1000 can_receive handler Date: Thu, 08 May 2008 09:03:09 -0500 Message-ID: <4823081D.5010108@us.ibm.com> References: <1210196458-17069-1-git-send-email-aliguori@us.ibm.com> <20080508132646.GA27727@volta.aurel32.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Avi Kivity To: Aurelien Jarno Return-path: In-Reply-To: <20080508132646.GA27727@volta.aurel32.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Aurelien Jarno wrote: > On Wed, May 07, 2008 at 04:40:58PM -0500, Anthony Liguori wrote: > >> The current logic of the can_receive handler is to allow packets whenever the >> receiver is disabled or when there are descriptors available in the ring. >> >> I think the logic ought to be to allow packets whenever the receiver is enabled >> and there are descriptors available in the ring. >> > > The current behaviour is actually correct, this is the way QEMU works: > when the card is stopped, it should always accept packets, and then > discard them. > The previous patches in my virtio series change that behavior. Before delivering a packet to a VLAN, it checks to see if any of the VLAN clients are able to receive a packet. This is very important for achieving good performance with tap. With virtio-net, we were dropping a ton of packets with tap because there weren't descriptors available on the RX ring. I plan to submit that behavioral change to QEMU upstream along with the virtio drivers. I'm still optimizing phys_page_find() though. The performance impact of switching the ring manipulation to using the stl_phys accessors is unacceptable for KVM. Regards, Anthony Liguori ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone