examples/vhost: add async vhost args parsing
[dpdk.git] / examples / vhost / ioat.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2020 Intel Corporation
3  */
4
5 #ifndef _IOAT_H_
6 #define _IOAT_H_
7
8 #include <rte_vhost.h>
9 #include <rte_pci.h>
10
11 #define MAX_VHOST_DEVICE 1024
12 #define IOAT_RING_SIZE 4096
13
14 struct dma_info {
15         struct rte_pci_addr addr;
16         uint16_t dev_id;
17         bool is_valid;
18 };
19
20 struct dma_for_vhost {
21         struct dma_info dmas[RTE_MAX_QUEUES_PER_PORT * 2];
22         uint16_t nr;
23 };
24
25 #ifdef RTE_ARCH_X86
26 int open_ioat(const char *value);
27 #else
28 static int open_ioat(const char *value __rte_unused)
29 {
30         return -1;
31 }
32 #endif
33 #endif /* _IOAT_H_ */