From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id D55B81B2B8; Thu, 18 Jan 2018 14:26:15 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 46F9E20D11; Thu, 18 Jan 2018 08:26:15 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 18 Jan 2018 08:26:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=gBQE5pgRwg8r3hsHIPwQFImfCm8kk1/VOmOr2HfyX3k=; b=jVpjJb6l 5qaQhZ+wqXs7bMbvV0qfkZ9PsR69C5i/CMV2dtYXhvnCNDbqtlYCAFmsiawSx7gT B6quBcz7YhHW38CezUgyPnIYJfnvceXAiwS3TOsd+/AAIB9TrdRz6g9h5VMl9/jL 84bba/YRd8Jt1SJYs44iXSSOdiMxjmZsxy3tR1fxHZ71qQns+bJImn7ScgvPDphy ++IqfRAHTFk8AZa4sJLz0nivHrT2ZjNC/KhV/YcCLxmX6S1nitmk6TjnRtIKSpSU PvH+4E/uOCb7IcB1ZPPT7cmV5iqB/3PB4X3hzoB3AgziEiVurgzxUM4M//ZDFDHY pqIXxkKM6ZyJbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=gBQE5pgRwg8r3hsHIPwQFImfCm8kk 1/VOmOr2HfyX3k=; b=TcMnHrrhmTOIpiUOFcIg5xKCioaHdatFNkcvZoeLOVle9 M9ChUfpzc4l45Z5UVv0exp+IYEJqzmsm6ZKf/BT1sBr7Q6ogQg9Ztje0QjYzadmT 7b9/VPdX48OmS0jh64kav/Jdw8yK6ONCODzFRdEzfsCYsCYOxjPwrzLIYTeYyngr t8vFrEL/ogvBtmt+dheZSCptBvJ3J0jqW+qisuAHRQ8PfcC39MfC9qXIwjdcnMtk Ks7oIkz69Zeho0OkqtqxdjXis7tRF1s5uH/s3ahpDSNpMn7ffzgwnpRMQwtGXM11 N4DA/OouoTwwpLchtgqhGPAsRJDeTnVvzluWH2DMA== X-ME-Sender: Received: from yliu-mob (unknown [115.148.90.22]) by mail.messagingengine.com (Postfix) with ESMTPA id 2C4477E3D7; Thu, 18 Jan 2018 08:26:13 -0500 (EST) Date: Thu, 18 Jan 2018 21:26:09 +0800 From: Yuanhan Liu To: Olivier Matz Cc: dev@dpdk.org, Maxime Coquelin , Tiwei Bie , stable@dpdk.org Message-ID: <20180118132609.GG29540@yliu-mob> References: <20180118090733.12728-1-olivier.matz@6wind.com> <20180118090733.12728-3-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180118090733.12728-3-olivier.matz@6wind.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH 2/3] net/virtio: rationalize queue flushing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2018 13:26:16 -0000 Hi Oliver, On Thu, Jan 18, 2018 at 10:07:32AM +0100, Olivier Matz wrote: > Rationalize the function virtio_dev_free_mbufs(): > > - skip NULL vqs instead of crashing: this is required for the > next commit > - use the same kind of loop than in virtio_free_queues() > - also flush mbufs from the control queue (this is useless yet) Could we just do "nr_vq = virtio_get_nr_vq(hw) - 1" with a comment that CQ is excluded, for skipping the CQ? > - factorize common code between rxq, txq, cq > > Cc: stable@dpdk.org Could you split the patch two 2: - one for fixing the crash (skip the NULL vqs). We only need this one for stable release. - another one for the refactoring Thanks. --yliu