+static inline uint16_t __attribute__((always_inline))
+virtqueue_dequeue_pkt_tx(struct virtqueue *vq)
+{
+ struct vring_used_elem *uep;
+ uint16_t used_idx, desc_idx;
+
+ used_idx = (uint16_t)(vq->vq_used_cons_idx & (vq->vq_nentries - 1));
+ uep = &vq->vq_ring.used->ring[used_idx];
+ desc_idx = (uint16_t) uep->id;
+ vq->vq_used_cons_idx++;
+ vq_ring_free_chain(vq, desc_idx);
+
+ return 0;
+}
+