On 10/24/18 4:32 PM, Jens Freimann wrote:
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index eb891433e..837457243 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -88,6 +88,42 @@ vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx)
        dp->next = VQ_RING_DESC_CHAIN_END;
  }
+void
+vq_ring_free_chain_packed(struct virtqueue *vq, uint16_t desc_idx, used_idx)
+{
+       struct vring_desc_packed *dp;
+       struct vq_desc_extra *dxp = NULL, *dxp_tail = NULL;
+       uint16_t desc_idx_last = desc_idx;
+       int i = 0;
+
+       dp  = &vq->vq_ring.desc_packed[used_idx];
+       dxp = &vq->vq_descx[desc_idx];
+       vq->vq_free_cnt = (uint16_t)(vq->vq_free_cnt + dxp->ndescs);
+       if ((dp->flags & VRING_DESC_F_INDIRECT) == 0) {
+               while (dp->flags & VRING_DESC_F_NEXT && i < dxp->ndescs) {
+                       desc_idx_last = dxp->next;
+                       dp = &vq->vq_ring.desc_packed[dxp->next];
+                       dxp = &vq->vq_descx[dxp->next];
+                       i++;
+               }
+       }

Haven't you missed to squash some changes you did?
It seems you made some changes on your github branch to take Tiwei's
comment on v8 into account, but it is not here (i.e. you can't use
VRING_DESC_F_NEXT here).

Reply via email to