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 E5FC91BE3F for ; Tue, 3 Jul 2018 07:53:02 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D538406E81E; Tue, 3 Jul 2018 05:53:02 +0000 (UTC) Received: from [10.36.112.21] (ovpn-112-21.ams2.redhat.com [10.36.112.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD9871C5A1; Tue, 3 Jul 2018 05:53:01 +0000 (UTC) To: Tiwei Bie Cc: zhihong.wang@intel.com, dev@dpdk.org References: <20180627144959.17277-1-maxime.coquelin@redhat.com> <20180627144959.17277-2-maxime.coquelin@redhat.com> <20180703032819.GA3041@debian> From: Maxime Coquelin Message-ID: <97401ff2-6f66-6802-105c-104d1595305c@redhat.com> Date: Tue, 3 Jul 2018 07:53:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180703032819.GA3041@debian> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 03 Jul 2018 05:53:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 03 Jul 2018 05:53:02 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH v3 1/7] vhost: use shadow used ring in dequeue path 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: Tue, 03 Jul 2018 05:53:03 -0000 On 07/03/2018 05:28 AM, Tiwei Bie wrote: > On Wed, Jun 27, 2018 at 04:49:53PM +0200, Maxime Coquelin wrote: > [...] >> @@ -1164,8 +1136,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, >> >> if (mbuf_is_consumed(zmbuf->mbuf)) { >> used_idx = vq->last_used_idx++ & (vq->size - 1); > > Above line and other `used_idx` related code in > this function should be removed too. Yes, of course. > > Apart from that, > Reviewed-by: Tiwei Bie Thanks! Maxime > Thanks! > >> - update_used_ring(dev, vq, used_idx, >> - zmbuf->desc_idx); >> + update_shadow_used_ring(vq, zmbuf->desc_idx, 0); >> nr_updated += 1; >> >> TAILQ_REMOVE(&vq->zmbuf_list, zmbuf, next); > [...] >