From patchwork Sat Sep 4 04:19:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97966 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 60AB9A0C45; Sat, 4 Sep 2021 06:19:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F54F41101; Sat, 4 Sep 2021 06:19:25 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9706040E78 for ; Sat, 4 Sep 2021 06:19:21 +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 860A620BBF6C; Fri, 3 Sep 2021 21:19:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 860A620BBF6C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729160; bh=xHIDLve0a8QPXazIbPljyXDTTS5tWiEyuHtM3+3X4a8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bw5Qt431szFVNM0lzdeIELuJRoYZ58R4n64/UN1cuXmS1SHv4o4SvX5l2iy17xvv+ azWncdap3JRtextTc2y3KaeXpOxyKtZJPbY9ohTtrnZY/ILLBxxl0FjvUJn/PyMemL BgEIxEBtvMeIGFHWhc8ArmVJsL+wWNB0fRYOkJxE= 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: Fri, 3 Sep 2021 21:19:03 -0700 Message-Id: <1630729155-24584-2-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97964 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 A84C2A0C45; Sat, 4 Sep 2021 06:19:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3AD5440DDD; Sat, 4 Sep 2021 06:19:23 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7EB4C40DDD for ; Sat, 4 Sep 2021 06:19:21 +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 9BF4320BD01E; Fri, 3 Sep 2021 21:19:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9BF4320BD01E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729160; bh=+HJAbDZj+YTHWu5fs67/aP5J989V9e49g31rXQhXSP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WhTRpaBxO5D7eFYo349wK4ZppxJ9yKBbrlZmtEfNDXySPpwue4xXCMahqGMd/rxWl b8JaMH4FXus6oimNFaVu8ievIHsV4cGQ8fno9Lqj/QZWPPAikA1qbb50RSi1+ZFXMJ qrhukTELzfdhgyZE01/ba4t9YjezO2NKKobRopNs= 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: Fri, 3 Sep 2021 21:19:04 -0700 Message-Id: <1630729155-24584-3-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 02/13] mempool/stack: build 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" Enable mempool/stack on Windows since mempool unit test depends on this driver. 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 Sat Sep 4 04:19:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97965 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 6D420A0C45; Sat, 4 Sep 2021 06:19:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77EE8410F6; Sat, 4 Sep 2021 06:19:24 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 91B8840E3C for ; Sat, 4 Sep 2021 06:19:21 +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 B157E20B03B0; Fri, 3 Sep 2021 21:19:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B157E20B03B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729160; bh=CMBhMgdsGFgsWnxaA7gRFenqIAWAVYzood61wf9pYpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EzNj6ncg8/q2c7d4U4HU6oHJwgnivuTTouGx6oiZDhAXPwrjjfY2v67sooRmCAJSk OZYYCzzbbzjAtArHR9iu6buRKeb/4HNgkS/UwdrYxmvPp5j8eyHY+bYnRBq+HEYROn KS+5rbI9SlViV9aP3kqOXgBntp+0Vtv7tH70NwBU= 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: Fri, 3 Sep 2021 21:19:05 -0700 Message-Id: <1630729155-24584-4-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97968 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 75532A0C45; Sat, 4 Sep 2021 06:19:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B4FF41123; Sat, 4 Sep 2021 06:19:28 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A1B1F40FDF for ; Sat, 4 Sep 2021 06:19:21 +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 C6F7820B03B1; Fri, 3 Sep 2021 21:19:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C6F7820B03B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729160; bh=bMCGI+2ZuBkATl/JRU+4XtzimLV0+HyR3rM/r7xqgW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=axhSuh279VUfYQ4zG4YzzddbT97zWC61hyLtfDlg++t9jlvmX+Jmy81mxm0e9Ea5T G4+PeHtalCLHn5vNQWHNSVnmgC4z08pYFv/5Z2r8tWraJCKqSSdE2evP2PEucWBp4n ycahN5K09UR+DVC4ML/K/jCOvECcko2gFfCFNlqc= 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: Fri, 3 Sep 2021 21:19:06 -0700 Message-Id: <1630729155-24584-5-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97972 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 DB677A0C45; Sat, 4 Sep 2021 06:20:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BEC241145; Sat, 4 Sep 2021 06:19:32 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 424BE4067E for ; Sat, 4 Sep 2021 06:19:22 +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 DC42920B03B2; Fri, 3 Sep 2021 21:19:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DC42920B03B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729160; bh=LoYjurWVbdyOFVZ6NarAwNIoqZuc/m1U1nj9szb1gJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b6z6QQejKaupdBZ1x2EpEQL8+oySZxAYQntR+2RTSUMcvCHojJY6TvNQNQhptGUPs qoA4qwtjKEe4htu7U5A7OxLltbevjFM44NIe0p/7bN1ExVVVy9Dq0iSIzsFauoq8aZ zuhugbAS7OHWVEuDkbdc+A5lefeaQk8lAxyKLUaE= 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: Fri, 3 Sep 2021 21:19:07 -0700 Message-Id: <1630729155-24584-6-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97969 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 20517A0C45; Sat, 4 Sep 2021 06:19:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FB6C41135; Sat, 4 Sep 2021 06:19:29 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 44C4040DDD for ; Sat, 4 Sep 2021 06:19:22 +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 F18B220B03B7; Fri, 3 Sep 2021 21:19:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F18B220B03B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729161; bh=KR7sjeooyf1knREaQULSDoZRcOc2rvkvtNP38O2vq6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OiJDG4MXgTh+u0PAroykPUSaWlZgF579pTchk7fEWnAprABRPxs9IG11kk3TJc01F b5ovXXYZCiJ8/nxHmh3KSfPPPy8WziaPLqB4rUYC3+EIJ7C6dxHyQ/TOmhDngV4tFz ZeOhawrhK4+wdhH3Twfxvf01la0uPgDDSf35jFOI= 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: Fri, 3 Sep 2021 21:19:08 -0700 Message-Id: <1630729155-24584-7-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97971 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 1B296A0C45; Sat, 4 Sep 2021 06:20:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86B1A41141; Sat, 4 Sep 2021 06:19:31 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 583F640E78 for ; Sat, 4 Sep 2021 06:19:22 +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 1390220BE4A0; Fri, 3 Sep 2021 21:19:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1390220BE4A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729161; bh=Rsb5V5+7h0JtOMsLmSBW3Tu3JkclarPpaGVZJ1VN4F4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jq9urO8/mllItldgOt1iid9qssJm0aF/1CDiqPu+Ct1ANVLgT5y+Jl3WZahVagVqF Rq6dOz/QDrk9QYJ0e+nPOC9Ndfg3gsWK5234MfJeWu0fUM1bMlafk78sX42Hue4Zvx zl7Kv/fuDdxCQjVKQvgWayX6x8WABohzMtrqyI7Y= 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: Fri, 3 Sep 2021 21:19:09 -0700 Message-Id: <1630729155-24584-8-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97970 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 E2C29A0C45; Sat, 4 Sep 2021 06:19:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5AEFC4113C; Sat, 4 Sep 2021 06:19:30 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5761F40E3C for ; Sat, 4 Sep 2021 06:19:22 +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 2947F20BE4AC; Fri, 3 Sep 2021 21:19:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2947F20BE4AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729161; bh=v9U8t8Xl47T/4EzFv1x/Pk3Lr0GerWI4D5nLCNczUJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UZf8TwUUFBveoFpoqFS2dRA7G+yaqJmwHTmrHF+JdBYCcetXOwonYhEYJSscmf2Hi sPlvk6xPk9z2ZgD9SD6v6ECRcBYtJ9u3+kUrzSIGx6w6fvBzAlpo90TDbj9+F0TLfu asFWRaeJDJV6icAiq0LntWIGM2Re7B7DQSgLXWg8= 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: Fri, 3 Sep 2021 21:19:10 -0700 Message-Id: <1630729155-24584-9-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97973 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 7B14AA0C45; Sat, 4 Sep 2021 06:20:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D85C64114B; Sat, 4 Sep 2021 06:19:33 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 69A50410D8 for ; Sat, 4 Sep 2021 06:19:22 +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 3ED8A20BE4B4; Fri, 3 Sep 2021 21:19:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3ED8A20BE4B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729161; bh=Rt+uxw8CAfeYyUkGN8bkpLml2OIeF4aMAEGFxbnNavQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=egyZ2EQctaWy/p5AbbvzHWHXWa9ziU8XD5iO9N7xKxQYofZO3sESv8KRnZoLVI5U/ iLa7PshYEXXtE562uDXzCjYM39sxQSE3VyhCGBjQgyMNVduXTwf6xWO/IgrGjpQgLH YqYSAxpO73pCtTf3jU3Kvirx8+doJS/E3rCpE54Y= 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: Fri, 3 Sep 2021 21:19:11 -0700 Message-Id: <1630729155-24584-10-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97976 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 85B57A0C45; Sat, 4 Sep 2021 06:20:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5215E4115F; Sat, 4 Sep 2021 06:19:37 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7BD08410F2 for ; Sat, 4 Sep 2021 06:19:22 +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 543BF20BE526; Fri, 3 Sep 2021 21:19:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 543BF20BE526 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729161; bh=VYLH4NBv4NAU2SjeXbbOZkZFgZEebGzSYAwOMUwDVWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E4/Bp5VNtD48WKqrKWnZbLMfrtdbxm71BT4YSFJ1nEHUuoxi7jy7byaGZpVZevZV5 hQG9usZfnnLAZZgz3mQqApalHKSWX2w2ZPlMVLDZwxmLQo+uw2RA6sFAQwvqp20Aci VvWHszEyjf+oAczDsGhFQixJkO8GfZD/dr4BXx9U= 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: Fri, 3 Sep 2021 21:19:12 -0700 Message-Id: <1630729155-24584-11-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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..0db4fbc8b3 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*/ + static 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 Sat Sep 4 04:19:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97974 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 C7F26A0C45; Sat, 4 Sep 2021 06:20:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E37C941151; Sat, 4 Sep 2021 06:19:34 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6815940FDF for ; Sat, 4 Sep 2021 06:19:22 +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 6986320BE52A; Fri, 3 Sep 2021 21:19:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6986320BE52A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729161; bh=l0KOGdlOqkniobGBQzdhML6GnEFyjKhs0BmqNb1StDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CjB80JJma005/qNqW4B/pTn4IQVQiyOwTIerC3ObaLXe9yz0QC9jG/m9MHEpZnS73 IT/9SoGIPcO6mK3n5w8IeZdSG65dwNNEpH8qeFr381nX8LL3dRzzkz3NfofYMb4xR/ MaBk5jaWzQBj7cTBCkshRSc7mREVTF2FvWSGoCXw= 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: Fri, 3 Sep 2021 21:19:13 -0700 Message-Id: <1630729155-24584-12-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 Sat Sep 4 04:19:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97975 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 71CEEA0C45; Sat, 4 Sep 2021 06:20:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 036F941157; Sat, 4 Sep 2021 06:19:36 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6DD4A410E6 for ; Sat, 4 Sep 2021 06:19:22 +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 7EF4320BE52B; Fri, 3 Sep 2021 21:19:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7EF4320BE52B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729161; bh=zVJPWWcM2IVPHZB+/SShHnGsriE32jLrtrrS0sBhkyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UDlaawEfiV6spdwJ0mY5aqRPD07r7MajrLTA5jAElb9UluM6HHzmJ8kRRAllJP1xL frGPapOM8FUoe4d6/9rQuPU9DUW9ZXBlV6VqRLTjBReXDpPp2NCiiqBX9TYBsaGe88 UH+ANo0ox89RmyHlfvMlkOFP6d6lJpiksvcizArU= 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: Fri, 3 Sep 2021 21:19:14 -0700 Message-Id: <1630729155-24584-13-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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 script to get coremask - Add python script to check if system supports hugepages - 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 | 12 ++++++++++++ app/test/has-hugepage.sh | 11 ----------- app/test/has_hugepage.py | 25 +++++++++++++++++++++++++ app/test/meson.build | 7 ++++--- 5 files changed, 41 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..13939bcf78 --- /dev/null +++ b/app/test/get_coremask.py @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) 2021 Microsoft Corporation +"""This script returns the system cpu range""" + +import multiprocessing + +cpucount = multiprocessing.cpu_count() +if cpucount is None: + # use fallback cpu count + print("0-3") +else: + print("0-" + str(cpucount - 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..70107c61fd --- /dev/null +++ b/app/test/has_hugepage.py @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (c) 2021 Microsoft Corporation +"""This script checks if the system supports huge pages""" + +import platform +import ctypes + +osName = platform.system() +if osName == "Linux": + with open("/proc/sys/vm/nr_hugepages") as file_o: + content = file_o.read() + print(content) +elif osName == "FreeBSD": + # Assume FreeBSD always has hugepages enabled + print("1") +elif osName == "Windows": + # On Windows, determine if large page is supported based on the + # value returned by GetLargePageMinimum. If the return value is zero, + # the processor does not support large pages. + if ctypes.windll.kernel32.GetLargePageMinimum() > 0: + print("1") + else: + print("0") +else: + print("0") diff --git a/app/test/meson.build b/app/test/meson.build index a7611686ad..6960cad80b 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(py3, '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(py3, '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 Sat Sep 4 04:19:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 97977 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 50038A0C45; Sat, 4 Sep 2021 06:20:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 788B841164; Sat, 4 Sep 2021 06:19:38 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7D34D410F6 for ; Sat, 4 Sep 2021 06:19:22 +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 943D920BE531; Fri, 3 Sep 2021 21:19:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 943D920BE531 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630729161; bh=i7yXjtk1S9bQIl5vjUcZ2yzwABMOceQzK9KokpWAyFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DE45np2+Repp/XxlTXUQMM/o9wp2Lfmt46NYm+R7269TVGmMmw9V+F+rsN+Gxrly1 0t2rNGHS5sD9auHhVTDa8IF4kntqAQH0o3xCFbSyDSMXv5Sv25ya4cBDVikZ6AKL8H jVIqd4wHNvVDwYpV50V4fptow84ThKJbPk39X+Sc= 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: Fri, 3 Sep 2021 21:19:15 -0700 Message-Id: <1630729155-24584-14-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> References: <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com> <1630729155-24584-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 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" Enable a subset of unit tests on Windows. Currently not all the dependencies (e.g. libraries and some functionalities) of all unit tests are supported on Windows yet. Signed-off-by: Jie Zhou --- app/test/meson.build | 361 ++++++++++++++++++++++--------------------- 1 file changed, 188 insertions(+), 173 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 6960cad80b..108995db21 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -1,12 +1,6 @@ # 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 @@ -15,19 +9,15 @@ 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', @@ -35,60 +25,21 @@ test_sources = files( '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', @@ -96,27 +47,20 @@ test_sources = files( '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', @@ -125,27 +69,17 @@ test_sources = files( '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', @@ -153,36 +87,21 @@ test_sources = files( ) 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', @@ -191,56 +110,25 @@ test_deps = [ # 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], @@ -248,64 +136,32 @@ fast_tests = [ ['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', @@ -313,42 +169,201 @@ perf_test_names = [ '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 not is_windows + test_sources += files( + 'test_acl.c', + 'test_bpf.c', + 'test_cksum.c', + 'test_cmdline_ipaddr.c', + 'test_cryptodev.c', + 'test_cryptodev_asym.c', + 'test_cryptodev_blockcipher.c', + 'test_cryptodev_security_pdcp.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_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_fib.c', + 'test_fib_perf.c', + 'test_fib6.c', + 'test_fib6_perf.c', + 'test_flow_classify.c', + 'test_graph.c', + 'test_graph_perf.c', + 'test_hash_perf.c', + 'test_ipfrag.c', + 'test_ipsec.c', + 'test_ipsec_sad.c', + 'test_ipsec_perf.c', + 'test_kni.c', + 'test_lcores.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_perf.c', + 'test_mp_secondary.c', + 'test_pflock.c', + 'test_rawdev.c', + 'test_reciprocal_division.c', + 'test_reciprocal_division_perf.c', + 'test_red.c', + 'test_ring_hts_stress.c', + 'test_sched.c', + 'test_security.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_timer_secondary.c', + 'test_trace.c', + ) + + test_deps += [ + 'acl', + 'bpf', + 'cryptodev', + 'distributor', + 'eventdev', + 'fib', + 'flow_classify', + 'graph', + 'ipsec', + 'member', + 'node', + 'pipeline', + 'port', + 'rawdev', + 'security', + ] + + fast_tests += [ + ['atomic_autotest', true], + ['acl_autotest', true], + ['cksum_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], + ['event_ring_autotest', true], + ['fib_autotest', true], + ['fib6_autotest', true], + ['func_reentrancy_autotest', false], + ['flow_classify_autotest', false], + ['ipfrag_autotest', false], + ['lcores_autotest', true], + ['lpm6_autotest', true], + ['malloc_autotest', false], + ['mbuf_autotest', false], + ['memcopy_autotest', true], + ['multiprocess_autotest', false], + ['pflock_autotest', true], + ['red_autotest', true], + ['sched_autotest', true], + ['security_autotest', false], + ['table_autotest', true], + ['timer_autotest', false], + ['distributor_autotest', false], + ['eventdev_common_autotest', true], + ['ipsec_autotest', true], + ['kni_autotest', false], + ['member_autotest', true], + ['power_cpufreq_autotest', false], + ['power_autotest', true], + ['power_kvm_vm_autotest', false], + ['trace_autotest', true], + ] + + perf_test_names += [ + 'mempool_perf_autotest', + 'memcpy_perf_autotest', + 'hash_perf_autotest', + 'reciprocal_division', + 'reciprocal_division_perf', + 'lpm_perf_autotest', + 'fib_slow_autotest', + 'fib_perf_autotest', + 'red_all', + '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', + '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 # DPDK libraries. Explicit linkage of drivers (plugin libraries) @@ -362,7 +377,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