From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH v2] vhost: fix corner case for enqueue operation Date: Thu, 27 Sep 2018 14:24:10 +0200 Message-ID: <47f35e9f-a211-5eb5-b2e9-23145f44d1bc@redhat.com> References: <1536305094-126439-1-git-send-email-jiayu.hu@intel.com> <1537156482-46428-1-git-send-email-jiayu.hu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: tiwei.bie@intel.com, zhihong.wang@intel.com, Gavin.Hu@arm.com To: Jiayu Hu , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id B6C601B450 for ; Thu, 27 Sep 2018 14:24:14 +0200 (CEST) In-Reply-To: <1537156482-46428-1-git-send-email-jiayu.hu@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 09/17/2018 05:54 AM, Jiayu Hu wrote: > When perform enqueue operations on the split and packed ring, s/perform/performing/ s/ring/rings/ > if the reserved buffer length from the descriptor table execeeds > 65535, the returned length by fill_vec_buf_split/_packed() is > overflowed. This patch is to avoid this corner case. s/overflowed/overflows/ > > Fixes: f689586b ("vhost: shadow used ring update") > Fixes: fd68b473 ("vhost: use buffer vectors in dequeue path") > Fixes: 2f3225a7 ("vhost: add vector filling support for packed ring") > Fixes: 37f5e79a ("vhost: add shadow used ring support for packed rings") > Fixes: a922401f ("vhost: add Rx support for packed ring") > Fixes: ae999ce4 ("vhost: add Tx support for packed ring") > > Signed-off-by: Jiayu Hu > --- > lib/librte_vhost/virtio_net.c | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) > Other than that, the patch looks good to me. Thanks for fixing it. Reviewed-by: Maxime Coquelin Maxime