X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_vhost%2Fvhost-net.h;h=c69b60bfa76e726a2e7476c30421503e212e974e;hb=756ce64b1ecdf107acfa45fc3f31359ca338649e;hp=86b38a5691cc064b84cc16c521a6082d0a3ff42b;hpb=9464a441601e8b2447373ce0dfcc31cc4ae409a5;p=dpdk.git diff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h index 86b38a5691..c69b60bfa7 100644 --- a/lib/librte_vhost/vhost-net.h +++ b/lib/librte_vhost/vhost-net.h @@ -41,7 +41,9 @@ #include -#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 *);