From: Maxime Coquelin Subject: Re: [PATCH 3/6] vhost: introduce last avail idx for Tx Date: Tue, 23 Aug 2016 14:27:32 +0200 Message-ID: <584acf6f-b57b-1644-207f-02e696778000@redhat.com> References: <1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com> <1471939839-29778-4-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit To: Yuanhan Liu , dev@dpdk.org 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) In-Reply-To: <1471939839-29778-4-git-send-email-yuanhan.liu@linux.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" 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