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 BEB4AA0C43; Thu, 7 Oct 2021 22:25:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4039F411F9; Thu, 7 Oct 2021 22:25:04 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id B2DCE41155 for ; Thu, 7 Oct 2021 22:25:02 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id 66so889061pgc.9 for ; Thu, 07 Oct 2021 13:25:02 -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=LLM0Y+DfdEb4nFsLy5kWSZB/pQFGxg5o520vRZSzBiI=; b=X9qTiUX/AcUB1uaM2fDDgLFw3DeJusVDyD2QHa9w5xWzz1QrHk0Ucpua/NJGHQvtWc seud7e1ZnfyOpTzAAQaiWItRgPfC3NOnuul6WM54+XbNXLmVygC92xc8TNGJ9AgSyzR5 ceY7AwZg3O8lNSS53r4wKg+9Ad2lTt165qStxQg2maeZzyb3LWh0/t08iRWurLTjMkHy c9UwpXIDm5p0U07svfEOYMTwwZVqKQTXm06WoLKqeg51s3RmNyHzvPAcjfWU+PiSU3N8 aYgga1lhBok+H1tHJPYuDuDuF6twwX/5rvzrMA+ipHzAS+t3RgtopHZX7dZNoIGmTAKM bUEQ== 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=LLM0Y+DfdEb4nFsLy5kWSZB/pQFGxg5o520vRZSzBiI=; b=yQD634DDuwn8YgUNjnIrrF+/XGc21YzSs94Vdu/cwbfIRjLBrSriJoz1d8bKw5ED0k uYLYLE2aEeJU4c2lEZRyljKDbJnluPFP8X7fsggUv8gYOS7v8eQgimnSQoY5Ln8sGouS 7hZllmyqWXNn01sCKxN+DXtmlF19RAVPX6LV3QTIsqkJrsMFd2Fk9lqeF2+DBAejQLUX PDwV85ocVooQukMeHAVs2PZ8DI/02xQJ4pQbvIjO0+7enjiR7piAsg0/sVcy0rbBFbjD Wpb63L1snYXSzwTagpevipHSjkZAsQIKZ2Jw0n0AzCdoX5lFlPhl5GM7NEZrs4+ERY9r 2dIQ== X-Gm-Message-State: AOAM532EYHOjzlTmHGIHpeP+fzgckJGSM0GaapJocp46eOnScTI9mmG+ cfIISYwWwKJlCdskgrx3JxJ77cxEjWw= X-Google-Smtp-Source: ABdhPJwuNMjmEBK3glnQFNuwTP11pmphLuw3gsak/gTbweDFJFwR9nKyvVKdYDMR+wAao8t7uHU5XA== X-Received: by 2002:a62:3102:0:b0:44b:63db:fc88 with SMTP id x2-20020a623102000000b0044b63dbfc88mr6413680pfx.75.1633638301308; Thu, 07 Oct 2021 13:25:01 -0700 (PDT) Received: from localhost.localdomain (c-67-160-105-174.hsd1.wa.comcast.net. [67.160.105.174]) by smtp.gmail.com with ESMTPSA id on13sm137577pjb.23.2021.10.07.13.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 13:25:00 -0700 (PDT) From: William Tu To: dev@dpdk.org Cc: Dmitry.Kozliuk@gmail.com, pallavi.kadam@intel.com Date: Thu, 7 Oct 2021 20:24:51 +0000 Message-Id: <20211007202451.90271-1-u9012063@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/e1000: 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 e1000 driver for Windows. I tested using two Windows VM on top of VMware Fusion, creating two e1000 devices with device ID 0x10D3, verifying rx/tx works correctly using dpdk-testpmd.exe rxonly and txonly mode. Signed-off-by: William Tu --- Example when running: PS C:\dpdk> .\build\app\dpdk-testpmd.exe EAL: Detected CPU lcores: 4 EAL: Detected NUMA nodes: 1 EAL: Multi-process support is requested, but not available. EAL: WARNING: TSC frequency estimated roughly - clock timings may be less accurate. EAL: Probe PCI driver: net_e1000_em (8086:10d3) device: 0000:03:00.0 (socket 0) EAL: Requested device 0000:1b:00.0 cannot be used testpmd: create a new mbuf pool : n=171456, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Warning! port-topology=paired and odd forward ports number, the last port will p air with itself. Configuring Port 0 (socket 0) Port 0: 00:50:56:3A:4D:A6 Checking link statuses... Done No commandline core given, start packet forwarding allocation mode: native Logical Core 1 (socket 0) forwards packets on 1 streams: RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 io packet forwarding packets/burst=32 nb forwarding cores=1 - nb forwarding ports=1 port 0: RX queue number: 1 Tx queue number: 1 Rx offloads=0x0 Tx offloads=0x0 RX queue: 0 RX desc=256 - RX free threshold=0 TX desc=256 - TX free threshold=32 TX offloads=0x0 - TX RS bit threshold=32 Press enter to exit Telling cores to stop... Waiting for lcores to finish... ---------------------- Forward statistics for port 0 ------------------ RX-packets: 40361 RX-dropped: 0 RX-total: 40361 TX-packets: 40616 TX-dropped: 0 TX-total: 40616 ------------------------------------------------------------------------ +++++++++++++++ Accumulated forward statistics for all ports+++++++++++ RX-packets: 40361 RX-dropped: 0 RX-total: 40361 TX-packets: 40616 TX-dropped: 0 TX-total: 40616 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- --- drivers/net/e1000/base/e1000_osdep.h | 2 ++ drivers/net/e1000/e1000_ethdev.h | 1 + drivers/net/e1000/meson.build | 6 ------ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h index 94a49f3404..cd90228cef 100644 --- a/drivers/net/e1000/base/e1000_osdep.h +++ b/drivers/net/e1000/base/e1000_osdep.h @@ -34,7 +34,9 @@ #define DEBUGOUT6(S, args...) DEBUGOUT(S, ##args) #define DEBUGOUT7(S, args...) DEBUGOUT(S, ##args) +#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/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h index 3b4d9c3ee6..613b81f030 100644 --- a/drivers/net/e1000/e1000_ethdev.h +++ b/drivers/net/e1000/e1000_ethdev.h @@ -6,6 +6,7 @@ #define _E1000_ETHDEV_H_ #include +#include #include #include diff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build index c5e48c6bc7..296ec25f2c 100644 --- a/drivers/net/e1000/meson.build +++ b/drivers/net/e1000/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 - subdir('base') objs = [base_objs] -- 2.30.2