net/ixgbe/base: update annotations
[dpdk.git] / lib / librte_vhost / vhost.h
index 27989e8..487aedd 100644 (file)
@@ -178,10 +178,12 @@ struct vhost_msg {
                                (1ULL << VIRTIO_NET_F_GSO) | \
                                (1ULL << VIRTIO_NET_F_HOST_TSO4) | \
                                (1ULL << VIRTIO_NET_F_HOST_TSO6) | \
+                               (1ULL << VIRTIO_NET_F_HOST_UFO) | \
                                (1ULL << VIRTIO_NET_F_CSUM)    | \
                                (1ULL << VIRTIO_NET_F_GUEST_CSUM) | \
                                (1ULL << VIRTIO_NET_F_GUEST_TSO4) | \
                                (1ULL << VIRTIO_NET_F_GUEST_TSO6) | \
+                               (1ULL << VIRTIO_NET_F_GUEST_UFO) | \
                                (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \
                                (1ULL << VIRTIO_NET_F_MTU) | \
                                (1ULL << VIRTIO_F_IOMMU_PLATFORM))
@@ -336,6 +338,9 @@ void cleanup_device(struct virtio_net *dev, int destroy);
 void reset_device(struct virtio_net *dev);
 void vhost_destroy_device(int);
 
+void cleanup_vq(struct vhost_virtqueue *vq, int destroy);
+void free_vq(struct vhost_virtqueue *vq);
+
 int alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx);
 
 void vhost_set_ifname(int, const char *if_name, unsigned int if_len);
@@ -365,4 +370,16 @@ vhost_iova_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
        return __vhost_iova_to_vva(dev, vq, iova, size, perm);
 }
 
+static __rte_always_inline void
+vhost_vring_call(struct vhost_virtqueue *vq)
+{
+       /* Flush used->idx update before we read avail->flags. */
+       rte_mb();
+
+       /* Kick the guest if necessary. */
+       if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT)
+                       && (vq->callfd >= 0))
+               eventfd_write(vq->callfd, (eventfd_t)1);
+}
+
 #endif /* _VHOST_NET_CDEV_H_ */