From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CCAE0A034E; Wed, 9 Feb 2022 04:03:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FF6A411DD; Wed, 9 Feb 2022 04:03:00 +0100 (CET) Received: from out162-62-58-69.mail.qq.com (out162-62-58-69.mail.qq.com [162.62.58.69]) by mails.dpdk.org (Postfix) with ESMTP id A4F1A4115A for ; Wed, 9 Feb 2022 04:02:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1644375771; bh=1aoajwQudJsKpjGDGbkR3gNpMdBWWXVfmXkfJu/AKrE=; h=From:To:Subject:Date:In-Reply-To:References; b=nte/BtgPNcBrs9IEayDQSfzfknYt5UZI/i1dpwH/5u5ti7Yqz6/LWhmD6xVyg3eul 4gr1C3CqVzEDeM8lsC1tAB086anU0URi3l4PounT7YArg2Ylc1a/yAWkqXVixzfTr5 1ka1XtvhJgAVXLUyFGhd4BjjN7PzEzVvTm6GNoKw= Received: from liwg-ubuntu.lan ([111.193.130.237]) by newxmesmtplogicsvrszb7.qq.com (NewEsmtp) with SMTP id 98A6079; Wed, 09 Feb 2022 11:02:24 +0800 X-QQ-mid: xmsmtpt1644375770tuga5yhpj Message-ID: X-QQ-XMAILINFO: OJmOzhnkAA6FaXTJRcz0sCsXdRt7W6wSJ3L9yIqi8GhH1sNWYMxXI46j3kG+4Z fZtJo8q3OBGcr/adcJGXy8PNsrX1C8M8Yg9srNOCi7yq/mI2ra1YXpMecTlCahktOfC1I2JevA8o bRVS904orVlFrqJMmT01NurCrIB+/PhmOc7usotBD3qOjydmV0lnAzHwt5OW6r8vy/oaISUBR7zD mk3cMlU7qQeHJdz0DXd0KS6kpdGRF6X3mGZyoRvImmfjdQ6EBGVZHL9EX+rQsWUBwjQ6gfOIoYjo 8MAX+OrvXIagKjm5cHSnilq7G/gu01WY2sw9ge+a9dyLAKoHEDXBfRV1fwSZP1787cHNJtQV02fX oxweXsNSvUDoAqN/JRbjrm/HTtHzD4LSehg3e/PQpelZ7wnBKANjTqcelpZHZF9WfFbQM2O0GNAA cJEtspdvTZYzFcjDuzMxoH8Xq+ccoszJYIL53UvF+/d6rqsBk0IsrKrWqeAz/2kUQ2bkLfTO0Kas Hnhm2gvh/L9h7axO9vjT9xCiUy3jB2SS7oDh8TTvBpt2cqafdVWE2Jm8xOI9V80sudQykwfKsCxF UPJL5iHkPNfy7Vy1U49rl/dZ6xVlaKuD0ReJikSm+Mdc7e3+xkAI8kP1daIns8yJNSbcUAg1FFkg x/OQCSgWuRWlyR4p93NkU2u04I7JhmhFth3dW00YdK783DQh9PYW75+UKlYkM7rCfA0eqt7tbDD6 bf22inA377uLdmZOqW2XoYF/yFAJaGfStS5+UDmEz0bzm3mr9duG5xT3oIMPpDg0WpcorvdH56SV nEzDLm0irMsnu3dKjijevHGUOTFt4tw43bW1uOwfDZizWw3hByxJGXBx2VKcBm3lJoyWSeaNelXC ZkAbZn5IsJmu0wRon//IjB32gdufZFvi9Vg+Nc9tUGo5hRwAe2hHO20RYvDUsa/zx/SOm4vJU8 X-QQ-SPAM: true From: Weiguo Li 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 X-OQ-MSGID: <9840478bf2a3a3d556873b44fc37c2f50882af0c.1644374873.git.liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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