X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_vhost%2Fvhost-net-cdev.h;h=03a5c575891dc5151d63cdd603c027929562d333;hb=be646317d7f0ab317162006230efc956a69b0682;hp=6885bbf682bd2e09241f9b82c23e4ef832f70c87;hpb=1c01d52392d52b9155977dd83c878aa2f86afb9b;p=dpdk.git diff --git a/lib/librte_vhost/vhost-net-cdev.h b/lib/librte_vhost/vhost-net-cdev.h index 6885bbf682..03a5c57589 100644 --- a/lib/librte_vhost/vhost-net-cdev.h +++ b/lib/librte_vhost/vhost-net-cdev.h @@ -33,13 +33,14 @@ #ifndef _VHOST_NET_CDEV_H_ #define _VHOST_NET_CDEV_H_ - +#include +#include +#include +#include #include -struct vhost_memory; -struct vhost_vring_state; -struct vhost_vring_addr; -struct vhost_vring_file; +#include + /* Macros for printing using RTE_LOG */ #define RTE_LOGTYPE_VHOST_CONFIG RTE_LOGTYPE_USER1 #define RTE_LOGTYPE_VHOST_DATA RTE_LOGTYPE_USER1 @@ -75,10 +76,9 @@ struct vhost_vring_file; /* * Structure used to identify device context. */ -struct vhost_device_ctx -{ +struct vhost_device_ctx { pid_t pid; /* PID of process calling the IOCTL. */ - uint64_t fh; /* Populated with fi->fh to track the device index. */ + uint64_t fh; /* Populated with fi->fh to track the device index. */ }; /* @@ -86,26 +86,26 @@ struct vhost_device_ctx * functions are called in CUSE context and are used to configure devices. */ struct vhost_net_device_ops { - int (* new_device) (struct vhost_device_ctx); - void (* destroy_device) (struct vhost_device_ctx); + int (*new_device)(struct vhost_device_ctx); + void (*destroy_device)(struct vhost_device_ctx); - int (* get_features) (struct vhost_device_ctx, uint64_t *); - int (* set_features) (struct vhost_device_ctx, uint64_t *); + 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_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 *); - int (* get_vring_base) (struct vhost_device_ctx, uint32_t, struct vhost_vring_state *); + 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 *); + int (*get_vring_base)(struct vhost_device_ctx, uint32_t, struct vhost_vring_state *); - int (* set_vring_kick) (struct vhost_device_ctx, struct vhost_vring_file *); - int (* set_vring_call) (struct vhost_device_ctx, struct vhost_vring_file *); + int (*set_vring_kick)(struct vhost_device_ctx, struct vhost_vring_file *); + int (*set_vring_call)(struct vhost_device_ctx, struct vhost_vring_file *); - int (* set_backend) (struct vhost_device_ctx, struct vhost_vring_file *); + int (*set_backend)(struct vhost_device_ctx, struct vhost_vring_file *); - int (* set_owner) (struct vhost_device_ctx); - int (* reset_owner) (struct vhost_device_ctx); + int (*set_owner)(struct vhost_device_ctx); + int (*reset_owner)(struct vhost_device_ctx); };