kni: fix kernel FIFO synchronization
[dpdk.git] / lib / librte_eal / linuxapp / eal / include / exec-env / rte_kni_common.h
index 9e7b5ea..58e8533 100644 (file)
@@ -8,9 +8,11 @@
 
 #ifdef __KERNEL__
 #include <linux/if.h>
+#include <asm/barrier.h>
 #define RTE_STD_C11
 #else
 #include <rte_common.h>
+#include <rte_config.h>
 #endif
 
 /**
@@ -27,6 +29,8 @@ enum rte_kni_req_id {
        RTE_KNI_REQ_UNKNOWN = 0,
        RTE_KNI_REQ_CHANGE_MTU,
        RTE_KNI_REQ_CFG_NETWORK_IF,
+       RTE_KNI_REQ_CHANGE_MAC_ADDR,
+       RTE_KNI_REQ_CHANGE_PROMISC,
        RTE_KNI_REQ_MAX,
 };
 
@@ -39,6 +43,8 @@ struct rte_kni_request {
        union {
                uint32_t new_mtu;    /**< New MTU */
                uint8_t if_up;       /**< 1: interface up, 0: interface down */
+               uint8_t mac_addr[6]; /**< MAC address for interface */
+               uint8_t promiscusity;/**< 1: promisc mode enable, 0: disable */
        };
        int32_t result;               /**< Result for processing request */
 } __attribute__((__packed__));
@@ -115,6 +121,8 @@ struct rte_kni_device_info {
 
        /* mbuf size */
        unsigned mbuf_size;
+       unsigned int mtu;
+       char mac_addr[6];
 };
 
 #define KNI_DEVICE "kni"