From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Wang Subject: Re: [PATCH 07/14] net/virtio: implement transmit path for packed queues Date: Mon, 12 Feb 2018 21:16:27 +0800 Message-ID: References: <20180129141143.13437-1-jfreimann@redhat.com> <20180129141143.13437-8-jfreimann@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: tiwei.bie@intel.com, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com To: Jens Freimann , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id B32A5A49F for ; Mon, 12 Feb 2018 14:16:32 +0100 (CET) In-Reply-To: <20180129141143.13437-8-jfreimann@redhat.com> Content-Language: en-US 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 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." (Looking at the device implementation, it was in fact an in order device which is said to be no in the cover). Thanks