vhost: fix file descriptors naming
[dpdk.git] / lib / librte_vhost / vhost_rxtx.c
index 84ec0e8..535c7a1 100644 (file)
 #include <rte_memcpy.h>
 #include <rte_virtio_net.h>
 
-#include "vhost-net-cdev.h"
+#include "vhost-net.h"
 
 #define MAX_PKT_BURST 32
 
 /**
  * This function adds buffers to the virtio devices RX virtqueue. Buffers can
  * be received from the physical port or from another virtio device. A packet
- * count is returned to indicate the number of packets that were succesfully
+ * count is returned to indicate the number of packets that are succesfully
  * added to the RX queue. This function works when mergeable is disabled.
  */
 static inline uint32_t __attribute__((always_inline))
@@ -76,7 +76,7 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,
        count = (count > MAX_PKT_BURST) ? MAX_PKT_BURST : count;
 
        /*
-        * As many data cores may want access to available buffers, 
+        * As many data cores may want access to available buffers,
         * they need to be reserved.
         */
        do {
@@ -143,7 +143,8 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,
                }
 
                /* Update used ring with desc information */
-               vq->used->ring[res_cur_idx & (vq->size - 1)].id = head[packet_success];
+               vq->used->ring[res_cur_idx & (vq->size - 1)].id =
+                                                       head[packet_success];
                vq->used->ring[res_cur_idx & (vq->size - 1)].len = packet_len;
 
                /* Copy mbuf data to buffer */
@@ -179,7 +180,7 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,
 
        /* Kick the guest if necessary. */
        if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT))
-               eventfd_write((int)vq->kickfd, 1);
+               eventfd_write((int)vq->callfd, 1);
        return count;
 }
 
@@ -389,10 +390,7 @@ copy_from_mbuf_to_vring(struct virtio_net *dev, uint16_t res_base_idx,
 }
 
 /*
- * This function adds buffers to the virtio devices RX virtqueue. Buffers can
- * be received from the physical port or from another virtio device. A packet
- * count is returned to indicate the number of packets that were succesfully
- * added to the RX queue. This function works for mergeable RX.
+ * This function works for mergeable RX.
  */
 static inline uint32_t __attribute__((always_inline))
 virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,
@@ -509,7 +507,7 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,
 
                /* Kick the guest if necessary. */
                if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT))
-                       eventfd_write((int)vq->kickfd, 1);
+                       eventfd_write((int)vq->callfd, 1);
        }
 
        return count;
@@ -727,7 +725,6 @@ rte_vhost_dequeue_burst(struct virtio_net *dev, uint16_t queue_id,
        vq->used->idx += entry_success;
        /* Kick guest if required. */
        if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT))
-               eventfd_write((int)vq->kickfd, 1);
+               eventfd_write((int)vq->callfd, 1);
        return entry_success;
-
 }