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 BD62CA0C4C; Thu, 19 Aug 2021 04:19:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FBE14067E; Thu, 19 Aug 2021 04:19:48 +0200 (CEST) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mails.dpdk.org (Postfix) with ESMTP id 2303C40141 for ; Thu, 19 Aug 2021 04:19:47 +0200 (CEST) Received: by mail-lj1-f171.google.com with SMTP id s3so8673994ljp.11 for ; Wed, 18 Aug 2021 19:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WcKqTqxDXkHkKlgED9sSZoZcle1gPC8AdxM14WCzzGY=; b=Y8IXifDuAM4imgMPKeGpOOi3sObHUvZNT72xsV10bHjD8v3vihGT1ukJ+/9VakNLbQ zpaduxo9DdxsOcymKVvpmV7HGPk60j1A2Kfdp26JOjHKnXb+sv+tDVWKz9qimqsw8SzJ A4Ikdq07psD8bHMAXaYvEacP8XGWJ1adD1RgC59NpaoopAcC+f57PaaVJ0omahxLD2kz utr78f/h6ECHSnhJ0sXX+vKT7BfpKKVilBVulq5iwMSn0cX2JSN64Sb1rhQn0SCHNk3o td6DduZkUvJPX/JC8/HPAJNC5SrQeJKw4eMPBfL3BYvMTyNHS5WMvAbwS/MIjy/8Ec9+ 4jeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WcKqTqxDXkHkKlgED9sSZoZcle1gPC8AdxM14WCzzGY=; b=JXsQth7Bv84CL2W0ocDgHJdH+oIjeS2I1pLSsCTSClCTRUNmd9J4m3daW814oIFDxM 3Jtw8o7nr8Uso+4GujhUdPXpwys1Ovj6nFHarQrijA/MUjpFkXowfY8pOxzo0ks+D8vO 0HLELpa+Q8t9Y5QUA25+nZAY98JGQFefA1z8MHVmJeeEGptFMovoxl0jPJwo/QGmMwXh WgtOboWjc8ghzzaKd/7gbcCycWfDCvxL96UAVhZhxWAkfAe0HGZC57GTjC1fLk1sS0JR PVUSVZERgfwzWfVVU51LpmdL9z4zZNAMkE2aM+Rys+CG22CAIc9TWb/tPRzhf5/RxAj0 3X0A== X-Gm-Message-State: AOAM533CMnCHPpPFkG+wWxkedAZB9RbvjwFnOAXQ4+e4t9DHJnVKby1h meROQ/nkDHQGlUKretA4nB6NGeeTrCDWYIu8yfY= X-Google-Smtp-Source: ABdhPJxI213bWv8HqJdQW3GpM1eWivK0iJvZEfsUwqXbm6ADjKRLToQF09I32IDiDZXq6QMqPk56+HMJPjveu20ASf0= X-Received: by 2002:a2e:bd85:: with SMTP id o5mr10094042ljq.313.1629339586535; Wed, 18 Aug 2021 19:19:46 -0700 (PDT) MIME-Version: 1.0 References: <20210814033609.58553-1-u9012063@gmail.com> <20210814143108.128803ef@sovereign> In-Reply-To: <20210814143108.128803ef@sovereign> From: William Tu Date: Wed, 18 Aug 2021 19:19:10 -0700 Message-ID: To: Dmitry Kozlyuk Cc: dpdk-dev , Igor Chauskin , Evgeny Schemeilin , Shai Brandes , Michal Krawczyk , Marcin Wojtas , Narcisa Ana Maria Vasile Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH RFC] net/ena: Add Windows support. 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" On Sat, Aug 14, 2021 at 4:31 AM Dmitry Kozlyuk 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-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 > > --- > > 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 : 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