From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: [PATCH 2/2] virtio reset support Date: Thu, 24 Jan 2008 15:09:07 +0200 Message-ID: <1201180147.7100.35.camel@localhost.localdomain> References: <200801240116.26160.rusty@rustcorp.com.au> <200801240118.09032.rusty@rustcorp.com.au> Reply-To: dor.laor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Avi Kivity , virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Rusty Russell Return-path: In-Reply-To: <200801240118.09032.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org The patches really fix/simplify things :) Did you test device open->close->open? It was broken in my last test, we cad add link indications too. Besides that I also remembered that adding 'vq->num_free =vq->ring.num;' after reset fixed part of the problems, I don't remember why (gonna re-check it soon), I think it was the reset calls for (..) detach_buf for all buffers regardless if they were free already. Cheers, Dor On Thu, 2008-01-24 at 01:18 +1100, Rusty Russell wrote: > diff -r f9464b21ed9c drivers/net/virtio_net.c > --- a/drivers/net/virtio_net.c Wed Jan 23 23:52:47 2008 +1100 > +++ b/drivers/net/virtio_net.c Thu Jan 24 00:47:05 2008 +1100 > @@ -415,12 +415,10 @@ static void virtnet_remove(struct virtio > struct sk_buff *skb; > > /* Free our skbs in send and recv queues, if any. */ > - vi->rvq->vq_ops->shutdown(vi->rvq); > while ((skb = __skb_dequeue(&vi->recv)) != NULL) { > kfree_skb(skb); > vi->num--; > } > - vi->svq->vq_ops->shutdown(vi->svq); > while ((skb = __skb_dequeue(&vi->send)) != NULL) > kfree_skb(skb); ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/