[dpdk-dev] [PATCH 07/14] net/virtio: implement transmit path for packed queues
Jason Wang
jasowang at redhat.com
Mon Feb 12 14:16:27 CET 2018
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
More information about the dev
mailing list