From patchwork Wed Aug 18 17:13:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97066 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8E1FA0C4C; Wed, 18 Aug 2021 19:14:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CFCC410F2; Wed, 18 Aug 2021 19:14:01 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8B3DC40140 for ; Wed, 18 Aug 2021 19:13:59 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id D589620C3321; Wed, 18 Aug 2021 10:13:58 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D589620C3321 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306838; bh=xHIDLve0a8QPXazIbPljyXDTTS5tWiEyuHtM3+3X4a8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JiIhPxwsUaF7QMswd4ud+J1PMHzNm1UcRrgccH6oFdd4cdiVDRMidmdpBWMZtenno k/H8fVlgGSRR3OvWGXbF8UJGrpJuA2jEacDCWzWHJVAhOh7ihPjIbi9Xld80QIir13 3zpjLb0OjKjGPQYHkESoTZE/QyYj9V1k81LGyWzU= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:42 -0700 Message-Id: <1629306834-6277-2-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 01/13] lib: build libraries that some tests depend on 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 Sender: "dev" Enable building subset of libraries that tests depend on for Windows Signed-off-by: Jie Zhou --- lib/meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/meson.build b/lib/meson.build index 1673ca4323..f109d6987d 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -81,10 +81,16 @@ if is_windows 'timer', 'bitratestats', 'cfgfile', + 'efd', 'gro', 'gso', + 'ip_frag', 'latencystats', + 'lpm', 'pdump', + 'rib', + 'reorder', + 'stack', ] # only supported libraries for windows endif From patchwork Wed Aug 18 17:13:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97067 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C972A0C4C; Wed, 18 Aug 2021 19:14:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7211B411DA; Wed, 18 Aug 2021 19:14:02 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A0DAD41134 for ; Wed, 18 Aug 2021 19:13:59 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id EB39D20C332A; Wed, 18 Aug 2021 10:13:58 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EB39D20C332A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=gy+V7kfoN1+CyIlChP210rkqUOAKv3oRT8b1Ar+dUTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CBOp1dYKbz5yeoGhro52RDh6HccsVmghvgP6fAPfWK26t4pKIoiJ5U6p2BoPVcOeG Zq5HEqOkZao7PYeuo8azH+MZbUoNkimxhdii+gLPCR7V55/FyPsYq5lWXS15nLfPIk q7PVJnJJp3IQ1flcCVXBcLLyopEZcjq9ZUJY7IOA= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:43 -0700 Message-Id: <1629306834-6277-3-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 02/13] driver/mempool: build mempool stack on Windows 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 Sender: "dev" mempool_autotest failed on Windows at setting the "stack" handler test case. Per debugging, in rte_mempool_ops_table, there are only 6 ring ops registered, and no "stack" ops registered which caused the failure of rte_mempool_set_ops_byname and thus the test failed. Per code investigation, the "stack" ops are registered in rte_mempool_stack.c: MEMPOOL_REGISTER_OPS(ops_stack); MEMPOOL_REGISTER_OPS(ops_lf_stack); The reason these two ops are not registered is because currently driver\mempool\stack is not build on Windows. After building stack on Windows, the mempool_autotest now completed as pass. Signed-off-by: Jie Zhou --- drivers/mempool/stack/meson.build | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build index 371cf131b1..580dde79eb 100644 --- a/drivers/mempool/stack/meson.build +++ b/drivers/mempool/stack/meson.build @@ -1,11 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2019 Intel Corporation -if is_windows - build = false - reason = 'not supported on Windows' -endif - sources = files('rte_mempool_stack.c') deps += ['stack'] From patchwork Wed Aug 18 17:13:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97069 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E1A71A0C4C; Wed, 18 Aug 2021 19:14:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBD58411FA; Wed, 18 Aug 2021 19:14:04 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B997C41165 for ; Wed, 18 Aug 2021 19:13:59 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 0C70A20C3337; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0C70A20C3337 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=sC0oMhNFmOlGUnSXnqfT62Q/wFMXu6TXdcYt6/2riRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AekZ1qDWdJEsyBr7J0wDD/aOqdHDDWw8QmMJTS/KDRFbeFslbaFepc9sOjIhj14kV QJtQhCrwdskNP5zz+Gr6gVdOK2LkDcJ4KuhxVEdOS2y+sQSH5T4SMLvIOWR7kWG7G7 v/vXNlQ4XFNoFjx4k6Iu19yT3MjVjDKC39QouVtA= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:44 -0700 Message-Id: <1629306834-6277-4-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 03/13] eal/windows: return ENOTSUP for not supported API 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 Sender: "dev" UT memory_autotest on Windows has 2 failed cases on eal APIs eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2 APIs are not supported on Windows yet. Should return ENOTSUP such that in test_memory.c these 2 ENOTSUP cases will not be marked as failures, same as other ENOTSUP cases. Signed-off-by: Jie Zhou Acked-by: Dmitry Kozlyuk --- lib/eal/windows/eal_memalloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c index 4459d59b1a..fffdd5b976 100644 --- a/lib/eal/windows/eal_memalloc.c +++ b/lib/eal/windows/eal_memalloc.c @@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx) RTE_SET_USED(list_idx); RTE_SET_USED(seg_idx); EAL_LOG_NOT_IMPLEMENTED(); - return -1; + return -ENOTSUP; } int @@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset) RTE_SET_USED(seg_idx); RTE_SET_USED(offset); EAL_LOG_NOT_IMPLEMENTED(); - return -1; + return -ENOTSUP; } static int @@ -433,7 +433,7 @@ eal_memalloc_sync_with_primary(void) { /* No multi-process support. */ EAL_LOG_NOT_IMPLEMENTED(); - return -1; + return -ENOTSUP; } int From patchwork Wed Aug 18 17:13:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97070 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5513DA0C4C; Wed, 18 Aug 2021 19:14:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C06C41206; Wed, 18 Aug 2021 19:14:06 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C592E41169 for ; Wed, 18 Aug 2021 19:13:59 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 21D8320C333B; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 21D8320C333B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=bMCGI+2ZuBkATl/JRU+4XtzimLV0+HyR3rM/r7xqgW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L2KcxB5PMi/AX90IkC+jjO3rzdA9/xtpux8puKPJhmmGYXQQZWUwH9w/YsihXh6T0 G9W4x0grqoiA9vdP44uHkJCWPwaaoSNTSMA7JqeoIebeCHuvyj21oDszI6hilpn/s7 S8hT1jD9VYyaE0nDKtc/KVVvUbKjQoWgJXuzibsc= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:45 -0700 Message-Id: <1629306834-6277-5-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 04/13] app/test: remove unnecessary headers 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 Sender: "dev" Remove unnecessary header inclusion Signed-off-by: Jie Zhou --- app/test/commands.c | 2 -- app/test/test.c | 1 - app/test/test_cmdline_lib.c | 1 - 3 files changed, 4 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index 76f6ee5d23..82bd8bf474 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -8,8 +8,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/app/test/test.c b/app/test/test.c index 173d202e47..52fac24213 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c index d5a09b4541..86a5b78d70 100644 --- a/app/test/test_cmdline_lib.c +++ b/app/test/test_cmdline_lib.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include From patchwork Wed Aug 18 17:13:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97075 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E65B6A0C4C; Wed, 18 Aug 2021 19:14:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E23C41227; Wed, 18 Aug 2021 19:14:12 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5AA24410F2 for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 371B320C3344; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 371B320C3344 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=LoYjurWVbdyOFVZ6NarAwNIoqZuc/m1U1nj9szb1gJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gwKN0ijVfRUmrvFpTSls/bJdPJRYSuhvGo4SB/1YzSnu2J7nBzqJQJrcQUVTgtviG yTWyjVhFUkuPExG5NQkjVsnftWfKpwKwThRTMuqR1+yL4vZZti6oj8VrZPB8xfi1mR inyLhoCDjK2Nnc0O/2/tZkWn6a/McbNajfzbRxQQ= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:46 -0700 Message-Id: <1629306834-6277-6-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 05/13] app/test: replace POSIX specific code 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 Sender: "dev" - Include rte_os_shim.h - Replace sleep and usleep with rte_delay_us_sleep - #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only Signed-off-by: Jie Zhou --- app/test/packet_burst_generator.c | 1 + app/test/process.h | 4 +++- app/test/test.c | 4 ++++ app/test/test_byteorder.c | 2 +- app/test/test_cmdline.c | 2 ++ app/test/test_crc.c | 1 - app/test/test_mp_secondary.c | 2 ++ app/test/test_pmd_perf.c | 6 +++++- app/test/test_ring_stress.c | 3 ++- app/test/test_ring_stress_impl.h | 2 +- app/test/test_telemetry_data.c | 2 ++ 11 files changed, 23 insertions(+), 6 deletions(-) diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c index 0fd7290b0e..2da4106ad6 100644 --- a/app/test/packet_burst_generator.c +++ b/app/test/packet_burst_generator.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "packet_burst_generator.h" diff --git a/app/test/process.h b/app/test/process.h index 5b10cf64df..1f073b9c5c 100644 --- a/app/test/process.h +++ b/app/test/process.h @@ -7,12 +7,14 @@ #include /* errno */ #include /* PATH_MAX */ +#ifndef RTE_EXEC_ENV_WINDOWS #include /* basename et al */ +#include +#endif #include /* NULL */ #include /* strerror */ #include /* readlink */ #include -#include #include /* strlcpy */ diff --git a/app/test/test.c b/app/test/test.c index 52fac24213..e8f8ce8335 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -62,7 +62,9 @@ do_recursive_call(void) const char *env_var; int (*action_fn)(void); } actions[] = { +#ifndef RTE_EXEC_ENV_WINDOWS { "run_secondary_instances", test_mp_secondary }, +#endif #ifdef RTE_LIB_PDUMP #ifdef RTE_NET_RING { "run_pdump_server_tests", test_pdump }, @@ -81,7 +83,9 @@ do_recursive_call(void) { "test_file_prefix", no_action }, { "test_no_huge_flag", no_action }, #ifdef RTE_LIB_TIMER +#ifndef RTE_EXEC_ENV_WINDOWS { "timer_secondary_spawn_wait", test_timer_secondary }, +#endif #endif }; diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c index 03c08d9abf..de14ed539e 100644 --- a/app/test/test_byteorder.c +++ b/app/test/test_byteorder.c @@ -46,7 +46,7 @@ test_byteorder(void) return -1; res_u16 = rte_bswap16(0x1337); - printf("const %"PRIx16" -> %"PRIx16"\n", 0x1337, res_u16); + printf("const %"PRIx16" -> %"PRIx16"\n", (uint16_t)0x1337, res_u16); if (res_u16 != 0x3713) return -1; diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c index 115bee966d..9a76bd299f 100644 --- a/app/test/test_cmdline.c +++ b/app/test/test_cmdline.c @@ -31,6 +31,7 @@ test_cmdline(void) return -1; if (test_parse_num_invalid_param() < 0) return -1; +#ifndef RTE_EXEC_ENV_WINDOWS printf("Testing parsing IP addresses...\n"); if (test_parse_ipaddr_valid() < 0) return -1; @@ -38,6 +39,7 @@ test_cmdline(void) return -1; if (test_parse_ipaddr_invalid_param() < 0) return -1; +#endif printf("Testing parsing strings...\n"); if (test_parse_string_valid() < 0) return -1; diff --git a/app/test/test_crc.c b/app/test/test_crc.c index bf1d344359..0ed080e482 100644 --- a/app/test/test_crc.c +++ b/app/test/test_crc.c @@ -14,7 +14,6 @@ #define CRC32_VEC_LEN2 348 #define CRC16_VEC_LEN1 12 #define CRC16_VEC_LEN2 2 -#define LINE_LEN 75 /* CRC test vector */ static const uint8_t crc_vec[CRC_VEC_LEN] = { diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c index 5b6f05dbb1..da035348bd 100644 --- a/app/test/test_mp_secondary.c +++ b/app/test/test_mp_secondary.c @@ -14,7 +14,9 @@ #include #include #include +#ifndef RTE_EXEC_ENV_WINDOWS #include +#endif #include #include #include diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index 3a248d512c..8698d24eac 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -298,6 +298,7 @@ reset_count(void) idle = 0; } +#ifndef RTE_EXEC_ENV_WINDOWS static void stats_display(uint16_t port_id) { @@ -327,6 +328,7 @@ signal_handler(int signum) if (signum == SIGUSR2) stats_display(0); } +#endif struct rte_mbuf **tx_burst; @@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore) i = (i >= conf->nb_ports - 1) ? 0 : (i + 1); } - sleep(5); + rte_delay_us(5 * US_PER_S); /* only when polling second */ if (flags == SC_BURST_XMIT_FIRST) @@ -669,8 +671,10 @@ test_pmd_perf(void) printf("Start PMD RXTX cycles cost test.\n"); +#ifndef RTE_EXEC_ENV_WINDOWS signal(SIGUSR1, signal_handler); signal(SIGUSR2, signal_handler); +#endif nb_ports = rte_eth_dev_count_avail(); if (nb_ports < NB_ETHPORTS_USED) { diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c index 1af45e0fc8..ce3535c6b2 100644 --- a/app/test/test_ring_stress.c +++ b/app/test/test_ring_stress.c @@ -43,9 +43,10 @@ test_ring_stress(void) n += test_ring_rts_stress.nb_case; k += run_test(&test_ring_rts_stress); +#ifndef RTE_EXEC_ENV_WINDOWS n += test_ring_hts_stress.nb_case; k += run_test(&test_ring_hts_stress); - +#endif n += test_ring_mt_peek_stress.nb_case; k += run_test(&test_ring_mt_peek_stress); diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h index f9ca63b908..feb4b96ea1 100644 --- a/app/test/test_ring_stress_impl.h +++ b/app/test/test_ring_stress_impl.h @@ -359,7 +359,7 @@ test_mt1(int (*test)(void *)) wrk_cmd = WRK_CMD_RUN; rte_smp_wmb(); - usleep(run_time * US_PER_S); + rte_delay_us(run_time * US_PER_S); /* signal worker to start test */ wrk_cmd = WRK_CMD_STOP; diff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c index f34d691265..a0450337ea 100644 --- a/app/test/test_telemetry_data.c +++ b/app/test/test_telemetry_data.c @@ -4,7 +4,9 @@ #include #include +#ifndef RTE_EXEC_ENV_WINDOWS #include +#endif #include #include From patchwork Wed Aug 18 17:13:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97071 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A27D4A0C4C; Wed, 18 Aug 2021 19:14:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E2294120F; Wed, 18 Aug 2021 19:14:07 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4D99840140 for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 4CA8220C335B; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4CA8220C335B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=KR7sjeooyf1knREaQULSDoZRcOc2rvkvtNP38O2vq6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e2zNRk1f6nClOEbwg/JWZtBJJAjdI3bHJD7najsjeTafvUNgXsWtTKQcD1nBrj30i W9UMKqrGpUGfcFA2KNZQzStbica6RJKgDudIKb2X4HpdkOUjXqV3EHEMqzvNBMlUg6 ZohcayzZmkT3nef2RiYUQeQ1/eXbsf0CVoPrBW/Q= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:47 -0700 Message-Id: <1629306834-6277-7-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 06/13] app/test: exclude ENOTSUP as failure 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 Sender: "dev" Check rte_errno to exclude ENOTSUP as failures in test_memory.c Signed-off-by: Jie Zhou --- app/test/test_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/test/test_memory.c b/app/test/test_memory.c index 7d5ae99bab..6f4fc02c03 100644 --- a/app/test/test_memory.c +++ b/app/test/test_memory.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "test.h" @@ -53,7 +54,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms, /* ENOTSUP means segment is valid, but there is not support for * segment fd API (e.g. on FreeBSD). */ - if (errno == ENOTSUP) + if (rte_errno == ENOTSUP) return 1; /* all other errors are treated as failures */ return -1; @@ -62,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms, /* we're able to get memseg fd - try getting its offset */ ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset); if (ret < 0) { - if (errno == ENOTSUP) + if (rte_errno == ENOTSUP) return 1; return -1; } From patchwork Wed Aug 18 17:13:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97072 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EAEBCA0C4C; Wed, 18 Aug 2021 19:14:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6B6B41216; Wed, 18 Aug 2021 19:14:08 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 65B7B41134 for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 61D1320C336F; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 61D1320C336F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=Rsb5V5+7h0JtOMsLmSBW3Tu3JkclarPpaGVZJ1VN4F4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EEL/in+HKSP5ZNsi6USjxTxkH4UwKyiAqGqEoylKWPQaEgypCHoIcEra25FKNxWCW rE1XinyOSV881c/Q9q3zJlM/pXMYQIVkKTBdvXgQah76/HSa+XaNo3TrdnS0s3YCI8 npgTB+4Tls5uutHWmvyYUwy7uYf5RRdvFp9XU8I4= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:48 -0700 Message-Id: <1629306834-6277-8-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 07/13] app/test: skip interrupt tests on Windows 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 Sender: "dev" Even though test_interrupts.c can compile on Windows, skip interrupt tests for now since majority of eal_interrupt on Windows are stubs. Will remove the skip after interrupt being fully enabled on Windows. Signed-off-by: Jie Zhou --- app/test/test_interrupts.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c index 233b14a70b..ab52362e01 100644 --- a/app/test/test_interrupts.c +++ b/app/test/test_interrupts.c @@ -12,6 +12,15 @@ #include "test.h" +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_interrupt(void) +{ + printf("Interrupt on Windows is not fully supported yet, skipping test\n"); + return TEST_SKIPPED; +} +#else + #define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */ /* predefined interrupt handle types */ @@ -558,5 +567,6 @@ test_interrupt(void) return ret; } +#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt); From patchwork Wed Aug 18 17:13:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97073 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 735C7A0C4C; Wed, 18 Aug 2021 19:14:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 15F5B4121C; Wed, 18 Aug 2021 19:14:10 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 71ABB41165 for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 7802C20C3379; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7802C20C3379 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=v9U8t8Xl47T/4EzFv1x/Pk3Lr0GerWI4D5nLCNczUJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C+C1rTDE7o35gwxX4z491bvLjcSapYfro9EIeSsJXn3PO8q7Tb3iBy0I+DOUNoegh 1b1c5wZRnYcA7Nxn0vZYfuggiuvKHoPmS4BJkKjjf/Sl+CaoWAENj5cRQkXwtlwgS8 lZVdnQOz87KKcE2AS+R0AtQ00uFcLfBOgcctjNq0= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:49 -0700 Message-Id: <1629306834-6277-9-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 08/13] app/test: temporarily "skip" one cmdline test case 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 Sender: "dev" cmdline tests pass except one failure at the test_cmdline_socket_fns test case with error: failed to open /dev/null for reading! Temporarily "skip" this case while enable all other passing cases. Issue is tracked internally and will add the corresponding case on Windows in future. Signed-off-by: Jie Zhou --- app/test/test_cmdline_lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c index 86a5b78d70..1ff5c0d7e6 100644 --- a/app/test/test_cmdline_lib.c +++ b/app/test/test_cmdline_lib.c @@ -140,6 +140,9 @@ test_cmdline_vt100_fns(void) static int test_cmdline_socket_fns(void) { +#ifdef RTE_EXEC_ENV_WINDOWS + return 0; +#else cmdline_parse_ctx_t ctx; struct cmdline *cl; @@ -179,6 +182,7 @@ test_cmdline_socket_fns(void) printf("Error: function accepted null parameter!\n"); cmdline_free(cl); return -1; +#endif } static int From patchwork Wed Aug 18 17:13:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97074 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0C2BA0C4C; Wed, 18 Aug 2021 19:14:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2824F41221; Wed, 18 Aug 2021 19:14:11 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 774F941169 for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 8D74C20C3384; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8D74C20C3384 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=Rt+uxw8CAfeYyUkGN8bkpLml2OIeF4aMAEGFxbnNavQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TgSRkxND4wzjCjrLQDcslzfBQs2r3ekysL7IKoyzYb6S62aCdhlPg1r1Fqy0ii1JX Nk3d+v59nLdE2E48CmzLWEFhhJHnMsi915Cy0kobu6TJf68CAd3vxzMrr3/AAHRJXt bbSH0SH5yEq3o88f7yuFuf76PuNSaAtlI4BvHo94= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:50 -0700 Message-Id: <1629306834-6277-10-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 09/13] app/test: skip two logs_autotest cases on Windows 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 Sender: "dev" DPDK logs_autotest on Windows failed at "dynamic log types" tests. The failures are on 2 test cases for rte_log_set_level_regexp API, due to regular expression is not supported on Windows in DPDK yet and regcomp/regexec are just stubs on Windows (in regex.h). In app\test\test_logs.c, ifndef these two test cases, and for the rte_log_set_level_pattern validation case following these two cases, differentiate the expected log level passed into macro CHECK_LEVELS Now logs_autotest completes for all dynamic log types and static log types. Signed-off-by: Jie Zhou --- app/test/test_logs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test/test_logs.c b/app/test/test_logs.c index 7abb6eeca2..7c001c1ab3 100644 --- a/app/test/test_logs.c +++ b/app/test/test_logs.c @@ -113,6 +113,7 @@ test_logs(void) rte_log_set_level(logtype1, RTE_LOG_ERR); CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR); +#ifndef RTE_EXEC_ENV_WINDOWS rte_log_set_level_regexp("type$", RTE_LOG_EMERG); CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR); @@ -121,7 +122,10 @@ test_logs(void) rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG); CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_EMERG, RTE_LOG_EMERG); - +#else + ret = rte_log_set_level_pattern("logtype", RTE_LOG_DEBUG); + CHECK_LEVELS(RTE_LOG_ERR, RTE_LOG_INFO, RTE_LOG_ERR); +#endif /* set logtype level low to so we can test global level */ rte_log_set_level_pattern("logtype*", RTE_LOG_DEBUG); CHECK_LEVELS(RTE_LOG_DEBUG, RTE_LOG_DEBUG, RTE_LOG_DEBUG); From patchwork Wed Aug 18 17:13:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97077 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C7A8A0C4C; Wed, 18 Aug 2021 19:15:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89AD641234; Wed, 18 Aug 2021 19:14:14 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8215D4117D for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id A342120C3387; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A342120C3387 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=xSZcEwQLMGpKzdtR7/LKLLDVxtWkxJVnIDGfpAgV8fs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mPzDDR4PqKqd8osBEiV4AhC0e+cZZbxVKVIlCdIEA0C7m+FC/6aY0b0Sw+B30uJ/y f2LWB8Yyb5Jk2YAQO9zVSxZFvrhVFjOIzBN86BL6XMO66tPcbLERxl27yKuFs/xXU+ KT7/hoN4ip15ECmTI+NBxJ97j6CbUTwfPvWWnxRk= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:51 -0700 Message-Id: <1629306834-6277-11-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 10/13] app/test: differentiate a strerror on different OS 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 Sender: "dev" On Windows, strerror returns just "Unknown error" for errnum greater than MAX_ERRNO, while linux and freebsd returns "Unknown error ", which is the current expectation for errno_autotest. Differentiate the error string on Windows to remove a "duplicate error code" failure. Signed-off-by: Jie Zhou --- app/test/test_errno.c | 12 +++++++++++- lib/eal/common/eal_common_errno.c | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/test/test_errno.c b/app/test/test_errno.c index 3ff0456a58..d30ac212fd 100644 --- a/app/test/test_errno.c +++ b/app/test/test_errno.c @@ -18,13 +18,19 @@ test_errno(void) { const char *rte_retval; const char *libc_retval; + +#ifndef RTE_EXEC_ENV_WINDOWS #ifdef RTE_EXEC_ENV_FREEBSD /* BSD has a colon in the string, unlike linux */ const char unknown_code_result[] = "Unknown error: %d"; #else const char unknown_code_result[] = "Unknown error %d"; #endif - char expected_libc_retval[sizeof(unknown_code_result)+3]; + char expected_libc_retval[sizeof(unknown_code_result) + 3]; +#else + /* Windows doesn't return error number for error greater than MAX_errno*/ + const char expected_libc_retval[] = "Unknown error"; +#endif /* use a small selection of standard errors for testing */ int std_errs[] = {EAGAIN, EBADF, EACCES, EINTR, EINVAL}; @@ -54,11 +60,13 @@ test_errno(void) rte_retval, libc_retval); if (strcmp(rte_retval, libc_retval) == 0) return -1; +#ifndef RTE_EXEC_ENV_WINDOWS /* generate appropriate error string for unknown error number * and then check that this is what we got back. If not, we have * a duplicate error number that conflicts with errno.h */ snprintf(expected_libc_retval, sizeof(expected_libc_retval), unknown_code_result, rte_errs[i]); +#endif if ((strcmp(expected_libc_retval, libc_retval) != 0) && (strcmp("", libc_retval) != 0)){ printf("Error, duplicate error code %d\n", rte_errs[i]); @@ -69,8 +77,10 @@ test_errno(void) /* ensure that beyond RTE_MAX_ERRNO, we always get an unknown code */ rte_retval = rte_strerror(RTE_MAX_ERRNO + 1); libc_retval = strerror(RTE_MAX_ERRNO + 1); +#ifndef RTE_EXEC_ENV_WINDOWS snprintf(expected_libc_retval, sizeof(expected_libc_retval), unknown_code_result, RTE_MAX_ERRNO + 1); +#endif printf("rte_strerror: '%s', strerror: '%s'\n", rte_retval, libc_retval); if ((strcmp(rte_retval, libc_retval) != 0) || diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c index f86802705a..4c4abb802e 100644 --- a/lib/eal/common/eal_common_errno.c +++ b/lib/eal/common/eal_common_errno.c @@ -37,7 +37,11 @@ rte_strerror(int errnum) /* since some implementations of strerror_r throw an error * themselves if errnum is too big, we handle that case here */ if (errnum >= RTE_MAX_ERRNO) +#ifdef RTE_EXEC_ENV_WINDOWS + snprintf(ret, RETVAL_SZ, "Unknown error%s", sep); +#else snprintf(ret, RETVAL_SZ, "Unknown error%s %d", sep, errnum); +#endif else switch (errnum){ case E_RTE_SECONDARY: From patchwork Wed Aug 18 17:13:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97076 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DD27A0C4C; Wed, 18 Aug 2021 19:15:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FD2C4122D; Wed, 18 Aug 2021 19:14:13 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8FA0B411C7 for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id B8C8320C338A; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B8C8320C338A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=l0KOGdlOqkniobGBQzdhML6GnEFyjKhs0BmqNb1StDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bffmfqUu+Gpl9xTaHBwxfm0fR0A2RuFkeZ/ibFg0NxexbTEd7nbHEcz3jBqtOppHt HFdsNu28GLCM8CwOmav2hcu0ORzcfKEYn7U3Gaq6uDMUCOzlCCNxHko4glWfmEUTHO Drziku7ntkj8KQ195d40dr70JFeX4ScIbnEAInBg= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:52 -0700 Message-Id: <1629306834-6277-12-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 11/13] app/test: remove two alarm_autotest cases 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 Sender: "dev" Remove two alarm_autotest test cases which do bogus range check on Windows. Signed-off-by: Jie Zhou --- app/test/test_alarm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c index b4034339b8..70e97a3109 100644 --- a/app/test/test_alarm.c +++ b/app/test/test_alarm.c @@ -10,6 +10,7 @@ #include "test.h" +#ifndef RTE_EXEC_ENV_WINDOWS static volatile int flag; static void @@ -18,6 +19,7 @@ test_alarm_callback(void *cb_arg) flag = 1; printf("Callback setting flag - OK. [cb_arg = %p]\n", cb_arg); } +#endif static int test_alarm(void) @@ -27,6 +29,7 @@ test_alarm(void) return 0; #endif +#ifndef RTE_EXEC_ENV_WINDOWS /* check if it will fail to set alarm with wrong us value */ printf("check if it will fail to set alarm with wrong ms values\n"); if (rte_eal_alarm_set(0, test_alarm_callback, @@ -39,6 +42,7 @@ test_alarm(void) printf("should not be successful with (UINT64_MAX-1) us value\n"); return -1; } +#endif /* check if it will fail to set alarm with null callback parameter */ printf("check if it will fail to set alarm with null callback parameter\n"); From patchwork Wed Aug 18 17:13:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97078 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5D258A0C4C; Wed, 18 Aug 2021 19:15:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB10E4123A; Wed, 18 Aug 2021 19:14:15 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 91A95411DA for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id CE76220C3390; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CE76220C3390 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=VmSNG0XsaQuUFBmswrELfnAdkzbrA8tQRglVj4C6yl0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TGsZC99poaFZeqPankFXkX6jHUgYf19SRQleM5HlYPuhv32qa3lSWsIcSdWsMr/AN dLALICLHXx1jPEvmIaCiE/59LmiwEZeLj9FU/+OdN01Ee7+24elS8fPoRSOABTtruN 0GlTgRgY37Poi7Ut23q2TDsBTNDDYVOJuvpzkwK0= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:53 -0700 Message-Id: <1629306834-6277-13-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 12/13] app/test: replace .sh scripts with .py scripts 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 Sender: "dev" - Add python scripts to get coremask and check hugepage config - Remove two corresponding .sh scripts - Replace calling of .sh with corresponding .py in meson.build Signed-off-by: Jie Zhou --- app/test/get-coremask.sh | 13 ------------- app/test/get_coremask.py | 8 ++++++++ app/test/has-hugepage.sh | 11 ----------- app/test/has_hugepage.py | 41 ++++++++++++++++++++++++++++++++++++++++ app/test/meson.build | 7 ++++--- 5 files changed, 53 insertions(+), 27 deletions(-) delete mode 100755 app/test/get-coremask.sh create mode 100644 app/test/get_coremask.py delete mode 100755 app/test/has-hugepage.sh create mode 100644 app/test/has_hugepage.py diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh deleted file mode 100755 index bb8cf404d2..0000000000 --- a/app/test/get-coremask.sh +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/sh -e -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2019 Intel Corporation - -if [ "$(uname)" = "Linux" ] ; then - cat /sys/devices/system/cpu/present -elif [ "$(uname)" = "FreeBSD" ] ; then - ncpus=$(/sbin/sysctl -n hw.ncpu) - echo 0-$(expr $ncpus - 1) -else -# fallback - echo 0-3 -fi diff --git a/app/test/get_coremask.py b/app/test/get_coremask.py new file mode 100644 index 0000000000..3d0947e8ff --- /dev/null +++ b/app/test/get_coremask.py @@ -0,0 +1,8 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) 2021 Microsoft Corporation + +import multiprocessing + +c = multiprocessing.cpu_count() +print("0-"+str(c-1)) diff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh deleted file mode 100755 index d600fad319..0000000000 --- a/app/test/has-hugepage.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2020 Mellanox Technologies, Ltd - -if [ "$(uname)" = "Linux" ] ; then - cat /proc/sys/vm/nr_hugepages || echo 0 -elif [ "$(uname)" = "FreeBSD" ] ; then - echo 1 # assume FreeBSD always has hugepages -else - echo 0 -fi diff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py new file mode 100644 index 0000000000..decf47df45 --- /dev/null +++ b/app/test/has_hugepage.py @@ -0,0 +1,41 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) 2021 Microsoft Corporation + +import os +import platform + +osName = platform.system() +if osName == "Linux": + file_o=open("/proc/sys/vm/nr_hugepages") + content=file_o.read() + print(content) + file_o.close() +elif osName == "FreeBSD": + # Assume FreeBSD always has hugepages enabled + print("1") +elif osName == "Windows": + # On Windows, check if the Administrator has "Lock pages in memory" security setting + # to determine if large page is enabled or not + + # Export the USER_RIGHTS security settings + # Use os.popen instead of os.system to suppress the output of secedit to stdout + userRightsfile = "userrights.inf" + os.popen('secedit /export /areas USER_RIGHTS /cfg "' + userRightsfile + '"') + + # Parse the exported user rights setting to determine if Administrator + # SeLockMemoryPrivilege being set or not + largepageEnabledStr = 'SeLockMemoryPrivilege = Administrator' + enabled = 0 + # On different OS versions tested, the exported inf file has utf-16 encoding + with open(userRightsfile, encoding = 'utf-16') as f: + urcontent = f.readlines() + for line in urcontent: + if largepageEnabledStr in line: + enabled = 1 + break + + f.close() + print(enabled) +else: + print("0") diff --git a/app/test/meson.build b/app/test/meson.build index a7611686ad..7240304916 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -450,7 +450,7 @@ dpdk_test = executable('dpdk-test', driver_install_path), install: true) -has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0' +has_hugepage = run_command('has_hugepage.py').stdout().strip() != '0' message('hugepage availability: @0@'.format(has_hugepage)) # some perf tests (eg: memcpy perf autotest)take very long @@ -458,8 +458,9 @@ message('hugepage availability: @0@'.format(has_hugepage)) timeout_seconds = 600 timeout_seconds_fast = 10 -get_coremask = find_program('get-coremask.sh') -num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip() +list_of_cores = run_command('get_coremask.py').stdout().strip() +message('list of cores: @0@'.format(list_of_cores)) +num_cores_arg = '-l ' + list_of_cores default_test_args = [num_cores_arg] From patchwork Wed Aug 18 17:13:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97079 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9AC8AA0C4C; Wed, 18 Aug 2021 19:15:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA81B41241; Wed, 18 Aug 2021 19:14:16 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 92425411DD for ; Wed, 18 Aug 2021 19:14:00 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id E416920C3393; Wed, 18 Aug 2021 10:13:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E416920C3393 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629306839; bh=97jxaarqdo+PwJ9ZQv0vu3KypLYdRSAOKkkvwhyGGIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dRVE9JnKTG2vAFmEC2B3wFLjJlnLPe5XOf6K/KJ2lJiOCUwFaAjo3ireNaY2HUrxa RWccPwBqNR1sUo+QrisVUBrl/mHAxA2oKgmis2EJpCzEPJrt8HpmhtYiKBNdj4N4A9 izWvAYZUIKtN94Thaab7q5IGI7rZKvxsICiMgWUQ= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, roretzla@microsoft.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net, aconole@redhat.com Date: Wed, 18 Aug 2021 10:13:54 -0700 Message-Id: <1629306834-6277-14-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> References: <1629267476-901-1-git-send-email-jizh@linux.microsoft.com> <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v2 13/13] app/test: enable subset of unit tests on Windows 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 Sender: "dev" In app/test/meson.build - Specify the subset of source files to compile on Windows - Specify the subset of tests to be enabled on Windows Signed-off-by: Jie Zhou --- app/test/meson.build | 859 ++++++++++++++++++++++++++----------------- 1 file changed, 515 insertions(+), 344 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 7240304916..1e77657510 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -1,353 +1,524 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - if not get_option('tests') subdir_done() endif -test_sources = files( - 'commands.c', - 'packet_burst_generator.c', - 'test.c', - 'test_acl.c', - 'test_alarm.c', - 'test_atomic.c', - 'test_barrier.c', - 'test_bitops.c', - 'test_bitmap.c', - 'test_bpf.c', - 'test_byteorder.c', - 'test_cksum.c', - 'test_cmdline.c', - 'test_cmdline_cirbuf.c', - 'test_cmdline_etheraddr.c', - 'test_cmdline_ipaddr.c', - 'test_cmdline_lib.c', - 'test_cmdline_num.c', - 'test_cmdline_portlist.c', - 'test_cmdline_string.c', - 'test_common.c', - 'test_cpuflags.c', - 'test_crc.c', - 'test_cryptodev.c', - 'test_cryptodev_asym.c', - 'test_cryptodev_blockcipher.c', - 'test_cryptodev_security_pdcp.c', - 'test_cycles.c', - 'test_debug.c', - 'test_distributor.c', - 'test_distributor_perf.c', - 'test_eal_flags.c', - 'test_eal_fs.c', - 'test_efd.c', - 'test_efd_perf.c', - 'test_errno.c', - 'test_ethdev_link.c', - 'test_event_crypto_adapter.c', - 'test_event_eth_rx_adapter.c', - 'test_event_ring.c', - 'test_event_timer_adapter.c', - 'test_eventdev.c', - 'test_external_mem.c', - 'test_fbarray.c', - 'test_fib.c', - 'test_fib_perf.c', - 'test_fib6.c', - 'test_fib6_perf.c', - 'test_func_reentrancy.c', - 'test_flow_classify.c', - 'test_graph.c', - 'test_graph_perf.c', - 'test_hash.c', - 'test_hash_functions.c', - 'test_hash_multiwriter.c', - 'test_hash_readwrite.c', - 'test_hash_perf.c', - 'test_hash_readwrite_lf_perf.c', - 'test_interrupts.c', - 'test_ipfrag.c', - 'test_ipsec.c', - 'test_ipsec_sad.c', - 'test_ipsec_perf.c', - 'test_kni.c', - 'test_kvargs.c', - 'test_lcores.c', - 'test_logs.c', - 'test_lpm.c', - 'test_lpm6.c', - 'test_lpm6_perf.c', - 'test_lpm_perf.c', - 'test_malloc.c', - 'test_mbuf.c', - 'test_member.c', - 'test_member_perf.c', - 'test_memcpy.c', - 'test_memcpy_perf.c', - 'test_memory.c', - 'test_mempool.c', - 'test_mempool_perf.c', - 'test_memzone.c', - 'test_meter.c', - 'test_metrics.c', - 'test_mcslock.c', - 'test_mp_secondary.c', - 'test_per_lcore.c', - 'test_pflock.c', - 'test_pmd_perf.c', - 'test_power.c', - 'test_power_cpufreq.c', - 'test_power_kvm_vm.c', - 'test_prefetch.c', - 'test_rand_perf.c', - 'test_rawdev.c', - 'test_rcu_qsbr.c', - 'test_rcu_qsbr_perf.c', - 'test_reciprocal_division.c', - 'test_reciprocal_division_perf.c', - 'test_red.c', - 'test_reorder.c', - 'test_rib.c', - 'test_rib6.c', - 'test_ring.c', - 'test_ring_mpmc_stress.c', - 'test_ring_hts_stress.c', - 'test_ring_mt_peek_stress.c', - 'test_ring_mt_peek_stress_zc.c', - 'test_ring_perf.c', - 'test_ring_rts_stress.c', - 'test_ring_st_peek_stress.c', - 'test_ring_st_peek_stress_zc.c', - 'test_ring_stress.c', - 'test_rwlock.c', - 'test_sched.c', - 'test_security.c', - 'test_service_cores.c', - 'test_spinlock.c', - 'test_stack.c', - 'test_stack_perf.c', - 'test_string_fns.c', - 'test_table.c', - 'test_table_acl.c', - 'test_table_combined.c', - 'test_table_pipeline.c', - 'test_table_ports.c', - 'test_table_tables.c', - 'test_tailq.c', - 'test_thash.c', - 'test_timer.c', - 'test_timer_perf.c', - 'test_timer_racecond.c', - 'test_timer_secondary.c', - 'test_ticketlock.c', - 'test_trace.c', - 'test_trace_register.c', - 'test_trace_perf.c', - 'test_version.c', - 'virtual_pmd.c', -) - -test_deps = [ - 'acl', - 'bus_pci', - 'bus_vdev', - 'bitratestats', - 'bpf', - 'cfgfile', - 'cmdline', - 'cryptodev', - 'distributor', - 'efd', - 'ethdev', - 'eventdev', - 'fib', - 'flow_classify', - 'graph', - 'hash', - 'ipsec', - 'latencystats', - 'lpm', - 'member', - 'metrics', - 'node', - 'pipeline', - 'port', - 'rawdev', - 'rcu', - 'reorder', - 'rib', - 'ring', - 'security', - 'stack', - 'telemetry', - 'timer', -] - -# Each test is marked with flag true/false -# to indicate whether it can run in no-huge mode. -fast_tests = [ - ['acl_autotest', true], - ['atomic_autotest', false], - ['bitops_autotest', true], - ['byteorder_autotest', true], - ['cksum_autotest', true], - ['cmdline_autotest', true], - ['common_autotest', true], - ['cpuflags_autotest', true], - ['debug_autotest', true], - ['eal_flags_c_opt_autotest', false], - ['eal_flags_main_opt_autotest', false], - ['eal_flags_n_opt_autotest', false], - ['eal_flags_hpet_autotest', false], - ['eal_flags_no_huge_autotest', false], - ['eal_flags_a_opt_autotest', false], - ['eal_flags_b_opt_autotest', false], - ['eal_flags_vdev_opt_autotest', false], - ['eal_flags_r_opt_autotest', false], - ['eal_flags_mem_autotest', false], - ['eal_flags_file_prefix_autotest', false], - ['eal_flags_misc_autotest', false], - ['eal_fs_autotest', true], - ['errno_autotest', true], - ['ethdev_link_status', true], - ['event_ring_autotest', true], - ['fib_autotest', true], - ['fib6_autotest', true], - ['func_reentrancy_autotest', false], - ['flow_classify_autotest', false], - ['hash_autotest', true], - ['interrupt_autotest', true], - ['ipfrag_autotest', false], - ['lcores_autotest', true], - ['logs_autotest', true], - ['lpm_autotest', true], - ['lpm6_autotest', true], - ['malloc_autotest', false], - ['mbuf_autotest', false], - ['mcslock_autotest', false], - ['memcpy_autotest', true], - ['memory_autotest', false], - ['mempool_autotest', false], - ['memzone_autotest', false], - ['meter_autotest', true], - ['multiprocess_autotest', false], - ['per_lcore_autotest', true], - ['pflock_autotest', true], - ['prefetch_autotest', true], - ['rcu_qsbr_autotest', true], - ['red_autotest', true], - ['rib_autotest', true], - ['rib6_autotest', true], - ['ring_autotest', true], - ['rwlock_test1_autotest', true], - ['rwlock_rda_autotest', true], - ['rwlock_rds_wrm_autotest', true], - ['rwlock_rde_wro_autotest', true], - ['sched_autotest', true], - ['security_autotest', false], - ['spinlock_autotest', true], - ['stack_autotest', false], - ['stack_lf_autotest', false], - ['string_autotest', true], - ['table_autotest', true], - ['tailq_autotest', true], - ['ticketlock_autotest', true], - ['timer_autotest', false], - ['user_delay_us', true], - ['version_autotest', true], - ['crc_autotest', true], - ['distributor_autotest', false], - ['eventdev_common_autotest', true], - ['fbarray_autotest', true], - ['hash_readwrite_func_autotest', false], - ['ipsec_autotest', true], - ['kni_autotest', false], - ['kvargs_autotest', true], - ['member_autotest', true], - ['metrics_autotest', true], - ['power_cpufreq_autotest', false], - ['power_autotest', true], - ['power_kvm_vm_autotest', false], - ['reorder_autotest', true], - ['service_autotest', true], - ['thash_autotest', true], - ['trace_autotest', true], -] - -perf_test_names = [ - 'ring_perf_autotest', - 'mempool_perf_autotest', - 'memcpy_perf_autotest', - 'hash_perf_autotest', - 'timer_perf_autotest', - 'reciprocal_division', - 'reciprocal_division_perf', - 'lpm_perf_autotest', - 'rib_slow_autotest', - 'fib_slow_autotest', - 'fib_perf_autotest', - 'red_all', - 'barrier_autotest', - 'hash_multiwriter_autotest', - 'timer_racecond_autotest', - 'efd_autotest', - 'hash_functions_autotest', - 'member_perf_autotest', - 'efd_perf_autotest', - 'lpm6_perf_autotest', - 'rib6_slow_autotest', - 'fib6_slow_autotest', - 'fib6_perf_autotest', - 'rcu_qsbr_perf_autotest', - 'red_perf', - 'distributor_perf_autotest', - 'pmd_perf_autotest', - 'stack_perf_autotest', - 'stack_lf_perf_autotest', - 'rand_perf_autotest', - 'hash_readwrite_perf_autotest', - 'hash_readwrite_lf_perf_autotest', - 'trace_perf_autotest', - 'ipsec_perf_autotest', -] - -driver_test_names = [ - 'cryptodev_aesni_mb_autotest', - 'cryptodev_aesni_gcm_autotest', - 'cryptodev_cn9k_autotest', - 'cryptodev_cn10k_autotest', - 'cryptodev_dpaa_sec_autotest', - 'cryptodev_dpaa2_sec_autotest', - 'cryptodev_null_autotest', - 'cryptodev_octeontx2_autotest', - 'cryptodev_openssl_autotest', - 'cryptodev_openssl_asym_autotest', - 'cryptodev_qat_autotest', - 'cryptodev_sw_armv8_autotest', - 'cryptodev_sw_kasumi_autotest', - 'cryptodev_sw_mvsam_autotest', - 'cryptodev_sw_snow3g_autotest', - 'cryptodev_sw_zuc_autotest', - 'eventdev_selftest_octeontx', - 'eventdev_selftest_sw', - 'rawdev_autotest', -] - -dump_test_names = [ - 'dump_struct_sizes', - 'dump_mempool', - 'dump_malloc_stats', - 'dump_devargs', - 'dump_log_types', - 'dump_ring', - 'dump_physmem', - 'dump_memzone', -] +if is_windows + test_sources = files('commands.c', + 'packet_burst_generator.c', + 'test.c', + 'test_alarm.c', + 'test_atomic.c', + 'test_barrier.c', + 'test_bitops.c', + 'test_bitmap.c', + 'test_byteorder.c', + 'test_cmdline.c', + 'test_cmdline_cirbuf.c', + 'test_cmdline_etheraddr.c', + 'test_cmdline_lib.c', + 'test_cmdline_num.c', + 'test_cmdline_portlist.c', + 'test_cmdline_string.c', + 'test_common.c', + 'test_cpuflags.c', + 'test_crc.c', + 'test_cycles.c', + 'test_errno.c', + 'test_ethdev_link.c', + 'test_fbarray.c', + 'test_func_reentrancy.c', + 'test_hash.c', + 'test_hash_functions.c', + 'test_hash_multiwriter.c', + 'test_hash_readwrite.c', + 'test_hash_readwrite_lf_perf.c', + 'test_interrupts.c', + 'test_kvargs.c', + 'test_logs.c', + 'test_lpm.c', + 'test_memcpy.c', + 'test_memory.c', + 'test_mempool.c', + 'test_mempool_perf.c', + 'test_memzone.c', + 'test_meter.c', + 'test_metrics.c', + 'test_mcslock.c', + 'test_per_lcore.c', + 'test_pmd_perf.c', + 'test_power.c', + 'test_power_cpufreq.c', + 'test_power_kvm_vm.c', + 'test_prefetch.c', + 'test_rand_perf.c', + 'test_rcu_qsbr.c', + 'test_rcu_qsbr_perf.c', + 'test_reorder.c', + 'test_rib.c', + 'test_rib6.c', + 'test_ring.c', + 'test_ring_mpmc_stress.c', + 'test_ring_mt_peek_stress.c', + 'test_ring_mt_peek_stress_zc.c', + 'test_ring_perf.c', + 'test_ring_rts_stress.c', + 'test_ring_st_peek_stress.c', + 'test_ring_st_peek_stress_zc.c', + 'test_ring_stress.c', + 'test_rwlock.c', + 'test_service_cores.c', + 'test_spinlock.c', + 'test_stack.c', + 'test_stack_perf.c', + 'test_string_fns.c', + 'test_tailq.c', + 'test_thash.c', + 'test_timer.c', + 'test_timer_perf.c', + 'test_timer_racecond.c', + 'test_ticketlock.c', + 'test_trace_register.c', + 'test_trace_perf.c', + 'test_version.c', + 'virtual_pmd.c' + ) + + test_deps = [ + 'bus_pci', + 'bus_vdev', + 'bitratestats', + 'cfgfile', + 'cmdline', + 'efd', + 'ethdev', + 'hash', + 'latencystats', + 'lpm', + 'metrics', + 'rcu', + 'reorder', + 'rib', + 'ring', + 'stack', + 'telemetry', + 'timer', + ] + + # Each test is marked with flag true/false + # to indicate whether it can run in no-huge mode. + fast_tests = [ + ['alarm_autotest', true], + ['bitops_autotest', true], + ['byteorder_autotest', true], + ['cmdline_autotest', true], + ['common_autotest', true], + ['cpuflags_autotest', true], + ['errno_autotest', true], + ['ethdev_link_status', true], + ['hash_autotest', true], + ['interrupt_autotest', true], + ['logs_autotest', true], + ['lpm_autotest', true], + ['mcslock_autotest', false], + ['memory_autotest', false], + ['mempool_autotest', false], + ['memzone_autotest', false], + ['meter_autotest', true], + ['per_lcore_autotest', true], + ['prefetch_autotest', true], + ['rcu_qsbr_autotest', true], + ['rib_autotest', true], + ['rib6_autotest', true], + ['ring_autotest', true], + ['rwlock_test1_autotest', true], + ['rwlock_rda_autotest', true], + ['rwlock_rds_wrm_autotest', true], + ['rwlock_rde_wro_autotest', true], + ['spinlock_autotest', true], + ['stack_autotest', false], + ['stack_lf_autotest', false], + ['string_autotest', true], + ['tailq_autotest', true], + ['ticketlock_autotest', true], + ['user_delay_us', true], + ['version_autotest', true], + ['crc_autotest', true], + ['fbarray_autotest', true], + ['hash_readwrite_func_autotest', false], + ['kvargs_autotest', true], + ['metrics_autotest', true], + ['reorder_autotest', true], + ['service_autotest', true], + ['thash_autotest', true], + ] + + perf_test_names = [ + 'atomic_autotest', + 'memcpy_autotest', + 'ring_perf_autotest', + 'timer_autotest', + 'timer_perf_autotest', + 'rib_slow_autotest', + 'barrier_autotest', + 'hash_multiwriter_autotest', + 'timer_racecond_autotest', + 'hash_functions_autotest', + 'pmd_perf_autotest', + 'stack_perf_autotest', + 'stack_lf_perf_autotest', + 'rand_perf_autotest', + 'hash_readwrite_perf_autotest', + 'hash_readwrite_lf_perf_autotest', + 'trace_perf_autotest', + ] + + driver_test_names = [ + ] + + dump_test_names = [ + ] +else + test_sources = files( + 'commands.c', + 'packet_burst_generator.c', + 'test.c', + 'test_acl.c', + 'test_alarm.c', + 'test_atomic.c', + 'test_barrier.c', + 'test_bitops.c', + 'test_bitmap.c', + 'test_bpf.c', + 'test_byteorder.c', + 'test_cksum.c', + 'test_cmdline.c', + 'test_cmdline_cirbuf.c', + 'test_cmdline_etheraddr.c', + 'test_cmdline_ipaddr.c', + 'test_cmdline_lib.c', + 'test_cmdline_num.c', + 'test_cmdline_portlist.c', + 'test_cmdline_string.c', + 'test_common.c', + 'test_cpuflags.c', + 'test_crc.c', + 'test_cryptodev.c', + 'test_cryptodev_asym.c', + 'test_cryptodev_blockcipher.c', + 'test_cryptodev_security_pdcp.c', + 'test_cycles.c', + 'test_debug.c', + 'test_distributor.c', + 'test_distributor_perf.c', + 'test_eal_flags.c', + 'test_eal_fs.c', + 'test_efd.c', + 'test_efd_perf.c', + 'test_errno.c', + 'test_ethdev_link.c', + 'test_event_crypto_adapter.c', + 'test_event_eth_rx_adapter.c', + 'test_event_ring.c', + 'test_event_timer_adapter.c', + 'test_eventdev.c', + 'test_external_mem.c', + 'test_fbarray.c', + 'test_fib.c', + 'test_fib_perf.c', + 'test_fib6.c', + 'test_fib6_perf.c', + 'test_func_reentrancy.c', + 'test_flow_classify.c', + 'test_graph.c', + 'test_graph_perf.c', + 'test_hash.c', + 'test_hash_functions.c', + 'test_hash_multiwriter.c', + 'test_hash_readwrite.c', + 'test_hash_perf.c', + 'test_hash_readwrite_lf_perf.c', + 'test_interrupts.c', + 'test_ipfrag.c', + 'test_ipsec.c', + 'test_ipsec_sad.c', + 'test_ipsec_perf.c', + 'test_kni.c', + 'test_kvargs.c', + 'test_lcores.c', + 'test_logs.c', + 'test_lpm.c', + 'test_lpm6.c', + 'test_lpm6_perf.c', + 'test_lpm_perf.c', + 'test_malloc.c', + 'test_mbuf.c', + 'test_member.c', + 'test_member_perf.c', + 'test_memcpy.c', + 'test_memcpy_perf.c', + 'test_memory.c', + 'test_mempool.c', + 'test_mempool_perf.c', + 'test_memzone.c', + 'test_meter.c', + 'test_metrics.c', + 'test_mcslock.c', + 'test_mp_secondary.c', + 'test_per_lcore.c', + 'test_pflock.c', + 'test_pmd_perf.c', + 'test_power.c', + 'test_power_cpufreq.c', + 'test_power_kvm_vm.c', + 'test_prefetch.c', + 'test_rand_perf.c', + 'test_rawdev.c', + 'test_rcu_qsbr.c', + 'test_rcu_qsbr_perf.c', + 'test_reciprocal_division.c', + 'test_reciprocal_division_perf.c', + 'test_red.c', + 'test_reorder.c', + 'test_rib.c', + 'test_rib6.c', + 'test_ring.c', + 'test_ring_mpmc_stress.c', + 'test_ring_hts_stress.c', + 'test_ring_mt_peek_stress.c', + 'test_ring_mt_peek_stress_zc.c', + 'test_ring_perf.c', + 'test_ring_rts_stress.c', + 'test_ring_st_peek_stress.c', + 'test_ring_st_peek_stress_zc.c', + 'test_ring_stress.c', + 'test_rwlock.c', + 'test_sched.c', + 'test_security.c', + 'test_service_cores.c', + 'test_spinlock.c', + 'test_stack.c', + 'test_stack_perf.c', + 'test_string_fns.c', + 'test_table.c', + 'test_table_acl.c', + 'test_table_combined.c', + 'test_table_pipeline.c', + 'test_table_ports.c', + 'test_table_tables.c', + 'test_tailq.c', + 'test_thash.c', + 'test_timer.c', + 'test_timer_perf.c', + 'test_timer_racecond.c', + 'test_timer_secondary.c', + 'test_ticketlock.c', + 'test_trace.c', + 'test_trace_register.c', + 'test_trace_perf.c', + 'test_version.c', + 'virtual_pmd.c', + ) + + test_deps = [ + 'acl', + 'bus_pci', + 'bus_vdev', + 'bitratestats', + 'bpf', + 'cfgfile', + 'cmdline', + 'cryptodev', + 'distributor', + 'efd', + 'ethdev', + 'eventdev', + 'fib', + 'flow_classify', + 'graph', + 'hash', + 'ipsec', + 'latencystats', + 'lpm', + 'member', + 'metrics', + 'node', + 'pipeline', + 'port', + 'rawdev', + 'rcu', + 'reorder', + 'rib', + 'ring', + 'security', + 'stack', + 'telemetry', + 'timer', + ] + + # Each test is marked with flag true/false + # to indicate whether it can run in no-huge mode. + fast_tests = [ + ['acl_autotest', true], + ['atomic_autotest', false], + ['bitops_autotest', true], + ['byteorder_autotest', true], + ['cksum_autotest', true], + ['cmdline_autotest', true], + ['common_autotest', true], + ['cpuflags_autotest', true], + ['debug_autotest', true], + ['eal_flags_c_opt_autotest', false], + ['eal_flags_main_opt_autotest', false], + ['eal_flags_n_opt_autotest', false], + ['eal_flags_hpet_autotest', false], + ['eal_flags_no_huge_autotest', false], + ['eal_flags_a_opt_autotest', false], + ['eal_flags_b_opt_autotest', false], + ['eal_flags_vdev_opt_autotest', false], + ['eal_flags_r_opt_autotest', false], + ['eal_flags_mem_autotest', false], + ['eal_flags_file_prefix_autotest', false], + ['eal_flags_misc_autotest', false], + ['eal_fs_autotest', true], + ['errno_autotest', true], + ['ethdev_link_status', true], + ['event_ring_autotest', true], + ['fib_autotest', true], + ['fib6_autotest', true], + ['func_reentrancy_autotest', false], + ['flow_classify_autotest', false], + ['hash_autotest', true], + ['interrupt_autotest', true], + ['ipfrag_autotest', false], + ['lcores_autotest', true], + ['logs_autotest', true], + ['lpm_autotest', true], + ['lpm6_autotest', true], + ['malloc_autotest', false], + ['mbuf_autotest', false], + ['mcslock_autotest', false], + ['memcpy_autotest', true], + ['memory_autotest', false], + ['mempool_autotest', false], + ['memzone_autotest', false], + ['meter_autotest', true], + ['multiprocess_autotest', false], + ['per_lcore_autotest', true], + ['pflock_autotest', true], + ['prefetch_autotest', true], + ['rcu_qsbr_autotest', true], + ['red_autotest', true], + ['rib_autotest', true], + ['rib6_autotest', true], + ['ring_autotest', true], + ['rwlock_test1_autotest', true], + ['rwlock_rda_autotest', true], + ['rwlock_rds_wrm_autotest', true], + ['rwlock_rde_wro_autotest', true], + ['sched_autotest', true], + ['security_autotest', false], + ['spinlock_autotest', true], + ['stack_autotest', false], + ['stack_lf_autotest', false], + ['string_autotest', true], + ['table_autotest', true], + ['tailq_autotest', true], + ['ticketlock_autotest', true], + ['timer_autotest', false], + ['user_delay_us', true], + ['version_autotest', true], + ['crc_autotest', true], + ['distributor_autotest', false], + ['eventdev_common_autotest', true], + ['fbarray_autotest', true], + ['hash_readwrite_func_autotest', false], + ['ipsec_autotest', true], + ['kni_autotest', false], + ['kvargs_autotest', true], + ['member_autotest', true], + ['metrics_autotest', true], + ['power_cpufreq_autotest', false], + ['power_autotest', true], + ['power_kvm_vm_autotest', false], + ['reorder_autotest', true], + ['service_autotest', true], + ['thash_autotest', true], + ['trace_autotest', true], + ] + + perf_test_names = [ + 'ring_perf_autotest', + 'mempool_perf_autotest', + 'memcpy_perf_autotest', + 'hash_perf_autotest', + 'timer_perf_autotest', + 'reciprocal_division', + 'reciprocal_division_perf', + 'lpm_perf_autotest', + 'rib_slow_autotest', + 'fib_slow_autotest', + 'fib_perf_autotest', + 'red_all', + 'barrier_autotest', + 'hash_multiwriter_autotest', + 'timer_racecond_autotest', + 'efd_autotest', + 'hash_functions_autotest', + 'member_perf_autotest', + 'efd_perf_autotest', + 'lpm6_perf_autotest', + 'rib6_slow_autotest', + 'fib6_slow_autotest', + 'fib6_perf_autotest', + 'rcu_qsbr_perf_autotest', + 'red_perf', + 'distributor_perf_autotest', + 'pmd_perf_autotest', + 'stack_perf_autotest', + 'stack_lf_perf_autotest', + 'rand_perf_autotest', + 'hash_readwrite_perf_autotest', + 'hash_readwrite_lf_perf_autotest', + 'trace_perf_autotest', + 'ipsec_perf_autotest', + ] + + driver_test_names = [ + 'cryptodev_aesni_mb_autotest', + 'cryptodev_aesni_gcm_autotest', + 'cryptodev_cn9k_autotest', + 'cryptodev_cn10k_autotest', + 'cryptodev_dpaa_sec_autotest', + 'cryptodev_dpaa2_sec_autotest', + 'cryptodev_null_autotest', + 'cryptodev_octeontx2_autotest', + 'cryptodev_openssl_autotest', + 'cryptodev_openssl_asym_autotest', + 'cryptodev_qat_autotest', + 'cryptodev_sw_armv8_autotest', + 'cryptodev_sw_kasumi_autotest', + 'cryptodev_sw_mvsam_autotest', + 'cryptodev_sw_snow3g_autotest', + 'cryptodev_sw_zuc_autotest', + 'eventdev_selftest_octeontx', + 'eventdev_selftest_sw', + 'rawdev_autotest', + ] + + dump_test_names = [ + 'dump_struct_sizes', + 'dump_mempool', + 'dump_malloc_stats', + 'dump_devargs', + 'dump_log_types', + 'dump_ring', + 'dump_physmem', + 'dump_memzone', + ] +endif # The following linkages are an exception to allow running the # unit tests without requiring that the developer install the @@ -362,7 +533,7 @@ endif if dpdk_conf.has('RTE_EVENT_SKELETON') test_deps += 'event_skeleton' endif -if dpdk_conf.has('RTE_LIB_TELEMETRY') +if not(is_windows) and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]] endif