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 085EEA00C4; Fri, 30 Sep 2022 10:03:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54AF042B78; Fri, 30 Sep 2022 10:02:52 +0200 (CEST) Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id D198340FAE for ; Fri, 30 Sep 2022 10:02:44 +0200 (CEST) Received: from localhost.localdomain (unknown [10.2.5.185]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxnmuUojZjOhskAA--.54564S8; Fri, 30 Sep 2022 16:02:36 +0800 (CST) From: Min Zhou To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, anatoly.burakov@intel.com, qiming.yang@intel.com, Yuying.Zhang@intel.com, jgrajcia@cisco.com, konstantin.v.ananyev@yandex.ru, zhoumin@loongson.cn Cc: dev@dpdk.org, maobibo@loongson.cn Subject: [PATCH v7 6/7] test/cpuflags: add test for LoongArch cpu flag Date: Fri, 30 Sep 2022 16:02:27 +0800 Message-Id: <20220930080228.864681-7-zhoumin@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220930080228.864681-1-zhoumin@loongson.cn> References: <20220930080228.864681-1-zhoumin@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8BxnmuUojZjOhskAA--.54564S8 X-Coremail-Antispam: 1UD129KBjvJXoW7WryDCry3Kry3GryktF43Jrb_yoW8WFy3pw 4Sk343ua18Jwnrt3yaya4Y93Z5Jr4rAa17JryfZF4UCFWUXw4kCryrAr1kWFn8WrW8Arn3 Was8Z3WI9w1DCr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: 52kr3ztlq6z05rqj20fqof0/ 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 Add checks for all flag values defined in the LoongArch cpu feature table. Signed-off-by: Min Zhou --- app/test/test_cpuflags.c | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c index 98a99c2c7d..a0e342ae48 100644 --- a/app/test/test_cpuflags.c +++ b/app/test/test_cpuflags.c @@ -281,6 +281,47 @@ test_cpuflags(void) CHECK_FOR_FLAG(RTE_CPUFLAG_RISCV_ISA_Z); #endif +#if defined(RTE_ARCH_LOONGARCH) + printf("Check for CPUCFG:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_CPUCFG); + + printf("Check for LAM:\t\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_LAM); + + printf("Check for UAL:\t\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_UAL); + + printf("Check for FPU:\t\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_FPU); + + printf("Check for LSX:\t\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_LSX); + + printf("Check for LASX:\t\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_LASX); + + printf("Check for CRC32:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_CRC32); + + printf("Check for COMPLEX:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_COMPLEX); + + printf("Check for CRYPTO:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_CRYPTO); + + printf("Check for LVZ:\t\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_LVZ); + + printf("Check for LBT_X86:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_LBT_X86); + + printf("Check for LBT_ARM:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_LBT_ARM); + + printf("Check for LBT_MIPS:\t"); + CHECK_FOR_FLAG(RTE_CPUFLAG_LBT_MIPS); +#endif + /* * Check if invalid data is handled properly */ -- 2.31.1