summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/dpdk.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk/device/dpdk.h')
-rw-r--r--src/plugins/dpdk/device/dpdk.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index c81f23d769c..504bac5b6ee 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -32,6 +32,7 @@
#include <rte_per_lcore.h>
#include <rte_interrupts.h>
#include <rte_pci.h>
+#include <rte_bus_vmbus.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_ring.h>
@@ -52,6 +53,7 @@
#endif
#include <vlib/pci/pci.h>
+#include <vlib/vmbus/vmbus.h>
#include <vnet/flow/flow.h>
extern vnet_device_class_t dpdk_device_class;
@@ -250,9 +252,21 @@ typedef struct
_ (num_tx_desc) \
_ (rss_fn)
+typedef enum
+{
+ VNET_DEV_ADDR_PCI,
+ VNET_DEV_ADDR_VMBUS,
+ VNET_DEV_ADDR_ANY,
+} dpdk_device_addr_type_t;
+
typedef struct
{
- vlib_pci_addr_t pci_addr;
+ union
+ {
+ vlib_pci_addr_t pci_addr;
+ vlib_vmbus_addr_t vmbus_addr;
+ };
+ dpdk_device_addr_type_t dev_addr_type;
u8 *name;
u8 is_blacklisted;
u8 vlan_strip_offload;
@@ -302,9 +316,12 @@ typedef struct
dpdk_device_config_t default_devconf;
dpdk_device_config_t *dev_confs;
uword *device_config_index_by_pci_addr;
+ uword *device_config_index_by_vmbus_addr;
/* devices blacklist by pci vendor_id, device_id */
u32 *blacklist_by_pci_vendor_and_device;
+ /* devices blacklist by VMBUS address */
+ u32 *blacklist_by_vmbus_addr;
} dpdk_config_main_t;
@@ -459,6 +476,8 @@ clib_error_t *unformat_rss_fn (unformat_input_t * input, uword * rss_fn);
struct rte_pci_device *dpdk_get_pci_device (const struct rte_eth_dev_info
*info);
+struct rte_vmbus_device *
+dpdk_get_vmbus_device (const struct rte_eth_dev_info *info);
void dpdk_cli_reference (void);
#if CLI_DEBUG