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 912BEA0C4C; Tue, 5 Oct 2021 19:03:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D1BF41420; Tue, 5 Oct 2021 19:03:28 +0200 (CEST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 51FA1413FC for ; Tue, 5 Oct 2021 19:03:24 +0200 (CEST) Received: by mail-pg1-f170.google.com with SMTP id g184so20369013pgc.6 for ; Tue, 05 Oct 2021 10:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lBeAj2/qTvYsNpDE0e4Q5ZFg1vir0XBQlF0+rEPY46Q=; b=HsoQZtwtq2TsPNi9BZWbTm8WKr/Adj+UiRvX8GoWCYKxvyyBcx4tcR9pB9cgqR9wGi PpRmsBNiziAR4Y4NFnh0b8GmCsA1gTxejVd5C2vry0cOtHZdkmqvPm6zrQn2W/XvlTfZ gHWiLP+ZRigc12d4QiCrLyp6ut4fvFCq2D6Ih2tZH06rfzn6bSRNrDe8QgMhMpUTahk8 oGZIaQVHizDU2tMyBR7/pbldsDO4XFqQiaqNvPnpZxqBIBXZjuCrMrME74cH6zAkxnsB tvAniYE3RQ3/lb91pTswQoqJqP2hTRyNy4dvz4KLIdEPchYZ4/QqM7fM05I7SwkUBtby +CFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lBeAj2/qTvYsNpDE0e4Q5ZFg1vir0XBQlF0+rEPY46Q=; b=DFzY9HFN6Liod/1t9bHfMifVUmJkF5p8yZ4jtmtFRU+WGrf00X3gQsh44RIxIOejkH tsX1/vqXEZdSkv/ItImrocB6cOdubjQxhXl1sU1I52ctgj3Dc9G+rvjPEb0hquzEAYTZ F9nvIOa6QVIR9hzL/a5d0T7OdLTOU4CF5+SiN2fssr0OPMA9/RDmC163Qn8INRLSycFQ denr7v2jx9LJ+KQd2fpM38E6Fzo2V2ju/6iXkNYIivlNFr3hGIT8+Zy16eHeWCs9mXBf decNFL17r4Jlh1l392p4NJ2Z7Il8cS6zlExfMDPmreDgqjDaJmwisHpnv6+K5KLg5FX0 CX6w== X-Gm-Message-State: AOAM533CWylOMt/ZSno+ky/7/x1iHt+VjePwCYMBQ6yLf6XKdpmPzAsx FQV5ETLHsAfPKZ6uhyAj6GeSlj6ln7E= X-Google-Smtp-Source: ABdhPJzL3HsZ5gO5czgIJnF3cS4eELP0rIILRpTCK26jVzpABg3oKWBT00t1QSUtqt3g/VqMnVL0/g== X-Received: by 2002:aa7:8b0d:0:b0:44c:89ca:7844 with SMTP id f13-20020aa78b0d000000b0044c89ca7844mr2594789pfd.19.1633453403031; Tue, 05 Oct 2021 10:03:23 -0700 (PDT) Received: from localhost.localdomain (ec2-44-237-21-18.us-west-2.compute.amazonaws.com. [44.237.21.18]) by smtp.gmail.com with ESMTPSA id p18sm17987861pgk.28.2021.10.05.10.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 10:03:22 -0700 (PDT) From: William Tu To: dev@dpdk.org Cc: Dmitry.Kozliuk@gmail.com, pallavi.kadam@intel.com Date: Tue, 5 Oct 2021 17:02:52 +0000 Message-Id: <20211005170252.7-5-u9012063@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 In-Reply-To: <20211005170252.7-1-u9012063@gmail.com> References: <20211002003344.594-1-u9012063@gmail.com> <20211005170252.7-1-u9012063@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 4/4] net/ixgbe: 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" This patch enables building the ixgbe driver for Windows. It also enables its dependencies on security and cryptodev. I tested on AWS using ixgbe VF device, using dpdk-testpmd. Signed-off-by: William Tu --- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 1 + drivers/net/ixgbe/base/ixgbe_osdep.h | 9 +++++++++ drivers/net/ixgbe/base/meson.build | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.h | 1 + drivers/net/ixgbe/ixgbe_flow.c | 2 +- drivers/net/ixgbe/ixgbe_tm.c | 2 +- drivers/net/ixgbe/meson.build | 6 ------ 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_hv_vf.c b/drivers/net/ixgbe/base/ixgbe_hv_vf.c index b7ad44ab8c..4572411d39 100644 --- a/drivers/net/ixgbe/base/ixgbe_hv_vf.c +++ b/drivers/net/ixgbe/base/ixgbe_hv_vf.c @@ -4,6 +4,7 @@ #include "ixgbe_vf.h" #include "ixgbe_hv_vf.h" +#include "ixgbe_osdep.h" /** * Hyper-V variant - just a stub. diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h index cacf724198..6c25f608b1 100644 --- a/drivers/net/ixgbe/base/ixgbe_osdep.h +++ b/drivers/net/ixgbe/base/ixgbe_osdep.h @@ -16,10 +16,15 @@ #include #include #include +#include #include "../ixgbe_logs.h" #include "../ixgbe_bypass_defines.h" +#ifndef IPPROTO_SCTP +#define IPPROTO_SCTP 132 +#endif + #define ASSERT(x) if(!(x)) rte_panic("IXGBE: x") #define DELAY(x) rte_delay_us_sleep(x) @@ -43,12 +48,16 @@ #define false 0 #define true 1 +#ifndef RTE_EXEC_ENV_WINDOWS #define min(a,b) RTE_MIN(a,b) +#endif #define EWARN(hw, S, args...) DEBUGOUT1(S, ##args) /* Bunch of defines for shared code bogosity */ +#ifndef UNREFERENCED_PARAMETER #define UNREFERENCED_PARAMETER(_p) +#endif #define UNREFERENCED_1PARAMETER(_p) #define UNREFERENCED_2PARAMETER(_p, _q) #define UNREFERENCED_3PARAMETER(_p, _q, _r) diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build index 22972c6b56..f6497014da 100644 --- a/drivers/net/ixgbe/base/meson.build +++ b/drivers/net/ixgbe/base/meson.build @@ -29,6 +29,6 @@ foreach flag: error_cflags endforeach base_lib = static_library('ixgbe_base', sources, - dependencies: static_rte_eal, + dependencies: [static_rte_eal, static_rte_net], c_args: c_args) base_objs = base_lib.extract_all_objects(recursive: true) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 47693c0c47..8b33897ca1 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -46,6 +45,7 @@ #include "ixgbe_rxtx.h" #include "base/ixgbe_type.h" #include "base/ixgbe_phy.h" +#include "base/ixgbe_osdep.h" #include "ixgbe_regs.h" /* diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h index a0ce18ca24..645207e130 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/ixgbe/ixgbe_ethdev.h @@ -6,6 +6,7 @@ #define _IXGBE_ETHDEV_H_ #include +#include #include "base/ixgbe_type.h" #include "base/ixgbe_dcb.h" diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 511b612f7f..27322ab903 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -37,6 +36,7 @@ #include "base/ixgbe_api.h" #include "base/ixgbe_vf.h" #include "base/ixgbe_common.h" +#include "base/ixgbe_osdep.h" #include "ixgbe_ethdev.h" #include "ixgbe_bypass.h" #include "ixgbe_rxtx.h" diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c index a8407e742e..ae03ea6e9d 100644 --- a/drivers/net/ixgbe/ixgbe_tm.c +++ b/drivers/net/ixgbe/ixgbe_tm.c @@ -665,7 +665,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id, } /* check level */ if (level_id != RTE_TM_NODE_LEVEL_ID_ANY && - level_id != parent_node_type + 1) { + level_id != (uint32_t)parent_node_type + 1) { error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS; error->message = "Wrong level"; return -EINVAL; diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build index 55ac91fcd1..4b18e47273 100644 --- a/drivers/net/ixgbe/meson.build +++ b/drivers/net/ixgbe/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 - cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS'] subdir('base') -- 2.33.0.windows.2