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 85D7BA034F; Fri, 8 Oct 2021 15:55:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E9CC40DF7; Fri, 8 Oct 2021 15:55:08 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 5B17E4068E for ; Fri, 8 Oct 2021 15:55:07 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id g13-20020a17090a3c8d00b00196286963b9so9454403pjc.3 for ; Fri, 08 Oct 2021 06:55:07 -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=XCne7FGtJPu1tS1yQom4G9/Z4RmlV5Gk/zMMKbCOc3k=; b=IW0xYTn+j+yQsogESjC9H8q8J93xItOGZDssKN0REknAYi8J3/tTrY5VaNPFDxHhax mxgGGJxtAE1zJ5NX9/40iSuSyljKaxO7IvUyFm9c5JpGKXy2UdKPU+imTdnk4xfLfaYO 0/XP7dOS8vRl9NX2vu9H6kYj2c5GiFlI/jxOZA3DE8ZEpW2mc+Xh318mYUiJ/uGMG+11 liCoYLwJcoUGdtg9FWIplm71TUy8Sp6+N2cyuX1kHYpAUKvvuvMUzVfN9f2elBPv08xe QR1aKfPASz9E6kUk1VOR5GYjrKm0yxG7Up5+LhUy4aduu/cewILcm+8tyHN9OX5Keiyb BubQ== 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=XCne7FGtJPu1tS1yQom4G9/Z4RmlV5Gk/zMMKbCOc3k=; b=2yFkWlKfM30UKdrUp2jYzB06jOdfYo6kQYOVb+QOh1U81ibh6+G19GtXctqe/Vrh6M nqqTAcwzomd9SwVFou0iIrxXmyJfeFFk/JtT+ccpqgpegZlmpQBiNNVCD+bKVRm6zYiw YxmHHpPggmP7o67VwUVPQt/1d4c91h6EG6+DV4ZWL/fznkA/ApK9ENAv084EiYjKyDa3 QWvqz40leI3v6QvviNT5ZdpkdqfFeLqIJdcNxk/9+fL9NbfzJ60HfGbg611SIx66p9az IH8iUBqYqzU0Af+nkwedUGfFA7oOMGi52bcttDO1Lr2KeevpB2rahdedepp/IGvJhQgg 1Dcg== X-Gm-Message-State: AOAM5335lVf7rXl2QceSkqgMnCQt5NWKNNx2VHX9ns4TlL4HvA8nZU9b tKa/Z/q2F8eYOVc+q/ACVcwp+FG4l/M= X-Google-Smtp-Source: ABdhPJwrZDJOj2pP6PpLqhv6BO02sqzoXQ5nFtZh+MTlBbxSwddDqGuqcBpH+vS5lHcbBaZP61bruw== X-Received: by 2002:a17:90b:4c8d:: with SMTP id my13mr11846785pjb.101.1633701305827; Fri, 08 Oct 2021 06:55:05 -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 d9sm2783939pgn.64.2021.10.08.06.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 06:55:04 -0700 (PDT) From: William Tu To: dev@dpdk.org Cc: pallavi.kadam@intel.com, david.marchand@redhat.com, Haiyue Wang Date: Fri, 8 Oct 2021 06:53:46 -0700 Message-Id: <20211008135346.875-1-u9012063@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 In-Reply-To: <20211007202451.90271-1-u9012063@gmail.com> References: <20211007202451.90271-1-u9012063@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] 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 Cc: Haiyue Wang --- A short demo: https://youtu.be/UZ9hm2jQa2Y 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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --- doc/guides/nics/e1000em.rst | 13 +++++++++++++ doc/guides/nics/features/e1000.ini | 1 + doc/guides/rel_notes/release_21_11.rst | 4 ++++ drivers/net/e1000/base/e1000_osdep.h | 2 ++ drivers/net/e1000/e1000_ethdev.h | 1 + drivers/net/e1000/meson.build | 6 ------ 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/doc/guides/nics/e1000em.rst b/doc/guides/nics/e1000em.rst index 041c9a09a3a5..03ae23838bfa 100644 --- a/doc/guides/nics/e1000em.rst +++ b/doc/guides/nics/e1000em.rst @@ -1,6 +1,8 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2010-2014 Intel Corporation. +.. include:: + Driver for VM Emulated Devices ============================== @@ -153,3 +155,14 @@ The following are known limitations: #. Qemu e1000 only supports one interrupt source, so link and Rx interrupt should be exclusive. #. Qemu e1000 does not support interrupt auto-clear, application should disable interrupt immediately when woken up. + +Windows Configuration +--------------------- + +- Follow the :doc:`guide for Windows <../windows_gsg/run_apps>` + to setup the basic DPDK environment. + +- Identify the Intel\ |reg| Ethernet adapter. + +- To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository + `_. diff --git a/doc/guides/nics/features/e1000.ini b/doc/guides/nics/features/e1000.ini index 5af6040e375b..b33f5a86e2e9 100644 --- a/doc/guides/nics/features/e1000.ini +++ b/doc/guides/nics/features/e1000.ini @@ -27,6 +27,7 @@ Tx descriptor status = Y Basic stats = Y FreeBSD = Y Linux = Y +Windows = Y x86-32 = Y x86-64 = Y diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index efeffe37a0e2..e4a092e562e3 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -73,6 +73,10 @@ New Features * Implement support for tunnel offload. * Updated HWRM API to version 1.10.2.44 +* **Updated Intel e1000 emulated driver.** + + * Added Intel e1000 support on Windows. + * **Updated Intel iavf driver.** * Added Intel iavf support on Windows. diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h index 94a49f340446..cd90228cef59 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 3b4d9c3ee6f4..613b81f03092 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 c5e48c6bc7fc..296ec25f2ce7 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.33.0.windows.2