From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 827B41C01 for ; Thu, 26 Jul 2018 09:33:49 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8995A40216E3; Thu, 26 Jul 2018 07:33:48 +0000 (UTC) Received: from localhost (dhcp-192-225.str.redhat.com [10.33.192.225]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67D8710FFE52; Thu, 26 Jul 2018 07:33:43 +0000 (UTC) Date: Thu, 26 Jul 2018 09:33:42 +0200 From: Jens Freimann To: Tiwei Bie Cc: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org, lei.a.yao@intel.com Message-ID: <20180726073342.vp2m5hqrbhu4rma7@jenstp.localdomain> References: <20180726013721.30200-1-tiwei.bie@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180726013721.30200-1-tiwei.bie@intel.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 26 Jul 2018 07:33:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 26 Jul 2018 07:33:48 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jfreimann@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH 1/2] vhost: fix overflow on shadow used ring 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, 26 Jul 2018 07:33:49 -0000 On Thu, Jul 26, 2018 at 09:37:20AM +0800, Tiwei Bie wrote: >The shadow used ring's size is the same as the vq's size, >so we shouldn't try more than "vq size" times. Besides, >the element pointed by avail->idx isn't available to the >device, so we will return error when try "vq size" times. > >Fixes: 24e4844048e1 ("vhost: unify Rx mergeable and non-mergeable paths") >Fixes: a922401f35cc ("vhost: add Rx support for packed ring") > >Signed-off-by: Tiwei Bie >--- > lib/librte_vhost/virtio_net.c | 37 ++++++++++++++++------------------- > 1 file changed, 17 insertions(+), 20 deletions(-) > Reviewed-by: Jens Freimann