| 320 | } |
| 321 | |
| 322 | static inline void |
| 323 | virtqueue_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 | |
| 343 | static inline int |
| 344 | virtqueue_enqueue_recv_refill_packed_init(struct virtqueue *vq, |
no test coverage detected