From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH 2/3] net/virtio: rationalize queue flushing Date: Thu, 18 Jan 2018 21:26:09 +0800 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 Cc: dev@dpdk.org, Maxime Coquelin , Tiwei Bie , stable@dpdk.org To: Olivier Matz Return-path: Content-Disposition: inline In-Reply-To: <20180118090733.12728-3-olivier.matz@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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