Re: [dpdk-dev] [PATCH RFC] net/ena: Add Windows support.
From: Dmitry Kozlyuk <hidden>
Date: 2021-08-14 11:31:13
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-navasile@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 <redacted> --- 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.