eal: introduce PCI ioport API
[dpdk.git] / lib / librte_vhost / vhost-net.h
index 86b38a5..c69b60b 100644 (file)
@@ -41,7 +41,9 @@
 
 #include <rte_log.h>
 
-#define VHOST_MEMORY_MAX_NREGIONS 8
+#include "rte_virtio_net.h"
+
+extern struct vhost_net_device_ops const *ops;
 
 /* Macros for printing using RTE_LOG */
 #define RTE_LOGTYPE_VHOST_CONFIG RTE_LOGTYPE_USER1
@@ -57,9 +59,9 @@
        char packet[VHOST_MAX_PRINT_BUFF]; \
        \
        if ((header)) \
-               snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%"PRIu64") Header size %d: ", (device->device_fh), (size)); \
+               snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%" PRIu64 ") Header size %d: ", (device->device_fh), (size)); \
        else \
-               snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%"PRIu64") Packet size %d: ", (device->device_fh), (size)); \
+               snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%" PRIu64 ") Packet size %d: ", (device->device_fh), (size)); \
        for (index = 0; index < (size); index++) { \
                snprintf(packet + strnlen(packet, VHOST_MAX_PRINT_BUFF), VHOST_MAX_PRINT_BUFF - strnlen(packet, VHOST_MAX_PRINT_BUFF), \
                        "%02hhx ", pkt_addr[index]); \
@@ -91,6 +93,9 @@ struct vhost_net_device_ops {
        int (*new_device)(struct vhost_device_ctx);
        void (*destroy_device)(struct vhost_device_ctx);
 
+       void (*set_ifname)(struct vhost_device_ctx,
+               const char *if_name, unsigned int if_len);
+
        int (*get_features)(struct vhost_device_ctx, uint64_t *);
        int (*set_features)(struct vhost_device_ctx, uint64_t *);