From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D47AA0A0C for ; Mon, 19 Jul 2021 11:07:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF7DA410EE; Mon, 19 Jul 2021 11:07:51 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 42E244069D for ; Mon, 19 Jul 2021 11:07:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626685668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eoDABtSfNkHlDUG8D8Ve/h86Eh3a7Z8y7ryG4rL6jjk=; b=RJCfPqG810nMiTyL9IOVW5fA33l6tU3R9pOX4k7VT5FclY9s3mpc5nFh4Q7d2Za/Gji/ng N+o7O60Z3MEHHPSLk0cbZ999rKP0T8sGNciA0XrL+2pj6n5m74hXpwf3hAvhSI3VFXNkUl gIsz+356T6kOD/Fqebh0z/48GrmKC5c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-1fwPgOmtObCScwwXYyAY3w-1; Mon, 19 Jul 2021 05:07:47 -0400 X-MC-Unique: 1fwPgOmtObCScwwXYyAY3w-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 926B2804141; Mon, 19 Jul 2021 09:07:45 +0000 (UTC) Received: from [10.36.110.26] (unknown [10.36.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4768027068; Mon, 19 Jul 2021 09:07:44 +0000 (UTC) To: Cheng Jiang , Chenbo.Xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, yvonnex.yang@intel.com, stable@dpdk.org References: <20210708102528.36581-1-cheng1.jiang@intel.com> From: Maxime Coquelin Message-ID: <04bbf1a8-793d-1cc0-d427-3bc885390e91@redhat.com> Date: Mon, 19 Jul 2021 11:07:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210708102528.36581-1-cheng1.jiang@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] vhost: fix async packed ring batch datapath X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, On 7/8/21 12:25 PM, Cheng Jiang wrote: > We assume that in the sync path, if there is no buffer wrap in the > avail descriptors fetched in a batch, there is no buffer wrap in the > used descriptors which need to be written back in this batch, but > this assumption is wrong in the async path since there are inflight > descriptors which are processed by the DMA device. > > This patch refactors the batch copy code and adds used ring buffer > wrap check as a batch copy condition to fix this issue. > > Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath") > Cc: stable@dpdk.org > > Signed-off-by: Cheng Jiang > --- > lib/vhost/virtio_net.c | 163 ++++++++++++++++++++++++++++++++--------- > 1 file changed, 128 insertions(+), 35 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime