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 475084C91 for ; Wed, 12 Sep 2018 11:49:29 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C3E2140250FF; Wed, 12 Sep 2018 09:49:28 +0000 (UTC) Received: from localhost (dhcp-192-209.str.redhat.com [10.33.192.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 503262166BA2; Wed, 12 Sep 2018 09:49:26 +0000 (UTC) Date: Wed, 12 Sep 2018 11:49:25 +0200 From: Jens Freimann To: Maxime Coquelin Cc: dev@dpdk.org, tiwei.bie@intel.com Message-ID: <20180912094925.3l3pk6d7ghpkv3xf@jenstp.localdomain> References: <20180906181947.20646-1-jfreimann@redhat.com> <20180906181947.20646-5-jfreimann@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 12 Sep 2018 09:49:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 12 Sep 2018 09:49:28 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jfreimann@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH v5 04/11] net/virtio: flush packed receive virtqueues 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: Wed, 12 Sep 2018 09:49:29 -0000 On Wed, Sep 12, 2018 at 11:12:50AM +0200, Maxime Coquelin wrote: >On 09/06/2018 08:19 PM, Jens Freimann wrote: [...] >>+ if (vtpci_packed_queue(vq->hw)) { >>+ i = vq->vq_used_cons_idx; >>+ while (desc_is_used(&descs[i], &vq->vq_ring) && >>+ i < vq->vq_nentries) { >It may be preferable to ensure 'i' is within the ring size before using >it in desc_is_used(). And raise (at least) an error message if it isn't. Yes, I'll fix this. Thanks! regards, Jens