MCPcopy Create free account
hub / github.com/F-Stack/f-stack / virtqueue_refill_single_packed

Function virtqueue_refill_single_packed

dpdk/drivers/net/virtio/virtio_rxtx.c:322–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322static inline void
323virtqueue_refill_single_packed(struct virtqueue *vq,
324 struct vring_packed_desc *dp,
325 struct rte_mbuf *cookie)
326{
327 uint16_t flags = vq->vq_packed.cached_flags;
328 struct virtio_hw *hw = vq->hw;
329
330 dp->addr = VIRTIO_MBUF_ADDR(cookie, vq) + RTE_PKTMBUF_HEADROOM - hw->vtnet_hdr_size;
331 dp->len = cookie->buf_len - RTE_PKTMBUF_HEADROOM + hw->vtnet_hdr_size;
332
333 virtqueue_store_flags_packed(dp, flags, hw->weak_barriers);
334
335 if (++vq->vq_avail_idx >= vq->vq_nentries) {
336 vq->vq_avail_idx -= vq->vq_nentries;
337 vq->vq_packed.cached_flags ^=
338 VRING_PACKED_DESC_F_AVAIL_USED;
339 flags = vq->vq_packed.cached_flags;
340 }
341}
342
343static inline int
344virtqueue_enqueue_recv_refill_packed_init(struct virtqueue *vq,

Calls 1

Tested by

no test coverage detected