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 8D15B11D4 for ; Tue, 13 Feb 2018 10:10:20 +0100 (CET) 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 283278182D38; Tue, 13 Feb 2018 09:10:20 +0000 (UTC) Received: from localhost (dhcp-192-241.str.redhat.com [10.33.192.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBDB22166BB3; Tue, 13 Feb 2018 09:10:19 +0000 (UTC) Date: Tue, 13 Feb 2018 10:10:18 +0100 From: Jens Freimann To: Jason Wang Cc: dev@dpdk.org, tiwei.bie@intel.com, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com Message-ID: <20180213091018.ygsbkg5weguumhpm@dhcp-192-241.str.redhat.com> References: <20180129141143.13437-1-jfreimann@redhat.com> <20180129141143.13437-8-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/20171215 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.8]); Tue, 13 Feb 2018 09:10:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 13 Feb 2018 09:10:20 +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 07/14] net/virtio: implement transmit path for packed queues 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, 13 Feb 2018 09:10:20 -0000 On Mon, Feb 12, 2018 at 09:16:27PM +0800, Jason Wang wrote: > > >On 2018???01???29??? 22:11, Jens Freimann wrote: >>+/* Cleanup from completed transmits. */ >>+static void >>+virtio_xmit_cleanup(struct virtqueue *vq) >>+{ >>+ uint16_t idx; >>+ uint16_t size = vq->vq_nentries; >>+ struct vring_desc_1_1 *desc = vq->vq_ring.desc_1_1; >>+ >>+ idx = vq->vq_used_cons_idx & (size - 1); >>+ while (desc_is_used(&desc[idx]) && >>+ vq->vq_free_cnt < size) { >>+ while (desc[idx].flags & VRING_DESC_F_NEXT) { >>+ vq->vq_free_cnt++; >>+ idx = ++vq->vq_used_cons_idx & (size - 1); >>+ } >>+ vq->vq_free_cnt++; >>+ idx = ++vq->vq_used_cons_idx & (size - 1); >>+ } >>+} > >This looks like a violation of the spec. In 2.6.6 Next Flag: >Descriptor Chaining. It said: > >"VIRTQ_DESC_F_NEXT is reserved in used descriptors, and should be >ignored by drivers." I think you are right. I will rework this bit. > >(Looking at the device implementation, it was in fact an in order >device which is said to be no in the cover). Looking into this as well. Thanks for the review! regards, Jens