From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 540F1A052B; Thu, 30 Jul 2020 23:07:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8E0F12BB8; Thu, 30 Jul 2020 23:07:23 +0200 (CEST) Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by dpdk.org (Postfix) with ESMTP id 9A17D3B5 for ; Thu, 30 Jul 2020 23:07:22 +0200 (CEST) Received: by mail-lf1-f66.google.com with SMTP id u13so2273529lff.11 for ; Thu, 30 Jul 2020 14:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jmBWw+FqysAj5qi+m4J5k4jKXBsW7hdNpBC7A9fit+A=; b=C5AEm9acYPymG2YLJZ79I1nyPyrTpnNtiDrDFKXltuZe/GnmoWUTTT5A4Kl3iROG11 XcrXHilvPd/WIu1oxbJDj+3g3/+n8pTAnKslx/0Sa0J8+XFHS3lLm/uSU+57aWWwLTXS J591pBDY7y5YLEfe9Bc1eFp0pCA4nunq3Sb7FWuwNzaBcFD1CuyCpV2myl6lnn8OGPDM AC6sW6SmsLNSS36Nz4bSDzVvrxl35a392ZwgHYaJ+8HL4q5Q4lvdABA9K/rdaLqwVAXo SfmqXsxn1MWMx6t/p6mv3sp1u7B+Y+EU0K6SZtrtvOmtBN9EV31R4qHrGlcPz8lDYdRu HvzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jmBWw+FqysAj5qi+m4J5k4jKXBsW7hdNpBC7A9fit+A=; b=Kujql/F0tdgckDgkOMTWrJ74/qXJM7zG2rHcHtkiaseKDmSvGDCvF9rCdZMNn3J/tm xfjE2Wdx3RVo+YOCB1RmKzp8SvTPqFxAq3zXPcYRCJMQKg1Tw3vaeyzYObUg0SZ/dRGZ Ah8+/4H8oEnp9np5J6oNB9IoqKsKdfV/JABQ/suDZYPigFlqQS9V7+nyGQHlg45ddnCW ZCTKbtgl5uRzeBTGQM3uTCTCNuQBsCyfdqVrPYgp3DDVZ+dRpOtfGqAOauRcMdThC9dC m4m4A35EoLzbFPvyD9Ig5AvWqifYU/qafrtllTYOEZM6JS2AqYpcRGYujFPh9+sUfLgu 2pBA== X-Gm-Message-State: AOAM533t7bViLskhypwllfLk3AUAx92ypL+1qutmRd5ZO+XChvMcNNZm EBcFZku8YDgoWsbMCsF85kr/DeWDLes= X-Google-Smtp-Source: ABdhPJwUNzxoC6Baj41K2T324gORfZGr3DS82fj9gudJTr5DYKwHvoTxw7aUuIo9UUyuEf6zZkilOg== X-Received: by 2002:ac2:46d4:: with SMTP id p20mr247927lfo.109.1596143241726; Thu, 30 Jul 2020 14:07:21 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id y9sm1257763lji.49.2020.07.30.14.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 14:07:20 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , "Kadam, Pallavi" , Dmitry Kozlyuk Date: Fri, 31 Jul 2020 00:06:44 +0300 Message-Id: <20200730210652.14568-1-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200620210511.13134-1-dmitry.kozliuk@gmail.com> References: <20200620210511.13134-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 0/7] cmdline: support Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" This patchset enables librte_cmdline on Windows. To do that, it creates a number of wrappers for OS-dependent terminal handling and I/O. Considered alternative was to revive [1] and use libedit (Unix-only) for terminal handling. However, testing revealed that WinEditLine [2] is not a drop-in replacement for libedit, so this solution wouldn't be universal. [1]: http://patchwork.dpdk.org/patch/38561 [2]: http://mingweditline.sourceforge.net --- Depends-on: series-10382 ("compile librte_net for windows") v2: rebase on ToT, remove already merged dependencies. Dmitry Kozlyuk (7): cmdline: make implementation opaque cmdline: add internal wrappers for terminal handling cmdline: add internal wrappers for character input cmdline: add internal wrapper for vdprintf eal/windows: improve compatibility networking headers cmdline: support Windows examples/cmdline: build on Windows app/test-cmdline/commands.c | 8 +- app/test/test_cmdline_lib.c | 42 ++-- config/meson.build | 2 + examples/cmdline/commands.c | 1 - examples/cmdline/main.c | 1 - examples/meson.build | 6 +- lib/librte_cmdline/Makefile | 4 + lib/librte_cmdline/cmdline.c | 29 +-- lib/librte_cmdline/cmdline.h | 15 +- lib/librte_cmdline/cmdline_os_unix.c | 53 +++++ lib/librte_cmdline/cmdline_os_windows.c | 207 ++++++++++++++++++++ lib/librte_cmdline/cmdline_parse.c | 4 +- lib/librte_cmdline/cmdline_private.h | 61 ++++++ lib/librte_cmdline/cmdline_socket.c | 25 +-- lib/librte_cmdline/cmdline_vt100.c | 1 - lib/librte_cmdline/cmdline_vt100.h | 4 + lib/librte_cmdline/meson.build | 6 + lib/librte_cmdline/rte_cmdline_version.map | 8 + lib/librte_eal/windows/include/arpa/inet.h | 30 +++ lib/librte_eal/windows/include/netinet/in.h | 12 ++ lib/librte_eal/windows/include/sys/socket.h | 24 +++ lib/meson.build | 1 + 22 files changed, 470 insertions(+), 74 deletions(-) create mode 100644 lib/librte_cmdline/cmdline_os_unix.c create mode 100644 lib/librte_cmdline/cmdline_os_windows.c create mode 100644 lib/librte_cmdline/cmdline_private.h create mode 100644 lib/librte_eal/windows/include/arpa/inet.h create mode 100644 lib/librte_eal/windows/include/sys/socket.h -- 2.25.4