From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 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 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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; }; -- 2.39.1