X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_vhost%2Fvhost-net.h;h=c69b60bfa76e726a2e7476c30421503e212e974e;hb=66e1591687ac;hp=03a5c575891dc5151d63cdd603c027929562d333;hpb=34f4c46dc42d781f83e181ce744d79779d53c8a1;p=dpdk.git diff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h index 03a5c57589..c69b60bfa7 100644 --- a/lib/librte_vhost/vhost-net.h +++ b/lib/librte_vhost/vhost-net.h @@ -41,6 +41,10 @@ #include +#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 #define RTE_LOGTYPE_VHOST_DATA RTE_LOGTYPE_USER1 @@ -55,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]); \ @@ -89,11 +93,12 @@ 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 *); - int (*set_mem_table)(struct vhost_device_ctx, const void *, uint32_t); - int (*set_vring_num)(struct vhost_device_ctx, struct vhost_vring_state *); int (*set_vring_addr)(struct vhost_device_ctx, struct vhost_vring_addr *); int (*set_vring_base)(struct vhost_device_ctx, struct vhost_vring_state *);