From patchwork Sun Feb 19 23:14:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124156 X-Patchwork-Delegate: david.marchand@redhat.com 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 6888441CE4; Mon, 20 Feb 2023 00:14:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BFE0942D7E; Mon, 20 Feb 2023 00:14:23 +0100 (CET) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 9598940691 for ; Mon, 20 Feb 2023 00:14:21 +0100 (CET) Received: by mail-pl1-f176.google.com with SMTP id ko13so104683plb.13 for ; Sun, 19 Feb 2023 15:14:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8vkx4D7WoD5+b78AAgKqRNMDP/IrxIJyNO6H7pNU8jE=; b=PZQnSTnaIkt/ZN9tTP6nUU+MuOSBHbGUert+6KcE5n6cAugKUSJPVGRD8Y8pP8SjBX Ai4vdc/zx8DeDzioU5CRznxaUx8WFBnrmfMeP3iOJW2laN0cXNTlVxgLFKGhqzm19VLP /yb6ih9p+5EYwTm8C8vUywiKEVc0s5zc1ScfY6rVCTdGIMYBkAtv0Do0BKOAaEloFFC8 85y714QZ6tn4rT2OWmS2th5FyINwiDUOn1k49jwMT21jsEmAZsBZ/qbJ8DplO+qFkGVU hqeO4eBvCFQ/xa+XQ1Xij2nxf9WxfzXCisR54R5Peh3v8W8USjTiDPCrspY4DOn/pqvf 5aoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8vkx4D7WoD5+b78AAgKqRNMDP/IrxIJyNO6H7pNU8jE=; b=Rn8XUlEtTZJkK9CXYxX0PlwJVZo8ki2fBLa6L7QkJmdBFDpBvGQS74tjxubhwoatPp nL7+j48fDtEdFVdThXUf9oSd0bpyJ71dLaFQojk6U5qOpiitBgl3t2h5MIOpeaLmBOyu NpOeyQOuybPjt664Qy14cCbKcNX3qIqyRid0X8VsudPbznbe/QmB1HJMrlzRgCQi/KiZ xxCsX7Oi3i7e5odKF5GWoP473iSAK3CCxQcxqGocWj08l2hPzWLbcWBxhn8yUH10UdRP tE2dlGeTXsPqPoobu5WiRgmI9/BbJx9p4+cF84kGSpL2DTQvPjVgYumqItdGqGMtOiFJ V2EA== X-Gm-Message-State: AO0yUKX6a6zprs05g6eNhwQWDVWRvs2pIwk+SRD34NY/yQrLqE/Z+jvw NdZd5hmpwZlrGuUaEcmvI87hIjxwqjel8ATgEaY= X-Google-Smtp-Source: AK7set9SvmKO5eAKWapyFtODTVTcTDwJM8AxnJHvoDkqm3vXKeyBH4x2UKzSY9H+dv3ozTxBcLNgnQ== X-Received: by 2002:a17:902:ecc4:b0:19a:9945:a7aa with SMTP id a4-20020a170902ecc400b0019a9945a7aamr1031555plh.20.1676848460397; Sun, 19 Feb 2023 15:14:20 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:19 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Tetsuya Mukawa Subject: [PATCH v4 1/9] net/null: build null PMD on Windows Date: Sun, 19 Feb 2023 15:14:08 -0800 Message-Id: <20230219231416.22524-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Builds fine with current code, no changes needed. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- drivers/net/null/meson.build | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/null/meson.build b/drivers/net/null/meson.build index 4a483955a7a9..a51f8f5211b0 100644 --- a/drivers/net/null/meson.build +++ b/drivers/net/null/meson.build @@ -1,11 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files('rte_eth_null.c') pmd_supports_disable_iova_as_pa = true From patchwork Sun Feb 19 23:14:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124157 X-Patchwork-Delegate: david.marchand@redhat.com 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 04F0741CE4; Mon, 20 Feb 2023 00:14:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58C3742D8E; Mon, 20 Feb 2023 00:14:29 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 67BCA40691 for ; Mon, 20 Feb 2023 00:14:22 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id j7so1776803plh.5 for ; Sun, 19 Feb 2023 15:14:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YlQk95R+o2GZ1yE7eW56Qjn3lhaJLbMjvt10+rGFfQY=; b=to82pKblycJPBI+6+Mps54spqDiKc732xcOkXbH0hhwzwBy0fNTMueg6IASN8uoJHy 1YzgPEKy1hLq5IuGecJWNQyyUD1XT+qc3NPwo4fNG1qpLBI0/Mi7KiimLk+T59WJUdRW I7r72VbTsYTOAKY6SKgGitb5xE/Qd98wa566MHg8Sqo4x9YmDmV3RjuS1/GGB3lupH+p 3Jk5/XxehXp3bho9XJUc/HvjijiEUYduDeEnBw1qa/QuA8HD/Ow5/hBpvFBPaPBhted6 C7D4IjT8Rhkh5G3QlnIukma3qYtOOkvYS1oi3AnWLAyocCYRh4ocHqZKS3t8VHTOm28g IhRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YlQk95R+o2GZ1yE7eW56Qjn3lhaJLbMjvt10+rGFfQY=; b=f//rsLIrFv0sEdbNQxmcXpvVLQWJNKlXVQrbuitxx+1YkMrnMDmTljtyyuaBNtL8TJ g/DjApTs2dUqGi13sRQAuhS3qt8EFVeyzsta0m+X3uCpf7+JsAI0c/YpjxNz91Q++A+Z at2fgqMJ2UN2PXcfhwRWLL0shEpAFaGoLvByJSLzY4sxNMlDRlFP6prG02B3BBECVoKM aNPO38Pv2aXHVA3d1JL81cUBtJfBDasyqLDSgL9SfvSbJpYRZ3R2ncCsQOT+uYl8a9wB YDyRCvLiODxRZpOtItnrhkg+tXg/LaXcnKIOWWbn5UpDYB3D3ViYYPMabS6XzccD6BDY so3Q== X-Gm-Message-State: AO0yUKU8S5j0k/2auLmf4LLn4BG6McjEiDCF+h4tpYJ0NT2D7Ek7P3KU fNs/2p/1ZYRSQc5VrRFO/aK8M/dWCVhhLzXEYo8= X-Google-Smtp-Source: AK7set+Uon4TTFV3YWthZ+xiH10IBVlbswiTY3Y10Pd9FbV2xwkLIctFoSFkhnXmSRidO9LnOX08Bg== X-Received: by 2002:a17:902:da90:b0:19a:a9d8:e49f with SMTP id j16-20020a170902da9000b0019aa9d8e49fmr2780919plx.39.1676848461390; Sun, 19 Feb 2023 15:14:21 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:21 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Bruce Richardson Subject: [PATCH v4 2/9] net/ring: build on Windows Date: Sun, 19 Feb 2023 15:14:09 -0800 Message-Id: <20230219231416.22524-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 The command line arguments are stored in node_action_pair and the name[] was sized to PATH_MAX which does not exist on Windows. Since the name is either "CREATE" or "ATTACH" it is not related to PATH_MAX (4096). With this fix driver builds ok on windows, but need to modify the test meson build to skip the eventdev test on Windows. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- app/test/meson.build | 2 +- drivers/net/ring/meson.build | 6 ------ drivers/net/ring/rte_eth_ring.c | 4 +++- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index f34d19e3c3cb..a713f0382280 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -390,7 +390,7 @@ if dpdk_conf.has('RTE_NET_BOND') driver_test_names += 'link_bonding_mode4_autotest' endif endif -if dpdk_conf.has('RTE_NET_RING') +if dpdk_conf.has('RTE_LIB_EVENTDEV') and dpdk_conf.has('RTE_NET_RING') test_deps += 'net_ring' test_sources += 'test_pmd_ring_perf.c' test_sources += 'test_pmd_ring.c' diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build index 72792e26b05a..3534a3cc2287 100644 --- a/drivers/net/ring/meson.build +++ b/drivers/net/ring/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 - sources = files('rte_eth_ring.c') headers = files('rte_eth_ring.h') pmd_supports_disable_iova_as_pa = true diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index bd5a47dd9017..e8bc9b627102 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -17,6 +18,7 @@ #define ETH_RING_NUMA_NODE_ACTION_ARG "nodeaction" #define ETH_RING_ACTION_CREATE "CREATE" #define ETH_RING_ACTION_ATTACH "ATTACH" +#define ETH_RING_ACTION_MAX_LEN 8 /* CREATE | ACTION */ #define ETH_RING_INTERNAL_ARG "internal" #define ETH_RING_INTERNAL_ARG_MAX_LEN 19 /* "0x..16chars..\0" */ @@ -539,7 +541,7 @@ eth_dev_ring_create(const char *name, } struct node_action_pair { - char name[PATH_MAX]; + char name[ETH_RING_ACTION_MAX_LEN]; unsigned int node; enum dev_action action; }; From patchwork Sun Feb 19 23:14:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124158 X-Patchwork-Delegate: david.marchand@redhat.com 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 60A4041CE4; Mon, 20 Feb 2023 00:14:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F7AE42D94; Mon, 20 Feb 2023 00:14:30 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 7236F42D7E for ; Mon, 20 Feb 2023 00:14:23 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id ot9so1506846pjb.3 for ; Sun, 19 Feb 2023 15:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1XH+YIdS2J0+gUtw3hNcVseB7jI92w+W7yJ531/tnpU=; b=PpGTGGWriVeBLjapj211BWF3vqIZZsOaSCxbcUu/dVfGTurT0TaWLvoTUi+QptRU16 6lfvQtqkPqDPZF5Kfo4huwH4JXSVHgQCjwbWw8LHlkrvgFj40+jf/yoczFGshYCUGCyq xMFsaIhijnY/DD0HZT7PzH9xEaWq2Woqzi11RV8myq+v8Als+SCF6PTL3F7CxHpYD/Sf zz6Ru0aT8r88od0H4ozG8T6quJ0egCqu5TA5Ff+ccr/Zt+khaQ4T8F8/wz1bjM4yS2uS RYacgLFw19238DcGboyZgH0RzQQJJrKaueqC7bO25oqjw1+yMkJVxn9lPz8PG8STX8zr SrIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1XH+YIdS2J0+gUtw3hNcVseB7jI92w+W7yJ531/tnpU=; b=bRXQlsx1YdltHZQw+1hCt2oMgzlDnTH9IB43Mjkgqkt+KngFragfzywT+ACooSP0nk DdxRFrHZHCwAkOFcHQZvynQc5jVOES2NdbdocbkUKnDQ1WhgWaGVfhHuG6rTi5cqFiEJ QxQzcn6LGI16vaMOB+6xHuarG40vCFcGvbyMjUqMTkrSgk183zHJjPlbV644GStFtPK9 +21ND4Qy7mmfWTzM1GYW8z+mLMjF9mjS2IqWWzgRw4e8PG84LcHbuyRQbWo2/ojY/S5R o74DqjhRb8C5XRfo+Y9udQ8ETz72lGEUfoEN46rg9GxBN7URVne+yEOkxR/CWkt3Pso+ JydA== X-Gm-Message-State: AO0yUKU66TEy6HAA3uxpNMC/265YwhS3eu01C5o26BwVSru34tpYQy5U QxbM7r8WCrp2bVj6ABQKJCotrSxIQgnLuTMokh0= X-Google-Smtp-Source: AK7set+uW5IHXf5523nYwZX3YE3AhNg0Db1i5HYsKiUN0FNtLljazf7TH/SgIR5UiEEGcnoAWy5xZw== X-Received: by 2002:a17:902:ecc7:b0:19a:f9b5:2f2f with SMTP id a7-20020a170902ecc700b0019af9b52f2fmr2138323plh.55.1676848462297; Sun, 19 Feb 2023 15:14:22 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:21 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Bruce Richardson , Vladimir Medvedkin Subject: [PATCH v4 3/9] lpm: enable on Windows Date: Sun, 19 Feb 2023 15:14:10 -0800 Message-Id: <20230219231416.22524-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 This builds on Windows without changes. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- app/test/test_lpm.c | 15 +-------------- app/test/test_lpm6.c | 12 ------------ app/test/test_lpm6_data.h | 3 ++- app/test/test_lpm6_perf.c | 14 +------------- app/test/test_lpm_perf.c | 39 ++++++++++++--------------------------- lib/lpm/meson.build | 6 ------ 6 files changed, 16 insertions(+), 73 deletions(-) diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c index bceb9ae743d7..37b460af3a96 100644 --- a/app/test/test_lpm.c +++ b/app/test/test_lpm.c @@ -2,18 +2,6 @@ * Copyright(c) 2010-2014 Intel Corporation */ -#include "test.h" - -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_lpm(void) -{ - printf("lpm not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else - #include #include #include @@ -22,6 +10,7 @@ test_lpm(void) #include #include +#include "test.h" #include "test_xmmt_ops.h" #define TEST_LPM_ASSERT(cond) do { \ @@ -1595,6 +1584,4 @@ test_lpm(void) return global_status; } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(lpm_autotest, test_lpm); diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c index 1f44392db739..b6b6f8615ea5 100644 --- a/app/test/test_lpm6.c +++ b/app/test/test_lpm6.c @@ -10,16 +10,6 @@ #include #include -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_lpm6(void) -{ - printf("lpm6 not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else - #include #include "test_lpm6_data.h" @@ -1803,6 +1793,4 @@ test_lpm6(void) return global_status; } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6); diff --git a/app/test/test_lpm6_data.h b/app/test/test_lpm6_data.h index da9b161f20e5..3a1fa25f8433 100644 --- a/app/test/test_lpm6_data.h +++ b/app/test/test_lpm6_data.h @@ -6,6 +6,7 @@ #include #include +#include struct rules_tbl_entry { uint8_t ip[16]; @@ -1129,7 +1130,7 @@ static void generate_large_ips_table(int gen_expected_next_hop) for (i = 0; i < NUM_IPS_ENTRIES; i++) { for (j = 0; j < 16; j++) - large_ips_table[i].ip[j] = lrand48(); + large_ips_table[i].ip[j] = rte_rand(); } for (k = j = 0, i = 0; i < NUM_IPS_ENTRIES; i++) { diff --git a/app/test/test_lpm6_perf.c b/app/test/test_lpm6_perf.c index aaf2773b6fac..5b684686a687 100644 --- a/app/test/test_lpm6_perf.c +++ b/app/test/test_lpm6_perf.c @@ -2,17 +2,6 @@ * Copyright(c) 2010-2014 Intel Corporation */ -#include "test.h" - -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_lpm6_perf(void) -{ - printf("lpm6_perf not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else #include #include @@ -24,6 +13,7 @@ test_lpm6_perf(void) #include #include +#include "test.h" #include "test_lpm6_data.h" #define TEST_LPM_ASSERT(cond) do { \ @@ -171,6 +161,4 @@ test_lpm6_perf(void) return 0; } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf); diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index e858716f909b..e72437ba3850 100644 --- a/app/test/test_lpm_perf.c +++ b/app/test/test_lpm_perf.c @@ -3,17 +3,6 @@ * Copyright(c) 2020 Arm Limited */ -#include "test.h" - -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_lpm_perf(void) -{ - printf("lpm_perf not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else #include #include #include @@ -25,7 +14,9 @@ test_lpm_perf(void) #include #include #include +#include +#include "test.h" #include "test_xmmt_ops.h" struct rte_lpm *lpm; @@ -34,8 +25,9 @@ static volatile uint8_t writer_done; static volatile uint32_t thr_id; static uint64_t gwrite_cycles; static uint32_t num_writers; -/* LPM APIs are not thread safe, use mutex to provide thread safety */ -static pthread_mutex_t lpm_mutex = PTHREAD_MUTEX_INITIALIZER; + +/* LPM APIs are not thread safe, use spinlock */ +static rte_spinlock_t lpm_lock = RTE_SPINLOCK_INITIALIZER; /* Report quiescent state interval every 1024 lookups. Larger critical * sections in reader will result in writer polling multiple times. @@ -267,7 +259,7 @@ static void generate_random_rule_prefix(uint32_t ip_class, uint8_t depth) /* Only generate rest bits except the most significant * fixed bits for IP address class */ - start = lrand48() & mask; + start = rte_rand() & mask; ptr_rule = &large_route_table[num_route_entries]; ptr_ldepth_rule = &large_ldepth_route_table[num_ldepth_route_entries]; for (k = 0; k < rule_num; k++) { @@ -296,7 +288,7 @@ static void insert_rule_in_random_pos(uint32_t ip, uint8_t depth) struct route_rule tmp; do { - pos = lrand48(); + pos = rte_rand(); try_count++; } while ((try_count < 10) && (pos > num_route_entries)); @@ -452,8 +444,7 @@ test_lpm_rcu_qsbr_writer(void *arg) for (i = 0; i < RCU_ITERATIONS; i++) { /* Add all the entries */ for (j = si; j < ei; j++) { - if (num_writers > 1) - pthread_mutex_lock(&lpm_mutex); + rte_spinlock_lock(&lpm_lock); if (rte_lpm_add(lpm, large_ldepth_route_table[j].ip, large_ldepth_route_table[j].depth, next_hop_add) != 0) { @@ -461,22 +452,19 @@ test_lpm_rcu_qsbr_writer(void *arg) i, j); goto error; } - if (num_writers > 1) - pthread_mutex_unlock(&lpm_mutex); + rte_spinlock_unlock(&lpm_lock); } /* Delete all the entries */ for (j = si; j < ei; j++) { - if (num_writers > 1) - pthread_mutex_lock(&lpm_mutex); + rte_spinlock_lock(&lpm_lock); if (rte_lpm_delete(lpm, large_ldepth_route_table[j].ip, large_ldepth_route_table[j].depth) != 0) { printf("Failed to delete iteration %d, route# %d\n", i, j); goto error; } - if (num_writers > 1) - pthread_mutex_unlock(&lpm_mutex); + rte_spinlock_unlock(&lpm_lock); } } @@ -487,8 +475,7 @@ test_lpm_rcu_qsbr_writer(void *arg) return 0; error: - if (num_writers > 1) - pthread_mutex_unlock(&lpm_mutex); + rte_spinlock_unlock(&lpm_lock); return -1; } @@ -773,6 +760,4 @@ test_lpm_perf(void) return 0; } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf); diff --git a/lib/lpm/meson.build b/lib/lpm/meson.build index 6b47361fcec0..4cd48886fc41 100644 --- a/lib/lpm/meson.build +++ b/lib/lpm/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 - sources = files('rte_lpm.c', 'rte_lpm6.c') headers = files('rte_lpm.h', 'rte_lpm6.h') # since header files have different names, we can install all vector headers From patchwork Sun Feb 19 23:14:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124159 X-Patchwork-Delegate: david.marchand@redhat.com 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 D6BB241CE4; Mon, 20 Feb 2023 00:14:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B62CA42D9E; Mon, 20 Feb 2023 00:14:31 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 92C7542D86 for ; Mon, 20 Feb 2023 00:14:24 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id l4-20020a17090a49c400b002341fadc370so1398681pjm.1 for ; Sun, 19 Feb 2023 15:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Wthpt1yMKg88TFmLv0DjkbVFCCmdOum/X/tb28k3SBw=; b=6MDXl3a58TihrAFhr0ph7Ub0shzv4WyJL5l14M++f6l0EJxWEcnn8Kfjsfuw4O9MSa CrlkmTjeCVPi1hgpzmjpeT/9X1ofsrYuAj7U8kJq+UlSHgQYxSLxt1Eywvl3fUwXrRlq sTvbV7GmwxvSmp2/U9mmGkh5bLrTPK+ulJaRiHFBKDHapmaLm3tgCGX1FFrmLLSmZKr1 mf+ue2CJsO/lV7NsS6Y19tvQjLdf3Cg+4A8iTzT3ArEwboed1Yd4OA3FVTsuHXbSJbRE zGIhQADn/otEeo+NfjJFCooIYqLH1nfFEbQiR5SoaZ302aiscU3BmSnn6/K4y8e+okeI rK8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wthpt1yMKg88TFmLv0DjkbVFCCmdOum/X/tb28k3SBw=; b=stcTcY5f56b0USvkAUJL91nkwnsoTPC4AJHkQRN44NTL1xEzwPsl4KnAgUeO3pcqB5 5mFV+70/AH34/84gg90APdxKMIawgQzSNO50/MbdyuVErUw3NO96KiC/wdFonU0oihS+ uVuVYBaPJQ6EAPxAazuIsnLNQ+ZZQBFC+z7XTHBg66Oe1aNb2Napd94PaG3xenkkHbph trGfaeE6OWzdNcwKYTtjvXrYXNWMnwWEl3/MDFAwZwa1kqo2ciPSRSTemytkS3Hs78OH op5JJbKJyC29Obmmo7JQlqus8dDUE+BICwCTognYVZqfbk/AcLrWsqDQwAz0B3rDYb+B RlUg== X-Gm-Message-State: AO0yUKWqjmTs+p3a2HYKQjPZ7n3fWB79A8rcCnP8cWbGmMPgU/y+0idG A7z7vEd02LCtiXWLco+0qzaF+dSZY193W7mqQ0g= X-Google-Smtp-Source: AK7set8s/ToqeTvnla14ZIfJZ6NcLslIxcXZ8ZfRbbiGYTqgIhczA5z30tBeDa+OyLwSYeu0f4DI4A== X-Received: by 2002:a17:902:f98b:b0:19b:452:caa9 with SMTP id ky11-20020a170902f98b00b0019b0452caa9mr1959242plb.36.1676848463354; Sun, 19 Feb 2023 15:14:23 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:23 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Reshma Pattan Subject: [PATCH v4 4/9] reorder: build on Windows Date: Sun, 19 Feb 2023 15:14:11 -0800 Message-Id: <20230219231416.22524-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 This builds on Windows if sys/queue.h is included. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- app/test/test_reorder.c | 11 ----------- lib/reorder/meson.build | 6 ------ lib/reorder/rte_reorder.c | 1 + 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c index f0714a5c18a3..9ebd91477536 100644 --- a/app/test/test_reorder.c +++ b/app/test/test_reorder.c @@ -11,16 +11,6 @@ #include #include #include - -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_reorder(void) -{ - printf("reorder not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} -#else - #include #include #include @@ -395,6 +385,5 @@ test_reorder(void) return unit_test_suite_runner(&reorder_test_suite); } -#endif /* !RTE_EXEC_ENV_WINDOWS */ REGISTER_TEST_COMMAND(reorder_autotest, test_reorder); diff --git a/lib/reorder/meson.build b/lib/reorder/meson.build index 621c1f350103..03aed53d9007 100644 --- a/lib/reorder/meson.build +++ b/lib/reorder/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 - sources = files('rte_reorder.c') headers = files('rte_reorder.h') deps += ['mbuf'] diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c index 385ee479da42..00e2cf043e04 100644 --- a/lib/reorder/rte_reorder.c +++ b/lib/reorder/rte_reorder.c @@ -3,6 +3,7 @@ */ #include +#include #include #include From patchwork Sun Feb 19 23:14:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124160 X-Patchwork-Delegate: david.marchand@redhat.com 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 970FC41CE4; Mon, 20 Feb 2023 00:14:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E02E042DAA; Mon, 20 Feb 2023 00:14:32 +0100 (CET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 5A9FD42D8A for ; Mon, 20 Feb 2023 00:14:25 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id w10so1577023ply.11 for ; Sun, 19 Feb 2023 15:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WGyFr6jmzcgM1aDdQp/EBErjnXov/ZmiUN0fVa/gzjE=; b=LjLGZAIaXzEaYYYQtf3ShQW8dL7vx1dYHRhM+d/3wquVgixga0JPVV58igHN+g/Wr5 QZBPhvclQDYlgcek7j2X6KY7VamC7a6VA7g1UcwAvvY94Tce5GkPVnvPHCStcQ2OnPfA 8kH7EuC2utP4S1VpyHiZstXhMVfluDGm0ue7PFJHnIaaKCKu6IfzCYDi4VwZ62Us7UE/ cyz7FGfm0hxV+V8xdEOpALfD7PAqmViZ+04ur2W8Le82P1jzeHJP00aajoFZl212/TVt LqM32JV3DMHbBSGJQhHIoK8bkBhjab+27p8d7b5bPN6KHfXINeEX20Hs/eedrpgeV6jm NDSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WGyFr6jmzcgM1aDdQp/EBErjnXov/ZmiUN0fVa/gzjE=; b=ltabn7/d/wzRADS9ZuyHXGvOl/exJccvKleqbgEyXFOqdWRQa3C1J1x9x4+ZD6nNzw f73eVet/VT2MctquY6zvjEK5VTVT7/Ffde2xk67le01zPDVq45pM57rp7nUjmj41+Whu Mqlzddl+LSde9YYHaxUVEYtMohSLXGPiDzcjX7KNOQShjOHde80ekyZaS1EFw0+EeNCO BEXkO9qMzXUVNnkJWiolPMevwz/4K4Y1+f+4oRBBFzVeDL9YaFl3+ayMgO8i0juoq1Gn phnsVae329DtydCxwMnzNQgdHrwF7Mvgryu9H+Cr0n2cZfvCoeLASN3ZHCP0QPXvyXR+ YBng== X-Gm-Message-State: AO0yUKUGIEMvkssi4N/2vqQxtl7bk/s5USrgv6RLqLefS5vnBCxPhj0B IC+5ICza/lV7q4XlmD1h68xjR4wJGQr5+MdIIFs= X-Google-Smtp-Source: AK7set9hek6pkodVT5kZ2YR9Ptx88wYZCFOOxaD1iEsiVwu4we4nh1dAzi7y1vT3eudlKskzwH9Q2A== X-Received: by 2002:a17:902:ce91:b0:19a:82f0:7b0f with SMTP id f17-20020a170902ce9100b0019a82f07b0fmr1031664plg.30.1676848464346; Sun, 19 Feb 2023 15:14:24 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:23 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Konstantin Ananyev Subject: [PATCH v4 5/9] ip_frag: enable build on Windows Date: Sun, 19 Feb 2023 15:14:12 -0800 Message-Id: <20230219231416.22524-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 This build works on Windows if sys/queue.h is included. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- app/test/test_ipfrag.c | 12 ------------ lib/ip_frag/ip_frag_common.h | 2 ++ lib/ip_frag/meson.build | 6 ------ 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c index 88cc4cdeea8d..402ce361c1a2 100644 --- a/app/test/test_ipfrag.c +++ b/app/test/test_ipfrag.c @@ -10,17 +10,6 @@ #include #include #include - -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_ipfrag(void) -{ - printf("ipfrag not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else - #include #include #include @@ -520,6 +509,5 @@ test_ipfrag(void) return unit_test_suite_runner(&ipfrag_testsuite); } -#endif /* !RTE_EXEC_ENV_WINDOWS */ REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag); diff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h index 9c0dbdeb6eb9..0f4ad72a90d9 100644 --- a/lib/ip_frag/ip_frag_common.h +++ b/lib/ip_frag/ip_frag_common.h @@ -8,6 +8,8 @@ #include "rte_ip_frag.h" #include "ip_reassembly.h" +#include + /* logging macros. */ #ifdef RTE_LIBRTE_IP_FRAG_DEBUG #define IP_FRAG_LOG(lvl, fmt, args...) RTE_LOG(lvl, USER1, fmt, ##args) diff --git a/lib/ip_frag/meson.build b/lib/ip_frag/meson.build index 3a252bdaf6a4..ea2de09f7528 100644 --- a/lib/ip_frag/meson.build +++ b/lib/ip_frag/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 - sources = files( 'rte_ipv4_fragmentation.c', 'rte_ipv6_fragmentation.c', From patchwork Sun Feb 19 23:14:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124161 X-Patchwork-Delegate: david.marchand@redhat.com 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 5BC2241CE4; Mon, 20 Feb 2023 00:14:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 120D142D9C; Mon, 20 Feb 2023 00:14:34 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 5AAE342D8A for ; Mon, 20 Feb 2023 00:14:26 +0100 (CET) Received: by mail-pj1-f54.google.com with SMTP id pt11so145081pjb.1 for ; Sun, 19 Feb 2023 15:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6zL2xjbD1mmWRggd1/eVrleId77cdCaSbEqFDtttXyo=; b=JqKVHI6aNDICd7GwiqF6ylJppK65jwBVZfOOEU2QE7EJKMnJ8LFZ6bB0maFFC3O54H EJEbk7tNHmc2uXX1A67RGo0dllPhGLv6N41L9c5sBN7XbXP+XxkJwiA4pJfUvLwmzrAt SF9j3lOjSGjPQ6nBBkrXEGhNzUxympDD7wVydnniS4NLxrZQxnpnSoG7eyDfCbZDIHVG kEyJSBiYMl5Jy8xjQaySjVOsd4Jl/1aqQxqFxD17DXQDU6MjfdkcG6K3F7kOdrp+Nbo/ rSt/9epKEwJIwUDd2ln/GmNCPghm6Tg70WlowRVJZdu6D9I/CAB4sHnzNstKSlpQCC8w F1Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6zL2xjbD1mmWRggd1/eVrleId77cdCaSbEqFDtttXyo=; b=l727HoHuL0Wrhge3Qn2+6Fw+59LCVgVEU3d2nsLAJ0PYiMsYOb6MzkeORddI1Yv/GE 9sGGxNHw2byw5iCoDDBYTKGDmH+HabLf8UBIDBwzOTXMe86ed/MZ9jbmUtu50xlOYy6a zAwAIzsXgQR6BXR5c9LzLyyRgzxHS+RJMnPJ6KqGWff7NYAEw87Uk7PzLwHg+Xm5MT36 SdZmk6mVTUtP0aBE/oxtwqK6RTBYM62eXU1KS5Ng5ARnd4+wFOJx2a3AxLTEt7IzBJo6 v85sW7LZp16egHAsGM1/Ele6E9dwZc6Kep73dYTWH7O2YM7RIglw3mygSF66vj8xVnZX 964Q== X-Gm-Message-State: AO0yUKX3Jrm5A4c0oEJHdpbqN+pIfBzTXHtRpKiYAT0vYOom0SktXSGz puosYrSpa6V+kR3ZTrBry0/xos9Est+5p4vE7d0= X-Google-Smtp-Source: AK7set/Xd1dLxAuSVAstjzmMu5CDnZ/gQgvLg24tSG3Iy/GuUXhO3C8ojHyC6SPfaHJ7E423tUqySA== X-Received: by 2002:a17:902:da91:b0:19a:f02c:a05b with SMTP id j17-20020a170902da9100b0019af02ca05bmr3167564plx.3.1676848465204; Sun, 19 Feb 2023 15:14:25 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:24 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Vladimir Medvedkin Subject: [PATCH v4 6/9] rib: enable on Windows Date: Sun, 19 Feb 2023 15:14:13 -0800 Message-Id: <20230219231416.22524-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 The RIB library builds on Windows as long as sys/queue.h is included Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- app/test/test_rib.c | 19 ------------------- app/test/test_rib6.c | 24 ++---------------------- lib/rib/meson.build | 6 ------ lib/rib/rte_rib.c | 1 + lib/rib/rte_rib6.c | 1 + 5 files changed, 4 insertions(+), 47 deletions(-) diff --git a/app/test/test_rib.c b/app/test/test_rib.c index 06058f8f7c52..65b685641094 100644 --- a/app/test/test_rib.c +++ b/app/test/test_rib.c @@ -10,23 +10,6 @@ #include #include - -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_rib(void) -{ - printf("rib not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -static int -test_slow_rib(void) -{ - printf("slow_rib not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} -#else - #include typedef int32_t (*rte_rib_test)(void); @@ -380,7 +363,5 @@ test_slow_rib(void) return unit_test_suite_runner(&rib_slow_tests); } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(rib_autotest, test_rib); REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib); diff --git a/app/test/test_rib6.c b/app/test/test_rib6.c index ba79aedea5f7..336b779d2e1e 100644 --- a/app/test/test_rib6.c +++ b/app/test/test_rib6.c @@ -3,32 +3,14 @@ * Copyright(c) 2019 Intel Corporation */ -#include "test.h" - #include #include #include - #include - -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_rib6(void) -{ - printf("rib6 not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -static int -test_slow_rib6(void) -{ - printf("slow_rib6 not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} -#else - #include +#include "test.h" + typedef int32_t (*rte_rib6_test)(void); static int32_t test_create_invalid(void); @@ -385,7 +367,5 @@ test_slow_rib6(void) return unit_test_suite_runner(&rib6_slow_tests); } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(rib6_autotest, test_rib6); REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6); diff --git a/lib/rib/meson.build b/lib/rib/meson.build index bda7f576e976..7bacbb453592 100644 --- a/lib/rib/meson.build +++ b/lib/rib/meson.build @@ -2,12 +2,6 @@ # Copyright(c) 2018 Vladimir Medvedkin # Copyright(c) 2019 Intel Corporation -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files('rte_rib.c', 'rte_rib6.c') headers = files('rte_rib.h', 'rte_rib6.h') deps += ['mempool'] diff --git a/lib/rib/rte_rib.c b/lib/rib/rte_rib.c index b0794edf66f5..812a2597d117 100644 --- a/lib/rib/rte_rib.c +++ b/lib/rib/rte_rib.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/lib/rib/rte_rib6.c b/lib/rib/rte_rib6.c index 19e4ff97c479..ae44281ae105 100644 --- a/lib/rib/rte_rib6.c +++ b/lib/rib/rte_rib6.c @@ -5,6 +5,7 @@ #include #include +#include #include #include From patchwork Sun Feb 19 23:14:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124162 X-Patchwork-Delegate: david.marchand@redhat.com 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 01CDD41CE4; Mon, 20 Feb 2023 00:15:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E32C42DB8; Mon, 20 Feb 2023 00:14:35 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id F12D542D82 for ; Mon, 20 Feb 2023 00:14:26 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id ot9so1506930pjb.3 for ; Sun, 19 Feb 2023 15:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XpjjUg+XGIk8i8zqgDx2zb0AHCW+0KwDkb6IUa23Ft8=; b=sld0wx59CZz5B76XP+UJGwMu5EG7xs4NnmNYqt0CVsER/YP68Ez1vvGQ6lKTLtihHD 3HjAWeSFHeva1+ocEBuwfAkvjHx2gTg+jaLTxN1snmgIqfSu8/bKS2qPLNw/CHzRNe1h P64npG+qwNdLCdR2cGbOtYgq63h1/VXDTan/IoNQEhvvb6HCQS3BpwH5irJBn744rKjg m1EcIk+/xZCT+JPptbhEc3M+4tL+bDeoVGkhgTlHPnbSxSm3CvoDtPo7MIE+igERv3AT 5lgMISWCVtDBygUL9lCqIA0wiji3g40270Rim2L1unL8NHYjYO5hZhxIGFnKw1kiwBDM NU5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XpjjUg+XGIk8i8zqgDx2zb0AHCW+0KwDkb6IUa23Ft8=; b=1jKjRt3YUVxLvERnjzqsAzmE5VEWg4ggqP0XOejhw4LvGSv7u30d4/AeQqFJ+7RT8V 3UoqGcfzNa35BlcqHa7xogcAMn9WHW4fNQTee3E+SZVmqS8rSQKF4LUsroWkElrqca1m Oo5Xc3jPhrqRC3xQxu+SlXyHnzUMQmAEn2+dvtHvFzsBTl1Da4DMsOeS2QINzHMaVT92 O1aK1qKYKbAEkqRJ8eKKZCwPPtfiS+ghZfBZREzob3I6VdBSt+2Gd2M5hJkPICeGT8SN GXXs84SBto3t82+IbhQLmC3orfXmjPvrZhK/Yx2XzaQOT+AQOYwzDYOiAbnfqBFf7+bD oIOA== X-Gm-Message-State: AO0yUKV2D5Fc+RI/7IZh7dMSnL7yH+9zatPQinsW96HE3bxNrFJCDIsV ic0b/psIOPG2ZLUihY/huhhaZ5aeQahoXIjhe+A= X-Google-Smtp-Source: AK7set9q9vX1tj806sD7xK8YAAykJe1smNRioz3bMZYqDQmhDY3A1pyhcwGJlc0Vo0X+ocRIfGDZhg== X-Received: by 2002:a17:903:41c3:b0:19b:e73:809b with SMTP id u3-20020a17090341c300b0019b0e73809bmr435101ple.25.1676848466200; Sun, 19 Feb 2023 15:14:26 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:25 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Vladimir Medvedkin Subject: [PATCH v4 7/9] fib: enable on Windows Date: Sun, 19 Feb 2023 15:14:14 -0800 Message-Id: <20230219231416.22524-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 The FIB library builds on Windows as long as sys/queue.h is defined. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- app/test/test_fib.c | 22 +--------------------- app/test/test_fib6.c | 24 ++---------------------- app/test/test_fib6_perf.c | 15 +-------------- app/test/test_fib_perf.c | 19 +++---------------- lib/fib/meson.build | 6 ------ lib/fib/rte_fib.c | 1 + lib/fib/rte_fib6.c | 1 + 7 files changed, 9 insertions(+), 79 deletions(-) diff --git a/app/test/test_fib.c b/app/test/test_fib.c index a2d1ea8f3abc..eb69d6e2fd4c 100644 --- a/app/test/test_fib.c +++ b/app/test/test_fib.c @@ -9,28 +9,10 @@ #include #include +#include #include "test.h" -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_fib(void) -{ - printf("fib not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -static int -test_slow_fib(void) -{ - printf("slow_fib not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else - -#include - typedef int32_t (*rte_fib_test)(void); static int32_t test_create_invalid(void); @@ -433,7 +415,5 @@ test_slow_fib(void) return unit_test_suite_runner(&fib_slow_tests); } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(fib_autotest, test_fib); REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib); diff --git a/app/test/test_fib6.c b/app/test/test_fib6.c index cd971e6ecdfb..15ad09178ae2 100644 --- a/app/test/test_fib6.c +++ b/app/test/test_fib6.c @@ -9,29 +9,11 @@ #include #include - -#include "test.h" - -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_fib6(void) -{ - printf("fib not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -static int -test_slow_fib6(void) -{ - printf("slow_fib not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else - #include #include +#include "test.h" + typedef int32_t (*rte_fib6_test)(void); static int32_t test_create_invalid(void); @@ -442,7 +424,5 @@ test_slow_fib6(void) return unit_test_suite_runner(&fib6_slow_tests); } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(fib6_autotest, test_fib6); REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6); diff --git a/app/test/test_fib6_perf.c b/app/test/test_fib6_perf.c index 21d2b65318e9..add20c2331b1 100644 --- a/app/test/test_fib6_perf.c +++ b/app/test/test_fib6_perf.c @@ -10,21 +10,10 @@ #include #include #include +#include #include "test.h" -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_fib6_perf(void) -{ - printf("fib6_perf not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else - -#include - #include "test_lpm6_data.h" #define TEST_FIB_ASSERT(cond) do { \ @@ -167,6 +156,4 @@ test_fib6_perf(void) return 0; } -#endif /*ifdef RTE_EXEC_ENV_WINDOWS*/ - REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf); diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c index 9787874cc9b7..b56293e64f41 100644 --- a/app/test/test_fib_perf.c +++ b/app/test/test_fib_perf.c @@ -12,22 +12,11 @@ #include #include #include +#include #include "test.h" #include "test_xmmt_ops.h" -#ifdef RTE_EXEC_ENV_WINDOWS -static int -test_fib_perf(void) -{ - printf("fib_perf not supported on Windows, skipping test\n"); - return TEST_SKIPPED; -} - -#else - -#include - #define TEST_FIB_ASSERT(cond) do { \ if (!(cond)) { \ printf("Error at line %d:\n", __LINE__); \ @@ -246,7 +235,7 @@ static void generate_random_rule_prefix(uint32_t ip_class, uint8_t depth) /* Only generate rest bits except the most significant * fixed bits for IP address class */ - start = lrand48() & mask; + start = rte_rand() & mask; ptr_rule = &large_route_table[num_route_entries]; for (k = 0; k < rule_num; k++) { ptr_rule->ip = (start << (RTE_FIB_MAX_DEPTH - depth)) @@ -265,7 +254,7 @@ static void insert_rule_in_random_pos(uint32_t ip, uint8_t depth) struct route_rule tmp; do { - pos = lrand48(); + pos = rte_rand(); try_count++; } while ((try_count < 10) && (pos > num_route_entries)); @@ -420,6 +409,4 @@ test_fib_perf(void) return 0; } -#endif /* !RTE_EXEC_ENV_WINDOWS */ - REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf); diff --git a/lib/fib/meson.build b/lib/fib/meson.build index 9b848d08417c..ddcae0617a73 100644 --- a/lib/fib/meson.build +++ b/lib/fib/meson.build @@ -2,12 +2,6 @@ # Copyright(c) 2018 Vladimir Medvedkin # Copyright(c) 2019 Intel Corporation -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files('rte_fib.c', 'rte_fib6.c', 'dir24_8.c', 'trie.c') headers = files('rte_fib.h', 'rte_fib6.h') deps += ['rib'] diff --git a/lib/fib/rte_fib.c b/lib/fib/rte_fib.c index 8af4c4091908..0c3b20e00a5a 100644 --- a/lib/fib/rte_fib.c +++ b/lib/fib/rte_fib.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/lib/fib/rte_fib6.c b/lib/fib/rte_fib6.c index 4b8e22b142b9..28c69b38999f 100644 --- a/lib/fib/rte_fib6.c +++ b/lib/fib/rte_fib6.c @@ -5,6 +5,7 @@ #include #include +#include #include #include From patchwork Sun Feb 19 23:14:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124163 X-Patchwork-Delegate: david.marchand@redhat.com 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 0B1A541CE4; Mon, 20 Feb 2023 00:15:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7976E42DBF; Mon, 20 Feb 2023 00:14:36 +0100 (CET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id 5035C42D8D for ; Mon, 20 Feb 2023 00:14:28 +0100 (CET) Received: by mail-pj1-f46.google.com with SMTP id o10-20020a17090a744a00b00233ba727724so1258236pjk.1 for ; Sun, 19 Feb 2023 15:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=83D8iYul/29Bw+0iYP33DhWO1Z0u1oDFprj7fb/7FtA=; b=jRhq1YSL0TZVC6iJTPDlWRUb9CMwcFj34S3iiZUjhQ63SeUPC+dT5X5EaGSOgkwdCz /jXPEcPbQ06GZ6fAZU6ImXQ0BifwNUEn876aOJD/LGicirZZvKFiAB26nLXh+0o/fiMm pcpnUXJJPdEDMD0N903O4Hl5pTtcHsiufXoF1DWtcHj2ib5hEMpGTBxyCTnX8wORzq5G 482DcYcMncbh8wxmb1PbiOxA+zrOmG0/qTb39BTUwLbidQ50OBsq6rklCVphS5Vhl6o+ MNxUMs485nwvYpxfi4zxZuI9WYfC+IQL9WqzGifWOH/DJXzAl90PY7OKnpbup3SiGc4F aADQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=83D8iYul/29Bw+0iYP33DhWO1Z0u1oDFprj7fb/7FtA=; b=dO4wc9/lF6OMdDLSB8dsWyrbGyluphCSHFiKeHO1sbiwfRXVwCtTKGi4M1pxjmppXj llsCH0d5QF+CRBOdmkhomK15Zi348YDb5wI/oUPQciLyp9KamKEl1gfnVRAb0UFqjwHJ rO04VXBzvOgNs+fgQZcCrCMHV1UnM9tx2CABqxHstM6VdpSJx5F0c6PzRGqnJM/0+kup aNWXTgGOt4xJy8cOKfmC69hdx578vYJkAYvlNORn7iekzFpQ3fp2tYaNsJRRafbSnOSE edGqpF0qaVsRBwcOJz8ZvxgCOyOitrtCMYf4nx+7qYgxPE4C21wgeePEs+Qdb0QM4Bzx Q+1A== X-Gm-Message-State: AO0yUKUs/HCXLdm+pOSC2/ejRnAo2ppfvIUTcATw9TECCbg/8Rv2v28U VhCQ/jR0g6UJ9/HHJnv8ST7tW2+MfVEWEydUnNM= X-Google-Smtp-Source: AK7set9RHvLAvVnqGqxwA6AmGpsX1v8RFAxSqbEZPP8GLTTrkTb7Rwqd3lqifH1SMca/+sm7a2V51g== X-Received: by 2002:a17:902:da90:b0:19a:a9d8:e49f with SMTP id j16-20020a170902da9000b0019aa9d8e49fmr2781250plx.39.1676848467141; Sun, 19 Feb 2023 15:14:27 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:26 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Reshma Pattan Subject: [PATCH v4 8/9] pcapng: windows compatibility Date: Sun, 19 Feb 2023 15:14:15 -0800 Message-Id: <20230219231416.22524-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Allow building on Windows, need to provide some comparability wrappers for writev() and if_nametoindex. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- lib/pcapng/meson.build | 6 ----- lib/pcapng/rte_pcapng.c | 59 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/lib/pcapng/meson.build b/lib/pcapng/meson.build index da938bbcb733..4549925d41b6 100644 --- a/lib/pcapng/meson.build +++ b/lib/pcapng/meson.build @@ -1,12 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Microsoft Corporation -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - sources = files('rte_pcapng.c') headers = files('rte_pcapng.h') diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c index 65c8c77fa405..3c91fc77644a 100644 --- a/lib/pcapng/rte_pcapng.c +++ b/lib/pcapng/rte_pcapng.c @@ -3,15 +3,18 @@ */ #include -#include #include #include #include #include -#include #include #include +#ifndef RTE_EXEC_ENV_WINDOWS +#include +#include +#endif + #include #include #include @@ -20,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +51,57 @@ static struct pcapng_time { struct rte_reciprocal_u64 tsc_hz_inverse; } pcapng_time; + +#ifdef RTE_EXEC_ENV_WINDOWS +/* + * Windows does not have writev() call. + * Emulate this by copying to a new buffer. + * The copy is necessary since pcapng needs to be thread-safe + * and do atomic write operations. + */ + +#define IOV_MAX 128 +struct iovec { + void *iov_base; + size_t iov_len; +}; + +static ssize_t writev(int fd, const struct iovec *iov, int iovcnt) +{ + size_t bytes = 0; + uint8_t *ptr; + void *tmp_buf; + ssize_t ret; + int i; + + for (i = 0; i < iovcnt; i++) + bytes += iov[i].iov_len; + + if (unlikely(bytes == 0)) + return 0; + + tmp_buf = malloc(bytes); + if (unlikely(tmp_buf == NULL)) { + errno = ENOMEM; + return -1; + } + + ptr = tmp_buf; + for (i = 0; i < iovcnt; i++) { + rte_memcpy(ptr, iov[i].iov_base, iov[i].iov_len); + ptr += iov[i].iov_len; + } + + ret = write(fd, tmp_buf, bytes); + free(tmp_buf); + return ret; +} + +#define IF_NAMESIZE 16 +/* compatibility wrapper because name is optional */ +#define if_indextoname(ifindex, ifname) NULL +#endif + static inline void pcapng_init(void) { From patchwork Sun Feb 19 23:14:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 124164 X-Patchwork-Delegate: david.marchand@redhat.com 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 19CE941CE4; Mon, 20 Feb 2023 00:15:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F81442FAA; Mon, 20 Feb 2023 00:14:39 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 13F7842D8D for ; Mon, 20 Feb 2023 00:14:29 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id e5so521682plg.8 for ; Sun, 19 Feb 2023 15:14:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mO/9PH138tWHleF4Ay1kYDJt90GiGFIWwXImJCQ3GSs=; b=VFAQz2+Jx5RsqoXbmpIymMhh+XhExVLYku2dy78fsW3U2V00ph3NzkDYQEal45rWDg 8RmNP7kjU7zJmylcvsKmhc7Cfi0nirNf/L0uGxPeDMD442FYYQbMH7ax4k32b0Qzl1sP d8T4xaQBBu5UX1aszJnF0Y2dWGY1z91nqPdx/pFKinQUkQ0XU+t+N3C1Jz5IEHR/zehf G8uVkYnrT350tF5dKHXg6bMWud0StpY05PU23EA0qUmz1LJcDvO3DOdST5T6nuLm7c7W FaAKT0cBJj8nlmmqVLOJ+IUOYu8+MpWw+u7HvWxE/Z8577TtaCD7CD+m3VI1VV02OBM/ jslw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mO/9PH138tWHleF4Ay1kYDJt90GiGFIWwXImJCQ3GSs=; b=jp7nt3tCMJummWHb3ETvvermzIH5jqkpLXEwgxm2TSl1xaxGwHHGeemNfO6WAC5k4Y p8O+YzziYUUgxkMjQXVx0/QqRz/BoJTNv8lZEDaxk7rxlzX/1YHBw2LSx518vjHvS0lf BZE5N1vxLlgQTa52pfmnwGim0LgTyBcNMgi1yqtkj/6Inqlw35m1thTD1by9pP5kvCzy o7HWM3pnp4DgmTOhcW6ajvjHtcx72GnpWmWLPCjPWBh7JVGhAXppPUWtNqE0O6RsMjON c1bhvTDqtw4MWWunC6byJU8mBy3bM65cPVV/UNLZPbtzNmtsgymhGad0hoH7Q0AbRrfR SEoA== X-Gm-Message-State: AO0yUKWscY8hGf04CQAQhxlglMoIfXlMGXpsavVEJ74ATqKnsMU8ZWf9 BBdM2IwwG1HE4TPMUcZZad93TQfds/m9UMNVsdA= X-Google-Smtp-Source: AK7set+mjao9dbe67Dww5giuq1V5LNfiCUc0tQI09T90KXXnfkEfs6IuuHuqvE8vkKrjYdx8A54zUg== X-Received: by 2002:a17:903:245:b0:19c:32b1:185d with SMTP id j5-20020a170903024500b0019c32b1185dmr4189824plh.39.1676848468011; Sun, 19 Feb 2023 15:14:28 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l10-20020a170902d34a00b00192fe452e17sm683336plk.162.2023.02.19.15.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 15:14:27 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu Subject: [PATCH v4 9/9] table: enable build on Windows Date: Sun, 19 Feb 2023 15:14:16 -0800 Message-Id: <20230219231416.22524-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230219231416.22524-1-stephen@networkplumber.org> References: <20230207001937.875608-1-stephen@networkplumber.org> <20230219231416.22524-1-stephen@networkplumber.org> MIME-Version: 1.0 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 There doesn't seem to be anything keeping this from building on Windows. Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- lib/table/meson.build | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/table/meson.build b/lib/table/meson.build index 4f826b4b27e8..f8cef24b5918 100644 --- a/lib/table/meson.build +++ b/lib/table/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 - sources = files( 'rte_swx_keycmp.c', 'rte_swx_table_em.c',