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 D7CEEA034E; Sun, 6 Feb 2022 04:59:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1099B4117E; Sun, 6 Feb 2022 04:59:11 +0100 (CET) Received: from out162-62-57-49.mail.qq.com (out162-62-57-49.mail.qq.com [162.62.57.49]) by mails.dpdk.org (Postfix) with ESMTP id C32064114F for ; Sun, 6 Feb 2022 04:59:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1644119944; bh=nT/rHmPyoeOpqLNky5wXg+qreQaADUC/O/7c93r3Kkk=; h=From:To:Subject:Date:In-Reply-To:References; b=nX4cz3qXR2glNYV8COTDY0r6ZlFOMjnAo/2CFjC7BsuRv/Dz58yeXSLD7Ph9q/2fV 0F88/AY8IiHWJSRoxwBfEhRPN9Fupz3JBNlQlIofSQ6rZPK/82w/VCMl28Is35OMom XmE7hV1agFj8NyRioY+z2KPfr4NtvbxnG96nPnPY= Received: from liwg-ubuntu.lan ([111.193.130.237]) by newxmesmtplogicsvrszc10.qq.com (NewEsmtp) with SMTP id EAE16474; Sun, 06 Feb 2022 11:58:46 +0800 X-QQ-mid: xmsmtpt1644119943t9n2zr9ud Message-ID: X-QQ-XMAILINFO: OZ7HbAk7YCRi34tNTEdTEfGL3FBTsTdfIDDxWiFEi7TH9eXqjT3pBRwz9Nl7yo w3fDuAjSsnAnvfcBN2uCWL1a8MLMyYcBZZiLnvuiXCshTHNr6Og+LMv0a0TnpW1GgfzuFAO9aP0Q 48me+rVJAELW8GEP5uL9Bb4bKlvm//bbXUz+gqYSQ8BHBohNaUuTNOLFbtnzzcKxq8sq35P3q6zU A9PwuDdDhfi/3AxX/frfuf8L+tWyDedpE83BoZB+CBNFNq49jtPfn6oJxOlX6KENBP8Rxnn2y6bJ pZRn3jUBQGnwQJFwuZHyChTWOZz85gBl0suAc5K6T5CzHoSo4QOZPRiyrSvAup8xiyRx3F+SQfri 5qGckjFWkAapCGq5f53ockOTie65imR19S4YaNNjdVe9p1w3X6iLOCqjmTiqqHhXkK5rvzI8I2jY uRroX1CIK3fwwmkyUBKPVsTbHNVYjD0h/0xpN74MsWNMhec1tMPbktu39NuGR3jyo6IuR2p9P9vJ ZgSDmwQLbxj5o+1VbeM+Lp209AzVz0fymy4QPl8Ea+f9Z4BwfmjTGsphNQ6dvvKWzPaagbVTBUMm UD1DMLtkaYpkA1j62JI+t5xLP0pV0JUQI1b49K/wAsy/xXd/WV+hMfzTfKB7WCB+gmn5pynH4jHX iRyiTvUAp1yuMtka9n/4pNACeJKK3DxFHsA+hssaavgh8XAn6KwuNxJyhaQ7Sfn8rUQ07B/URyzl yfnMOdbOLEMW/KUy2BahX789IpP57QdkP+q/++cfB+Ef0W8XYEUYU63VLENJ+BAMLImQ9ihb6PkY giTx8Al4b9lhLOtvAubxGUitwjpel3X26m/eey3OqL67df3TFGW+hIoS5VDpRLN3iycqCBKQHORQ == From: Weiguo Li To: dev@dpdk.org Subject: [PATCH 12/16] acl: add define guards to avoid multi-inclusion Date: Sun, 6 Feb 2022 11:58:42 +0800 X-OQ-MSGID: <20220206035846.2840462-12-liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220206035846.2840462-1-liwg06@foxmail.com> References: <20220206035846.2840462-1-liwg06@foxmail.com> 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..0c4388c14e 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..15c8ac2dfb 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..3a6f4900af 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..9033e4b324 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..cf721e4c3c 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..6d733f6046 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