6 #ifndef _RTE_KNI_COMMON_H_ 7 #define _RTE_KNI_COMMON_H_ 11 #include <asm/barrier.h> 15 #include <rte_config.h> 21 #define RTE_KNI_NAMESIZE 16 23 #define RTE_CACHE_LINE_MIN_SIZE 64 29 RTE_KNI_REQ_UNKNOWN = 0,
30 RTE_KNI_REQ_CHANGE_MTU,
31 RTE_KNI_REQ_CFG_NETWORK_IF,
32 RTE_KNI_REQ_CHANGE_MAC_ADDR,
33 RTE_KNI_REQ_CHANGE_PROMISC,
34 RTE_KNI_REQ_CHANGE_ALLMULTI,
41 struct rte_kni_request {
53 } __attribute__((__packed__));
61 #ifdef RTE_USE_C11_MEM_MODEL 65 volatile unsigned write;
66 volatile unsigned read;
70 void *
volatile buffer[];
78 void *buf_addr __attribute__((__aligned__(RTE_CACHE_LINE_SIZE)));
100 struct rte_kni_device_info {
101 char name[RTE_KNI_NAMESIZE];
122 uint8_t force_bind : 1;
127 unsigned int min_mtu;
128 unsigned int max_mtu;
133 #define KNI_DEVICE "kni" 135 #define RTE_KNI_IOCTL_TEST _IOWR(0, 1, int) 136 #define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info) 137 #define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
#define RTE_CACHE_LINE_MIN_SIZE