[PATCH v3 1/4] kni: add define guards to avoid multi-inclusion
Weiguo Li
liwg06 at foxmail.com
Wed Feb 9 08:24:05 CET 2022
Supplement define guards to prevent multiple inclusion.
Signed-off-by: Weiguo Li <liwg06 at foxmail.com>
---
lib/kni/rte_kni_fifo.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/kni/rte_kni_fifo.h b/lib/kni/rte_kni_fifo.h
index d2ec82fe87..2ff71554c0 100644
--- a/lib/kni/rte_kni_fifo.h
+++ b/lib/kni/rte_kni_fifo.h
@@ -2,7 +2,8 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
-
+#ifndef RTE_KNI_FIFO_H
+#define RTE_KNI_FIFO_H
/**
* @internal when c11 memory model enabled use c11 atomic memory barrier.
@@ -115,3 +116,5 @@ kni_fifo_free_count(struct rte_kni_fifo *fifo)
uint32_t fifo_read = __KNI_LOAD_ACQUIRE(&fifo->read);
return (fifo_read - fifo_write - 1) & (fifo->len - 1);
}
+
+#endif /* RTE_KNI_FIFO_H */
--
2.25.1
More information about the dev
mailing list