From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 3B4922C07 for ; Tue, 23 Aug 2016 14:27:35 +0200 (CEST) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F02D4A54A; Tue, 23 Aug 2016 12:27:34 +0000 (UTC) Received: from [10.36.4.245] (vpn1-4-245.ams2.redhat.com [10.36.4.245]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7NCRWE3022288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Aug 2016 08:27:33 -0400 To: Yuanhan Liu , dev@dpdk.org References: <1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com> <1471939839-29778-4-git-send-email-yuanhan.liu@linux.intel.com> From: Maxime Coquelin Message-ID: <584acf6f-b57b-1644-207f-02e696778000@redhat.com> Date: Tue, 23 Aug 2016 14:27:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1471939839-29778-4-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 23 Aug 2016 12:27:34 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 3/6] vhost: introduce last avail idx for Tx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 12:27:35 -0000 On 08/23/2016 10:10 AM, Yuanhan Liu wrote: > So far, we retrieve both the used ring avail ring idx by last_used_idx > var; it won't be a problem because we used ring is updated immediately > after those avail entries are consumed. > > But that's not true when Tx zero copy is enabled, that used ring is updated > only when the mbuf is consumed. Thus, we need use another var to note > the last avail ring idx we have consumed. > > Therefore, last_avail_idx is introduced. > > Signed-off-by: Yuanhan Liu > --- > lib/librte_vhost/vhost.h | 2 +- > lib/librte_vhost/virtio_net.c | 19 +++++++++++-------- > 2 files changed, 12 insertions(+), 9 deletions(-) Looks good to me: Reviewed-by: Maxime Coquelin Thanks, Maxime