DPDK patches and discussions
 help / color / mirror / Atom feed
From: Weiguo Li <liwg06@foxmail.com>
To: dev@dpdk.org
Subject: [PATCH v2 12/16] acl: add define guards to avoid multi-inclusion
Date: Wed,  9 Feb 2022 11:02:20 +0800	[thread overview]
Message-ID: <tencent_95AD083B1D8AEFB41145918D181E9EF25307@qq.com> (raw)
In-Reply-To: <cover.1644374873.git.liwg06@foxmail.com>

Supplement define guards to prevent multiple inclusion.
It should noted that there is an exceptional case:
lib/acl/acl_run_avx512_common.h is designed to be included
several times.

Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
 lib/acl/acl_run_altivec.h   | 5 +++++
 lib/acl/acl_run_avx2.h      | 5 +++++
 lib/acl/acl_run_avx512x16.h | 5 +++++
 lib/acl/acl_run_avx512x8.h  | 5 +++++
 lib/acl/acl_run_neon.h      | 5 +++++
 lib/acl/acl_run_sse.h       | 5 +++++
 6 files changed, 30 insertions(+)

diff --git a/lib/acl/acl_run_altivec.h b/lib/acl/acl_run_altivec.h
index 24a41eec17..01330566d2 100644
--- a/lib/acl/acl_run_altivec.h
+++ b/lib/acl/acl_run_altivec.h
@@ -3,6 +3,9 @@
  * Copyright (C) IBM Corporation 2016.
  */
 
+#ifndef ACL_RUN_ALTIVEC_H
+#define ACL_RUN_ALTIVEC_H
+
 #include "acl_run.h"
 #include "acl_vect.h"
 
@@ -300,3 +303,5 @@ search_altivec_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 
 	return 0;
 }
+
+#endif /* ACL_RUN_ALTIVEC_H */
diff --git a/lib/acl/acl_run_avx2.h b/lib/acl/acl_run_avx2.h
index 0b8967f22e..3713c46bb7 100644
--- a/lib/acl/acl_run_avx2.h
+++ b/lib/acl/acl_run_avx2.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#ifndef ACL_RUN_AVX2_H
+#define ACL_RUN_AVX2_H
+
 #include "acl_run_sse.h"
 
 static const rte_ymm_t ymm_match_mask = {
@@ -253,3 +256,5 @@ search_avx2x16(const struct rte_acl_ctx *ctx, const uint8_t **data,
 
 	return 0;
 }
+
+#endif /* ACL_RUN_AVX2_H */
diff --git a/lib/acl/acl_run_avx512x16.h b/lib/acl/acl_run_avx512x16.h
index f87293eeb7..39ad7d0686 100644
--- a/lib/acl/acl_run_avx512x16.h
+++ b/lib/acl/acl_run_avx512x16.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#ifndef ACL_RUN_AVX512X16_H
+#define ACL_RUN_AVX512X16_H
+
 /*
  * Defines required by "acl_run_avx512_common.h".
  * Note that all of them has to be undefined by the end
@@ -337,3 +340,5 @@ search_avx512x16x2(const struct rte_acl_ctx *ctx, const uint8_t **data,
 #undef _SC_
 #undef _T_mask
 #undef _T_simd
+
+#endif /* ACL_RUN_AVX512X16_H */
diff --git a/lib/acl/acl_run_avx512x8.h b/lib/acl/acl_run_avx512x8.h
index 5da2bbfdeb..3b86a7ac2b 100644
--- a/lib/acl/acl_run_avx512x8.h
+++ b/lib/acl/acl_run_avx512x8.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#ifndef ACL_RUN_AVX512X8_H
+#define ACL_RUN_AVX512X8_H
+
 /*
  * Defines required by "acl_run_avx512_common.h".
  * Note that all of them has to be undefined by the end
@@ -251,3 +254,5 @@ search_avx512x8x2(const struct rte_acl_ctx *ctx, const uint8_t **data,
 #undef _SC_
 #undef _T_mask
 #undef _T_simd
+
+#endif /* ACL_RUN_AVX512X8_H */
diff --git a/lib/acl/acl_run_neon.h b/lib/acl/acl_run_neon.h
index 69d1b6d9e1..1393ff3681 100644
--- a/lib/acl/acl_run_neon.h
+++ b/lib/acl/acl_run_neon.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2015 Cavium, Inc
  */
 
+#ifndef ACL_RUN_NEON_H
+#define ACL_RUN_NEON_H
+
 #include "acl_run.h"
 #include "acl_vect.h"
 
@@ -259,3 +262,5 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 
 	return 0;
 }
+
+#endif /* ACL_RUN_NEON_H */
diff --git a/lib/acl/acl_run_sse.h b/lib/acl/acl_run_sse.h
index 93286a2c38..f10c9a82e2 100644
--- a/lib/acl/acl_run_sse.h
+++ b/lib/acl/acl_run_sse.h
@@ -2,6 +2,9 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#ifndef ACL_RUN_SSE_H
+#define ACL_RUN_SSE_H
+
 #include "acl_run.h"
 #include "acl_vect.h"
 
@@ -326,3 +329,5 @@ search_sse_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
 
 	return 0;
 }
+
+#endif /* ACL_RUN_SSE_H */
-- 
2.25.1


  parent reply	other threads:[~2022-02-09  3:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1644374873.git.liwg06@foxmail.com>
2022-02-09  3:02 ` [PATCH v2 01/16] bus/dpaa: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 02/16] event/octeontx: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 03/16] net/cxgbe: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 04/16] net/enetfec: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 05/16] net/i40e: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 06/16] net/netvsc: " Weiguo Li
2022-02-09  6:28   ` Stephen Hemminger
2022-02-09  9:25     ` Bruce Richardson
2022-02-09  3:02 ` [PATCH v2 07/16] net/qede: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 08/16] net/tap: " Weiguo Li
2022-02-09  6:28   ` Stephen Hemminger
2022-02-09  3:02 ` [PATCH v2 09/16] net/virtio: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 10/16] raw/ifpga/base: " Weiguo Li
2022-02-09  3:02 ` [PATCH v2 11/16] kni: " Weiguo Li
2022-02-09  3:02 ` Weiguo Li [this message]
2022-02-09  9:42   ` [PATCH v2 12/16] acl: " Ananyev, Konstantin
2022-02-09 10:12     ` Weiguo Li
2022-02-09  3:16 ` [PATCH v2 13/16] eal: " Weiguo Li
2022-02-09  3:16 ` [PATCH v2 14/16] efd: " Weiguo Li
2022-02-09  3:16 ` [PATCH v2 15/16] hash: " Weiguo Li
2022-02-09  3:16 ` [PATCH v2 16/16] pcapng: " Weiguo Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_95AD083B1D8AEFB41145918D181E9EF25307@qq.com \
    --to=liwg06@foxmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).