[v3,4/4] hash: add define guards to avoid multi-inclusion

Message ID tencent_AAC3B7DA089EC85C8C058FE6696904A20E06@qq.com (mailing list archive)
State New
Delegated to: David Marchand
Headers
Series add define guards to avoid multi-inclusion |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Weiguo Li Feb. 9, 2022, 7:24 a.m. UTC
  Supplement define guards to prevent multiple inclusion.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 lib/hash/rte_cmp_arm64.h | 5 +++++
 lib/hash/rte_cmp_x86.h   | 5 +++++
 2 files changed, 10 insertions(+)
  

Patch

diff --git a/lib/hash/rte_cmp_arm64.h b/lib/hash/rte_cmp_arm64.h
index e9e26f9abd..ecf0ea3e6f 100644
--- a/lib/hash/rte_cmp_arm64.h
+++ b/lib/hash/rte_cmp_arm64.h
@@ -2,6 +2,9 @@ 
  * Copyright(c) 2015 Cavium, Inc
  */
 
+#ifndef RTE_CMP_ARM64_H
+#define RTE_CMP_ARM64_H
+
 /* Functions to compare multiple of 16 byte keys (up to 128 bytes) */
 static int
 rte_hash_k16_cmp_eq(const void *key1, const void *key2,
@@ -83,3 +86,5 @@  rte_hash_k128_cmp_eq(const void *key1, const void *key2, size_t key_len)
 		rte_hash_k64_cmp_eq((const char *) key1 + 64,
 				(const char *) key2 + 64, key_len);
 }
+
+#endif /* RTE_CMP_ARM64_H */
diff --git a/lib/hash/rte_cmp_x86.h b/lib/hash/rte_cmp_x86.h
index 13a5836351..3b3b3860b1 100644
--- a/lib/hash/rte_cmp_x86.h
+++ b/lib/hash/rte_cmp_x86.h
@@ -2,6 +2,9 @@ 
  * Copyright(c) 2015 Intel Corporation
  */
 
+#ifndef RTE_CMP_X86_H
+#define RTE_CMP_X86_H
+
 #include <rte_vect.h>
 
 /* Functions to compare multiple of 16 byte keys (up to 128 bytes) */
@@ -74,3 +77,5 @@  rte_hash_k128_cmp_eq(const void *key1, const void *key2, size_t key_len)
 		rte_hash_k64_cmp_eq((const char *) key1 + 64,
 				(const char *) key2 + 64, key_len);
 }
+
+#endif /* RTE_CMP_X86_H */