From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] vhost: fix off-by-one error on nr_desc check Date: Mon, 25 Jul 2016 17:47:38 +0200 Message-ID: <8594081.HlfyGW5kfQ@xps13> References: <1469455798-19790-1-git-send-email-maxime.coquelin@redhat.com> <20160725152412.GS28708@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Yuanhan Liu , huawei.xie@intel.com, dev@dpdk.org To: Maxime Coquelin Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id DAB5C2BD9 for ; Mon, 25 Jul 2016 17:47:40 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id f65so140848208wmi.0 for ; Mon, 25 Jul 2016 08:47:40 -0700 (PDT) In-Reply-To: <20160725152412.GS28708@yliu-dev.sh.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-25 23:24, Yuanhan Liu: > On Mon, Jul 25, 2016 at 04:09:58PM +0200, Maxime Coquelin wrote: > > nr_desc is not an index but the number of descriptors, > > so can be equal to the virtqueue size. > > > > Fixes: a436f53ebfeb ("vhost: avoid dead loop chain") > > > > Cc: Yuanhan Liu > > Signed-off-by: Maxime Coquelin > > Thanks for catching it! > > > --- > > Hi Yuanhan, > > > > I faced the bug while testing my indirect descriptor patch, it happens > > as soon as the number of chained descritors is above 2. > > > > But the bug may in theory also be faced with normal descriptors, > > In theory, yes, and only in one case, that there is a Tx has 256 > descriptors chained. If that happens, I doubt things work well. > So I would say it just happens __in theory__. > > > so it might > > be good to have it 16.07? > > Even though, it apparently fixes a bug, so I think we could have it > for 16.07. > > Acked-by: Yuanhan Liu Applied, thanks