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 30135A0C41; Wed, 15 Sep 2021 20:45:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB1344003F; Wed, 15 Sep 2021 20:45:02 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 9AD164003C for ; Wed, 15 Sep 2021 20:45:00 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id n4so2184332plh.9 for ; Wed, 15 Sep 2021 11:45:00 -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:mime-version :content-transfer-encoding; bh=W5+IjMYWrMebjYwaVzMx0UKj7URDBryIlVIV0sIvMhg=; b=C206bhP+u5ZiVtDjLO7Fq+V7R7JpM3o0x10vqfxMc/G+qMe5rlnUGNn+g9KFtV+w/r gL+BUXLnc84InIl7KrnpOf7nBKpyHbiS0W2F9DcPjmNfmHLLUs1f+7LoDLhPlljED02m IFC27iYeArp27l3s01ci/8ATWdQ9FUieS6B5F52X47ke5l7fVgcj/Jbq/ocitNG7aTlj A/uIE6F3dBldW7xZTFEYegYdL2q3vedfrde6CwvhWvdm82EY8FfwNMTQQK5OYdMLwWLw PWvVTRZo+zAXFWZv0vXdwUtEF2CS42LlIKVBoPW/uf8xgjbYzv86K4EcjxOjwdlpymUg iNPA== 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:mime-version :content-transfer-encoding; bh=W5+IjMYWrMebjYwaVzMx0UKj7URDBryIlVIV0sIvMhg=; b=qWMGyIwHNZQf4m1uO4K1MHJk6HzTe/R2/BCdMNI5AFD4Jtxnm+CGBmNmgZH/Nb98OJ YE+4+QiAjOya4Z30kTeIV6pgwDODNPZnk071xgis8aWOoTLYKGBMJN2m44/oApK28AXo OySRdyV1qjzD/+USq0RmcBe4ZxISBSS+mhFtPfE377HXpEEfaIRnTT8hNG6kA/hxUcU3 DBgqAXkylqag68NZoEOrHokQq++zDGHSbJ4r4dBr4rTkcH5POeWRHbqvmIObCHmJmmm8 iwrJK59ATQpbii0XJlSiGjWafikk+9rcbcxJTT5ys38fRWmUUxvHP1WVeSMylk+YGBWD dG6A== X-Gm-Message-State: AOAM533+FGlkyZdBNikFAcErb+7GBnfyw4NpxglPAwdfBuvzTeWPBNNq H7OczApDx+C/3uU4mwg/5903ZXkf5rASfw== X-Google-Smtp-Source: ABdhPJxoZuLUZJfDsv1kCVkboZB2qPCzl/oaZyVxpmAPIppcMS4UIZs+3LXSajDhwx46TyFiwoh8wg== X-Received: by 2002:a17:902:e848:b0:13b:7a10:2929 with SMTP id t8-20020a170902e84800b0013b7a102929mr1109727plg.14.1631731498846; Wed, 15 Sep 2021 11:44:58 -0700 (PDT) Received: from localhost.localdomain (c-67-185-44-206.hsd1.wa.comcast.net. [67.185.44.206]) by smtp.gmail.com with ESMTPSA id mm6sm374347pjb.33.2021.09.15.11.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 11:44:58 -0700 (PDT) From: William Tu To: dev@dpdk.org Cc: pallavi.kadam@intel.com, ranjit.menon@intel.com, dmitry.kozliuk@gmail.com Date: Wed, 15 Sep 2021 18:44:48 +0000 Message-Id: <20210915184448.92751-1-u9012063@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1] net/ixgbe: Add support for 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 | 10 ++++++++++ drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- drivers/net/ixgbe/ixgbe_flow.c | 2 +- drivers/net/ixgbe/ixgbe_tm.c | 2 +- drivers/net/ixgbe/meson.build | 6 ------ lib/cryptodev/rte_cryptodev.c | 4 ++++ lib/cryptodev/version.map | 2 -- lib/meson.build | 2 ++ lib/security/rte_security.h | 4 ++++ lib/security/version.map | 1 - 11 files changed, 24 insertions(+), 12 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..fe28029ef7 100644 --- a/drivers/net/ixgbe/base/ixgbe_osdep.h +++ b/drivers/net/ixgbe/base/ixgbe_osdep.h @@ -17,6 +17,12 @@ #include #include +#ifndef RTE_EXEC_ENV_WINDOWS +#include +#else +#include +#endif + #include "../ixgbe_logs.h" #include "../ixgbe_bypass_defines.h" @@ -43,12 +49,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/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_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') diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index 9fa3aff1d3..dd09e82240 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -12,7 +12,11 @@ #include #include #include +#ifndef RTE_EXEC_ENV_WINDOWS #include +#else +#include +#endif #include #include diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map index 8294c9f64f..43cf937e40 100644 --- a/lib/cryptodev/version.map +++ b/lib/cryptodev/version.map @@ -93,10 +93,8 @@ EXPERIMENTAL { # added in 20.11 rte_cryptodev_configure_raw_dp_ctx; rte_cryptodev_get_raw_dp_ctx_size; - rte_cryptodev_raw_dequeue; rte_cryptodev_raw_dequeue_burst; rte_cryptodev_raw_dequeue_done; - rte_cryptodev_raw_enqueue; rte_cryptodev_raw_enqueue_burst; rte_cryptodev_raw_enqueue_done; diff --git a/lib/meson.build b/lib/meson.build index 1673ca4323..c26641f217 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -85,6 +85,8 @@ if is_windows 'gso', 'latencystats', 'pdump', + 'cryptodev', + 'security', ] # only supported libraries for windows endif diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 2e136d7929..b8ae88f7bf 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -19,9 +19,13 @@ extern "C" { #include +#ifndef RTE_EXEC_ENV_WINDOWS #include #include #include +#else +#include +#endif #include #include diff --git a/lib/security/version.map b/lib/security/version.map index c44c7f5f60..6067051552 100644 --- a/lib/security/version.map +++ b/lib/security/version.map @@ -1,7 +1,6 @@ DPDK_22 { global: - rte_security_attach_session; rte_security_capabilities_get; rte_security_capability_get; rte_security_session_create; -- 2.30.2