6 #ifndef _RTE_KNI_COMMON_H_ 7 #define _RTE_KNI_COMMON_H_ 15 #include <asm/barrier.h> 19 #include <rte_config.h> 25 #define RTE_KNI_NAMESIZE 16 27 #define RTE_CACHE_LINE_MIN_SIZE 64 33 RTE_KNI_REQ_UNKNOWN = 0,
34 RTE_KNI_REQ_CHANGE_MTU,
35 RTE_KNI_REQ_CFG_NETWORK_IF,
36 RTE_KNI_REQ_CHANGE_MAC_ADDR,
37 RTE_KNI_REQ_CHANGE_PROMISC,
38 RTE_KNI_REQ_CHANGE_ALLMULTI,
45 struct rte_kni_request {
57 } __attribute__((__packed__));
65 #ifdef RTE_USE_C11_MEM_MODEL 69 volatile unsigned write;
70 volatile unsigned read;
74 void *
volatile buffer[];
82 void *buf_addr __attribute__((__aligned__(RTE_CACHE_LINE_SIZE)));
104 struct rte_kni_device_info {
105 char name[RTE_KNI_NAMESIZE];
126 uint8_t force_bind : 1;
131 unsigned int min_mtu;
132 unsigned int max_mtu;
137 #define KNI_DEVICE "kni" 139 #define RTE_KNI_IOCTL_TEST _IOWR(0, 1, int) 140 #define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info) 141 #define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
#define RTE_CACHE_LINE_MIN_SIZE