examples/vhost: refactor vhost data path
[dpdk.git] / examples / vhost / ioat.h
index 9664fcc..0a1dbb8 100644 (file)
@@ -11,7 +11,7 @@
 
 #define MAX_VHOST_DEVICE 1024
 #define IOAT_RING_SIZE 4096
-#define MAX_ENQUEUED_SIZE 256
+#define MAX_ENQUEUED_SIZE 512
 
 struct dma_info {
        struct rte_pci_addr addr;
@@ -24,14 +24,8 @@ struct dma_for_vhost {
        uint16_t nr;
 };
 
-#ifdef RTE_ARCH_X86
+#ifdef RTE_RAW_IOAT
 int open_ioat(const char *value);
-#else
-static int open_ioat(const char *value __rte_unused)
-{
-       return -1;
-}
-#endif
 
 uint32_t
 ioat_transfer_data_cb(int vid, uint16_t queue_id,
@@ -42,4 +36,28 @@ uint32_t
 ioat_check_completed_copies_cb(int vid, uint16_t queue_id,
                struct rte_vhost_async_status *opaque_data,
                uint16_t max_packets);
+#else
+static int open_ioat(const char *value __rte_unused)
+{
+       return -1;
+}
+
+static uint32_t
+ioat_transfer_data_cb(int vid __rte_unused, uint16_t queue_id __rte_unused,
+               struct rte_vhost_async_desc *descs __rte_unused,
+               struct rte_vhost_async_status *opaque_data __rte_unused,
+               uint16_t count __rte_unused)
+{
+       return -1;
+}
+
+static uint32_t
+ioat_check_completed_copies_cb(int vid __rte_unused,
+               uint16_t queue_id __rte_unused,
+               struct rte_vhost_async_status *opaque_data __rte_unused,
+               uint16_t max_packets __rte_unused)
+{
+       return -1;
+}
+#endif
 #endif /* _IOAT_H_ */