From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Freimann Subject: Re: [PATCH 07/14] net/virtio: implement transmit path for packed queues Date: Tue, 13 Feb 2018 10:10:18 +0100 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 Cc: dev@dpdk.org, tiwei.bie@intel.com, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com To: Jason Wang 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) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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