From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752740Ab2LDJ1w (ORCPT ); Tue, 4 Dec 2012 04:27:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11912 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988Ab2LDJ1u (ORCPT ); Tue, 4 Dec 2012 04:27:50 -0500 From: Jason Wang To: "Michael S. Tsirkin" Cc: rusty@rustcorp.com.au, krkumar2@in.ibm.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, bhutchings@solarflare.com, jwhan@filewood.snu.ac.kr, shiyer@redhat.com Subject: Re: [net-next rfc v7 2/3] virtio_net: multiqueue support Date: Tue, 04 Dec 2012 17:27:36 +0800 Message-ID: <3580168.NyC9XAQvS1@jason-thinkpad-t430s> User-Agent: KMail/4.9.2 (Linux/3.7.0-rc6+; KDE/4.9.2; x86_64; ; ) In-Reply-To: <20121204073503.GB7499@redhat.com> References: <1354011360-39479-1-git-send-email-jasowang@redhat.com> <50BC7F59.301@redhat.com> <20121204073503.GB7499@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, December 04, 2012 09:35:03 AM Michael S. Tsirkin wrote: > On Mon, Dec 03, 2012 at 06:30:49PM +0800, Jason Wang wrote: > > On 12/03/2012 06:14 PM, Michael S. Tsirkin wrote: > > > On Tue, Nov 27, 2012 at 06:15:59PM +0800, Jason Wang wrote: > > >> > - if (!try_fill_recv(&vi->rq, GFP_KERNEL)) > > >> > - schedule_delayed_work(&vi->rq.refill, 0); > > >> > + for (i = 0; i < vi->max_queue_pairs; i++) > > >> > + if (!try_fill_recv(&vi->rq[i], GFP_KERNEL)) > > >> > + schedule_delayed_work(&vi->rq[i].refill, 0); > > >> > > > >> > mutex_lock(&vi->config_lock); > > >> > vi->config_enable = true; > > >> > mutex_unlock(&vi->config_lock); > > >> > > > >> > + BUG_ON(virtnet_set_queues(vi)); > > >> > + > > >> > > > >> > return 0; > > >> > > > >> > } > > >> > #endif > > > > > > Also crashing on device nack of command is also not nice. > > > In this case it seems we can just switch to > > > single-queue mode which should always be safe. > > > > Not sure it's safe. It depends on the reason why this call fails. If we > > left a state that the driver only use single queue but the device use > > multi queues, we may still lost the network. > > Looks like we won't: napi will stay enabled on all queues > so we will process incoming packets. True, consider there's no bug in qemu. Will leave a just leave a warning in next version. Thanks