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 B32A5A49F for ; Mon, 12 Feb 2018 14:16:32 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0191F4084FE8; Mon, 12 Feb 2018 13:16:32 +0000 (UTC) Received: from [10.72.12.48] (ovpn-12-48.pek2.redhat.com [10.72.12.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B42FB2024CA1; Mon, 12 Feb 2018 13:16:29 +0000 (UTC) To: Jens Freimann , dev@dpdk.org Cc: tiwei.bie@intel.com, yliu@fridaylinux.org, maxime.coquelin@redhat.com, mst@redhat.com References: <20180129141143.13437-1-jfreimann@redhat.com> <20180129141143.13437-8-jfreimann@redhat.com> From: Jason Wang Message-ID: Date: Mon, 12 Feb 2018 21:16:27 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180129141143.13437-8-jfreimann@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 12 Feb 2018 13:16:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 12 Feb 2018 13:16:32 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jasowang@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: Mon, 12 Feb 2018 13:16:32 -0000 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