On Sat, Aug 14, 2021 at 4:31 AM Dmitry Kozlyuk <dmitry.kozl...@gmail.com> wrote: > > Hi William, > > 2021-08-14 03:36 (UTC+0000), William Tu: > > I don't have a physical Windows testbed so I want to see if I can > > get virtual nic working, in this case ENA driver on AWS. > > The patch passes build on Windows, but I haven't tested loading > > the ena driver. > > I want to know if this is the right direction, > > or whether I also need to change other places in ENA driver? > > Cc'ing maintainers. > > > I copy some of the pthread code from > > https://nachtimwald.com/2019/04/05/cross-platform-thread-wrapper/ > > We don't want to add more pthread shims, pthread.h in DPDK will go away. > Condition variable support should be added to the new threading API: > > > http://inbox.dpdk.org/dev/1628017291-3756-1-git-send-email-navas...@linux.microsoft.com > > I suppose it can be done independently of the new threading API series. > When copying code to DPDK from elsewhere, please adapt its style to DPDK > conventions (e.g. `RTE_UNUSED(foo)` instead if `(void)foo`) and mind the > license if big pieces are copied verbatim (this is not the case here). > > > https://stackoverflow.com/questions/10905892/equivalent-of-gettimeday-for-windows > > POSIX gettimeofday() should be replaced with standard C timespec_get(). > > > Thanks. > > > > Signed-off-by: William Tu <u9012...@gmail.com> > > --- > > drivers/net/ena/base/ena_com.c | 4 +- > > drivers/net/ena/base/ena_plat.h | 2 +- > > drivers/net/ena/base/ena_plat_dpdk.h | 14 +++- > > drivers/net/ena/meson.build | 5 -- > > lib/eal/version.map | 2 +- > > lib/eal/windows/include/pthread.h | 105 ++++++++++++++++++++++++++ > > lib/eal/windows/include/rte_windows.h | 1 + > > 7 files changed, 120 insertions(+), 13 deletions(-) > > This should be a series of two patches: > 1) adding condition variable wrappers to EAL; > 2) supporting net/ena for Windows. > So I finally set up everything on AWS and tested this patch. Virt2phys and netuio (I added ena conf) load OK. Finally, starting dpdk-testpmd, I got some errors below: --- PS C:\dpdk-kmods> cd c:\dpdk PS C:\dpdk> .\build\app\dpdk-testpmd.exe EAL: Detected 4 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process support is requested, but not available. EAL: WARNING: TSC frequency estimated roughly - clock timings may be less accurate. EAL: Requested device 0000:00:05.0 cannot be used EAL: Probe PCI driver: net_ena (1d0f:ec20) device: 0000:00:06.0 (socket 0) EAL: eth_ena_pci_probe[ENA_COM: ena_com_wait_and_process_admin_cq_interrupts]Invalid wait event. pthread ret: 1 [ENA_COM: ena_com_wait_and_process_admin_cq_interrupts]The ena device sent a completion but the driver didn 't receive a MSI-X interrupt (cmd 9), autopolling mode is OFF [ENA_COM: ena_com_set_dev_mtu]Failed to set mtu 1500. error: -137 ena_mtu_set(): Could not set MTU: 1500 Failed to set MTU to 1500 for port 0 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 pair with itself. Configuring Port 0 (socket 0) [ENA_COM: ena_com_create_io_cq]Failed to create IO CQ. error: -19 ena_create_io_queue(): Failed to create IO queue[0] (qid:1), rc: -19 ena_queue_start(): Failed to create IO queue ena_queue_start_all(): Failed to start queue[0] of type(1) Fail to start port 0: No such device Please stop the ports first Done Error during enabling promiscuous mode for port 0: Unknown error - ignore No commandline core given, start packet forwarding Not all ports were started --- I will see if I can fix these issues and I will submit v2 patch. Thanks William