net/i40e/base: fix PF reset
[dpdk.git] / examples / vhost / ioat.c
index efdd3f6..457f817 100644 (file)
@@ -113,7 +113,7 @@ open_ioat(const char *value)
                        goto out;
                }
                rte_rawdev_start(dev_id);
-               cb_tracker[dev_id].ioat_space = IOAT_RING_SIZE;
+               cb_tracker[dev_id].ioat_space = IOAT_RING_SIZE - 1;
                dma_info->nr++;
                i++;
        }
@@ -122,7 +122,7 @@ out:
        return ret;
 }
 
-uint32_t
+int32_t
 ioat_transfer_data_cb(int vid, uint16_t queue_id,
                struct rte_vhost_async_desc *descs,
                struct rte_vhost_async_status *opaque_data, uint16_t count)
@@ -168,7 +168,7 @@ ioat_transfer_data_cb(int vid, uint16_t queue_id,
        return i_desc;
 }
 
-uint32_t
+int32_t
 ioat_check_completed_copies_cb(int vid, uint16_t queue_id,
                struct rte_vhost_async_status *opaque_data,
                uint16_t max_packets)