kni: allow configuring thread granularity
[dpdk.git] / kernel / linux / kni / kni_fifo.h
index 2cb3a4a..1ba5172 100644 (file)
@@ -6,7 +6,15 @@
 #ifndef _KNI_FIFO_H_
 #define _KNI_FIFO_H_
 
-#include <exec-env/rte_kni_common.h>
+#include <rte_kni_common.h>
+
+/* Skip some memory barriers on Linux < 3.14 */
+#ifndef smp_load_acquire
+#define smp_load_acquire(a) (*(a))
+#endif
+#ifndef smp_store_release
+#define smp_store_release(a, b) *(a) = (b)
+#endif
 
 /**
  * Adds num elements into the fifo. Return the number actually written
@@ -33,7 +41,7 @@ kni_fifo_put(struct rte_kni_fifo *fifo, void **data, uint32_t num)
 }
 
 /**
- * Get up to num elements from the fifo. Return the number actully read
+ * Get up to num elements from the FIFO. Return the number actually read
  */
 static inline uint32_t
 kni_fifo_get(struct rte_kni_fifo *fifo, void **data, uint32_t num)