[08/16] net/tap: add define guards to avoid multi-inclusion

Message ID tencent_3536C24107F37B61A4440420E69747EC7405@qq.com (mailing list archive)
State Superseded, archived
Headers
Series [01/16] bus/dpaa: add define guards to avoid multiple inclusion |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Weiguo Li Feb. 6, 2022, 3:58 a.m. UTC
  Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 drivers/net/tap/tap_bpf_insns.h | 5 +++++
 drivers/net/tap/tap_log.h       | 5 +++++
 2 files changed, 10 insertions(+)
  

Patch

diff --git a/drivers/net/tap/tap_bpf_insns.h b/drivers/net/tap/tap_bpf_insns.h
index 1a91bbad13..d4e6bea3d7 100644
--- a/drivers/net/tap/tap_bpf_insns.h
+++ b/drivers/net/tap/tap_bpf_insns.h
@@ -2,6 +2,9 @@ 
  * Copyright 2017 Mellanox Technologies, Ltd
  */
 
+#ifndef _TAP_BPF_INSNS_H_
+#define _TAP_BPF_INSNS_H_
+
 #include <tap_bpf.h>
 
 /* bpf_insn array matching cls_q section. See tap_bpf_program.c file */
@@ -1694,3 +1697,5 @@  static struct bpf_insn l3_l4_hash_insns[] = {
 	{0xbf,    0,    7,        0, 0x00000000},
 	{0x95,    0,    0,        0, 0x00000000},
 };
+
+#endif /* _TAP_BPF_INSNS_H_ */
diff --git a/drivers/net/tap/tap_log.h b/drivers/net/tap/tap_log.h
index fa06843a4c..667d9e6ab0 100644
--- a/drivers/net/tap/tap_log.h
+++ b/drivers/net/tap/tap_log.h
@@ -3,8 +3,13 @@ 
  * Copyright 2017 Mellanox Technologies, Ltd
  */
 
+#ifndef _TAP_LOG_H_
+#define _TAP_LOG_H_
+
 extern int tap_logtype;
 
 #define TAP_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, tap_logtype, "%s(): " fmt "\n", \
 		__func__, ## args)
+
+#endif /* _TAP_LOG_H_ */