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 684A9A04C0; Mon, 28 Sep 2020 23:51:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A9A9E1D64E; Mon, 28 Sep 2020 23:51:34 +0200 (CEST) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by dpdk.org (Postfix) with ESMTP id 237A91BDDF for ; Mon, 28 Sep 2020 23:51:33 +0200 (CEST) Received: by mail-lf1-f65.google.com with SMTP id x69so3094934lff.3 for ; Mon, 28 Sep 2020 14:51:33 -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=/48JdGfcu/5JmxmFs3n5esweycERm7NOtqdXM+uk2uw=; b=S4VdhZx+R/ltsPH9Ax2rHendSIt88ZrsceorjpZEhpRDM8rCqTgflRGnrke/kH0KgB CFf5rbtpuqDOLv46HMjLCU8iYICZaBWfV9OBiiaKEVXrPeBcNveEevUNtFhH+3dneFO2 jzJ4Fe+dU4ucSGAeTaIFFto7rOAcXkOKp51IHpzCysq6MPwpo3WQCfAOPViBjdfC2t+B sid9YV7g52+6QrQGpBWcQCo3ees0L+LRIHXKFYgjaoJHsoJiJE+MB+OxLtNVKbfE7qEy +vodqNzCrrft66a7RkYRcT4RKd3GueO5N5UkRwAWNyuwLhey7KRKwzFZpFVd9V2SeXCQ 0tPA== 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=/48JdGfcu/5JmxmFs3n5esweycERm7NOtqdXM+uk2uw=; b=YY3de4sSqM08wMqvjNbQI6oDxhfQXS3a74UhicPY0rDA5VfThJca7puxlCpU2tpAF1 QPiIyDqgBbj4x7Qv4HBdJEeKciNOyg3vLN8vvY1jTjwLHkIUqSNA9t/9usskZpW8fuxJ oP23eWtapHBpMYLPWoutSmehvPyG2UtSZbIGXsHr85MBeTqCI/HUK+c+SAQndP/vSgF6 T46Bq416kpsmXe1ZmMiZlAkg1redMIFfMYE2ZPx/ySROIGwXEAP6uUIYcxX1pgcXWiEW B5pr/n8GZVk4ccGNdpVEGZEJcMdZJJnpYiQTpgeMt7jVt6sVtCO2P19hRCW1SBt3tzWs C25Q== X-Gm-Message-State: AOAM530xpVaMuifdhiykArycHnTeXkU4+1Bs96+R1o7pTx9jwhN0f+h0 wyYB9YPLLsQsI7dipBckrqLZCej5Ic2T3BmV X-Google-Smtp-Source: ABdhPJzW9r5udqZ5Hr8FDTadioPertXTzu7ysuGPlJ+xkLEbTS1Db+ZoUbUG7ukZNjeEbFMigvc8qg== X-Received: by 2002:a19:745:: with SMTP id 66mr89874lfh.142.1601329891387; Mon, 28 Sep 2020 14:51:31 -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 l11sm2954893lfk.113.2020.09.28.14.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:51:30 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: "Kinsella, Ray" , Khoa To , Stephen Hemminger , Ferruh Yigit , Dmitry Kozlyuk Date: Tue, 29 Sep 2020 00:50:45 +0300 Message-Id: <20200928215052.23627-1-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200730210652.14568-1-dmitry.kozliuk@gmail.com> References: <20200730210652.14568-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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 v3: * Add #ifdef workaround to keep API/ABI for Unices (Olivier). * Fix missing cmdline_free() in test (Olivier). * Rebase on ToT (Khoa). Dmitry Kozlyuk (7): cmdline: make implementation logically 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 | 44 ++--- config/meson.build | 2 + doc/guides/rel_notes/deprecation.rst | 4 + examples/cmdline/commands.c | 1 - examples/cmdline/main.c | 1 - examples/meson.build | 6 +- lib/librte_cmdline/cmdline.c | 30 +-- lib/librte_cmdline/cmdline.h | 18 +- lib/librte_cmdline/cmdline_os_unix.c | 53 +++++ lib/librte_cmdline/cmdline_os_windows.c | 207 ++++++++++++++++++++ lib/librte_cmdline/cmdline_parse.c | 5 +- lib/librte_cmdline/cmdline_private.h | 53 +++++ 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, 475 insertions(+), 68 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.28.0