Previous vhost implementation wrongly name kickfd as callfd and callfd as kickfd.
It is functional correct, but causes confusion.
Exchange kickfd and callfd to avoid confusion.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
 
        /* 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);
 }
 
 /*
 
        /* 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 0;
 }
 
        /* 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;
 }
 
        uint16_t                vhost_hlen;             /**< Vhost header length (varies depending on RX merge buffers. */
        volatile uint16_t       last_used_idx;          /**< Last index used on the available ring */
        volatile uint16_t       last_used_idx_res;      /**< Used for multiple devices reserving buffers. */
-       eventfd_t               callfd;                 /**< Currently unused as polling mode is enabled. */
-       eventfd_t               kickfd;                 /**< Used to notify the guest (trigger interrupt). */
+       eventfd_t               callfd;                 /**< Used to notify the guest (trigger interrupt). */
+       eventfd_t               kickfd;                 /**< Currently unused as polling mode is enabled. */
        struct buf_vector       buf_vec[BUF_VECTOR_MAX];        /**< for scatter RX. */
 } __rte_cache_aligned;
 
 
 
        /* 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;
 }
 
 
                /* 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;
        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;
 }
 
         * sent and only sent in vhost_vring_stop.
         * TODO: cleanup the vring, it isn't usable since here.
         */
-       if (((int)dev->virtqueue[VIRTIO_RXQ]->callfd) >= 0) {
-               close(dev->virtqueue[VIRTIO_RXQ]->callfd);
-               dev->virtqueue[VIRTIO_RXQ]->callfd = (eventfd_t)-1;
+       if (((int)dev->virtqueue[VIRTIO_RXQ]->kickfd) >= 0) {
+               close(dev->virtqueue[VIRTIO_RXQ]->kickfd);
+               dev->virtqueue[VIRTIO_RXQ]->kickfd = (eventfd_t)-1;
        }
-       if (((int)dev->virtqueue[VIRTIO_TXQ]->callfd) >= 0) {
-               close(dev->virtqueue[VIRTIO_TXQ]->callfd);
-               dev->virtqueue[VIRTIO_TXQ]->callfd = (eventfd_t)-1;
+       if (((int)dev->virtqueue[VIRTIO_TXQ]->kickfd) >= 0) {
+               close(dev->virtqueue[VIRTIO_TXQ]->kickfd);
+               dev->virtqueue[VIRTIO_TXQ]->kickfd = (eventfd_t)-1;
        }
 
        return 0;
 
        /* file->index refers to the queue index. The txq is 1, rxq is 0. */
        vq = dev->virtqueue[file->index];
 
-       if ((int)vq->kickfd >= 0)
-               close((int)vq->kickfd);
+       if ((int)vq->callfd >= 0)
+               close((int)vq->callfd);
 
-       vq->kickfd = file->fd;
+       vq->callfd = file->fd;
 
        return 0;
 }
        /* file->index refers to the queue index. The txq is 1, rxq is 0. */
        vq = dev->virtqueue[file->index];
 
-       if ((int)vq->callfd >= 0)
-               close((int)vq->callfd);
+       if ((int)vq->kickfd >= 0)
+               close((int)vq->kickfd);
 
-       vq->callfd = file->fd;
+       vq->kickfd = file->fd;
 
        return 0;
 }