git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crypto/cnxk: prevent out-of-bound access in capabilities
[dpdk.git]
/
examples
/
vhost
/
main.h
diff --git
a/examples/vhost/main.h
b/examples/vhost/main.h
index
7cba0ed
..
b4a453e
100644
(file)
--- a/
examples/vhost/main.h
+++ b/
examples/vhost/main.h
@@
-8,6
+8,7
@@
#include <sys/queue.h>
#include <rte_ether.h>
#include <sys/queue.h>
#include <rte_ether.h>
+#include <rte_pci.h>
/* Macros for printing using RTE_LOG */
#define RTE_LOGTYPE_VHOST_CONFIG RTE_LOGTYPE_USER1
/* Macros for printing using RTE_LOG */
#define RTE_LOGTYPE_VHOST_CONFIG RTE_LOGTYPE_USER1
@@
-21,8
+22,8
@@
enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
struct device_statistics {
uint64_t tx;
uint64_t tx_total;
struct device_statistics {
uint64_t tx;
uint64_t tx_total;
-
rte_atomic64_t
rx_atomic;
-
rte_atomic64_t
rx_total_atomic;
+
uint64_t
rx_atomic;
+
uint64_t
rx_total_atomic;
};
struct vhost_queue {
};
struct vhost_queue {
@@
-51,6
+52,7
@@
struct vhost_dev {
uint64_t features;
size_t hdr_len;
uint16_t nr_vrings;
uint64_t features;
size_t hdr_len;
uint16_t nr_vrings;
+ uint16_t pkts_inflight;
struct rte_vhost_memory *mem;
struct device_statistics stats;
TAILQ_ENTRY(vhost_dev) global_vdev_entry;
struct rte_vhost_memory *mem;
struct device_statistics stats;
TAILQ_ENTRY(vhost_dev) global_vdev_entry;
@@
-78,6
+80,16
@@
struct lcore_info {
struct vhost_dev_tailq_list vdev_list;
};
struct vhost_dev_tailq_list vdev_list;
};
+struct dma_info {
+ struct rte_pci_addr addr;
+ int16_t dev_id;
+ bool async_enabled;
+};
+
+struct dma_for_vhost {
+ struct dma_info dmas[RTE_MAX_QUEUES_PER_PORT * 2];
+};
+
/* we implement non-extra virtio net features */
#define VIRTIO_NET_FEATURES 0
/* we implement non-extra virtio net features */
#define VIRTIO_NET_FEATURES 0