net/e1000: build on Windows
Checks
Commit Message
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 <u9012063@gmail.com>
---
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 <mb_pool_0>: 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(-)
Comments
On Thu, Oct 7, 2021 at 10:25 PM William Tu <u9012063@gmail.com> wrote:
>
> 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 <u9012063@gmail.com>
Please, Cc: driver maintainers when touching one.
You can pass --to-cmd or --cc-cmd ./devtools/get-maintainer.sh when
calling git send-email as suggested in the contributing howto.
https://doc.dpdk.org/guides/contributing/patches.html#sending-patches
> ---
> 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
Odd to read this, and still see testpmd getting one port afterwards.
Could you enable debug logs?
It will be verbose but let's try with --log-level=*:debug.
> testpmd: create a new mbuf pool <mb_pool_0>: 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
On Fri, Oct 8, 2021 at 8:54 AM David Marchand <david.marchand@redhat.com> wrote:
>
> On Thu, Oct 7, 2021 at 10:25 PM William Tu <u9012063@gmail.com> wrote:
> >
> > 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 <u9012063@gmail.com>
>
> Please, Cc: driver maintainers when touching one.
And I pressed Send before adding Haiyue... fixed.
On Thu, Oct 7, 2021 at 11:54 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Thu, Oct 7, 2021 at 10:25 PM William Tu <u9012063@gmail.com> wrote:
> >
> > 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 <u9012063@gmail.com>
>
> Please, Cc: driver maintainers when touching one.
> You can pass --to-cmd or --cc-cmd ./devtools/get-maintainer.sh when
> calling git send-email as suggested in the contributing howto.
> https://doc.dpdk.org/guides/contributing/patches.html#sending-patches
Got it, thanks.
>
>
> > ---
> > 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
>
> Odd to read this, and still see testpmd getting one port afterwards.
This is expected. Because I only enable 1 dpdk port (0000:03:00.0)
The 0000:1b:00.0 is still running kernel driver. I will mention it in next
version.
Thanks
William
On Fri, Oct 8, 2021 at 2:21 PM William Tu <u9012063@gmail.com> wrote:
> > > 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
> >
> > Odd to read this, and still see testpmd getting one port afterwards.
> This is expected. Because I only enable 1 dpdk port (0000:03:00.0)
> The 0000:1b:00.0 is still running kernel driver. I will mention it in next
> version.
Ok sorry, I did not notice.
No need to mention, simply start testpmd with -a 0000:03:00.0.
@@ -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)
@@ -6,6 +6,7 @@
#define _E1000_ETHDEV_H_
#include <stdint.h>
+#include <sys/queue.h>
#include <rte_flow.h>
#include <rte_time.h>
@@ -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]