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 {
52 } __attribute__((__packed__));
60 #ifdef RTE_USE_C11_MEM_MODEL
64 volatile unsigned write;
65 volatile unsigned read;
69 void *
volatile buffer[];
77 void *buf_addr __attribute__((__aligned__(RTE_CACHE_LINE_SIZE)));
99 struct rte_kni_device_info {
100 char name[RTE_KNI_NAMESIZE];
121 uint8_t force_bind : 1;
126 unsigned int min_mtu;
127 unsigned int max_mtu;
132 #define KNI_DEVICE "kni"
134 #define RTE_KNI_IOCTL_TEST _IOWR(0, 1, int)
135 #define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info)
136 #define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
#define RTE_CACHE_LINE_MIN_SIZE