From d1c7029a529e678b15454068f47d95d347cc3b8b Mon Sep 17 00:00:00 2001 From: William Tu Date: Tue, 19 Oct 2021 20:47:49 -0700 Subject: [PATCH] net/e1000: build on Windows 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 (8274L), verifying rx/tx works correctly using dpdk-testpmd.exe rxonly and txonly mode. Signed-off-by: William Tu Acked-by: Haiyue Wang Acked-by: Pallavi Kadam Tested-by: Dmitry Kozlyuk Tested-by: Pallavi Kadam --- 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 ------ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/guides/nics/features/e1000.ini b/doc/guides/nics/features/e1000.ini index 5af6040e37..b33f5a86e2 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 b86733c7b9..f77afc1400 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -148,6 +148,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 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 93bee734ae..7d5d637785 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]