From patchwork Thu Oct 7 22:10:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 100723 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18479A0C43; Fri, 8 Oct 2021 00:10:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED55A413DD; Fri, 8 Oct 2021 00:10:37 +0200 (CEST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mails.dpdk.org (Postfix) with ESMTP id C87F441294 for ; Fri, 8 Oct 2021 00:10:34 +0200 (CEST) Received: by mail-lf1-f44.google.com with SMTP id x27so30991827lfu.5 for ; Thu, 07 Oct 2021 15:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u0zBhMPg2UZxqNoTpQSZS/GYKyQB7o4+MX6FZQGLcQU=; b=X9w+iSqD//X+I7SSuVBEfKF1CYMSXFGexvIqwKT9Py5ISuODIS327io6BkvW3+nIC6 sSOCL+TNbQX++APAhjFRPNmPZfdNbRRSg5greNoLj93Wj1j/Y9RYp0RCXH2LXNziMRrt BpOhrwnrEMZk2bRCCnW3JN5HKx1M0cuDz5VGT/AM6a4aTOCvOfk8Pe57S9fxGl1MrcYV 0iR3sLSYT873MJ1A1m0sA9/FxdOR0RtKgYIh4Hn36qo57OQc7dTgENTNO+BMl62cO5Ep AJtbmLjUrTR5/WRFtNRyPkkCHB8dPpa0VYtGQg60Cdo745+M+Pnxo9WQAEQ54Se+iBVb OAzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u0zBhMPg2UZxqNoTpQSZS/GYKyQB7o4+MX6FZQGLcQU=; b=txTOinwMzl9iJpWK0aKSc6CVvwu1ln0z7P+Effd98lv3PYtUZTjjLkFSy9TPV8cv/s X8lgqDV0v3YbJZa/hC5IWjITuzB/c6p2X4JTbhI7zXLmQ+ExwrZeTEnqUFhmhTJeU8Yy dIWsW87e/UEQCA3ycjQmnXQQTaZDKML70ZyDgGloPGP3jWZuoR0mhtSsknMrYBtohVRj REyPFJlU28RtrFD2pbsylqP0FaRR1ug/HFbyRKZx7W0+HHxDhAPzgHYp57akQ3fw3xgK +T/Q2gHk07Ggsa5OACI2mSqirSpS2JaKkpqccpKeYcAYZwJ8zT0eTbpgxZoq5rfQAc08 c+/A== X-Gm-Message-State: AOAM5317AVk13IJzh5ILHVlPi912Nr8eaXg5vSpw2qcl9QFEmefCCtPK LE8tpzfiV6aYTbpSKQGWfm+tK9jXHxI= X-Google-Smtp-Source: ABdhPJzvp2/VDmj8gsIEno0L1UklDxbK5CdxKQLMs8SgmLxsCrZiLDSXqYW8q4KldD8BEBXCz5Xhug== X-Received: by 2002:a05:651c:2328:: with SMTP id bi40mr7116800ljb.121.1633644634301; Thu, 07 Oct 2021 15:10:34 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id y5sm57050ljc.56.2021.10.07.15.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 15:10:33 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , David Marchand , Olivier Matz , Ray Kinsella Date: Fri, 8 Oct 2021 01:10:27 +0300 Message-Id: <20211007221028.314230-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20211007221028.314230-1-dmitry.kozliuk@gmail.com> References: <20211005201545.179902-1-dmitry.kozliuk@gmail.com> <20211007221028.314230-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v5 1/2] cmdline: make struct cmdline opaque 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" Remove the definition of `struct cmdline` from public header. Deprecation notice: https://mails.dpdk.org/archives/dev/2020-September/183310.html Signed-off-by: Dmitry Kozlyuk Acked-by: David Marchand Acked-by: Olivier Matz Acked-by: Narcisa Vasile --- doc/guides/rel_notes/deprecation.rst | 4 ---- doc/guides/rel_notes/release_21_11.rst | 2 ++ lib/cmdline/cmdline.h | 19 ------------------- lib/cmdline/cmdline_private.h | 8 +++++++- 4 files changed, 9 insertions(+), 24 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 76a4abfd6b..a404276fa2 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -275,10 +275,6 @@ Deprecation Notices * metrics: The function ``rte_metrics_init`` will have a non-void return in order to notify errors instead of calling ``rte_exit``. -* cmdline: ``cmdline`` structure will be made opaque to hide platform-specific - content. On Linux and FreeBSD, supported prior to DPDK 20.11, - original structure will be kept until DPDK 21.11. - * security: The functions ``rte_security_set_pkt_metadata`` and ``rte_security_get_userdata`` will be made inline functions and additional flags will be added in structure ``rte_security_ctx`` in DPDK 21.11. diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index b55900936d..18377e5813 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -101,6 +101,8 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* cmdline: Made ``cmdline`` structure definition hidden on Linux and FreeBSD. + ABI Changes ----------- diff --git a/lib/cmdline/cmdline.h b/lib/cmdline/cmdline.h index c29762ddae..96674dfda2 100644 --- a/lib/cmdline/cmdline.h +++ b/lib/cmdline/cmdline.h @@ -7,10 +7,6 @@ #ifndef _CMDLINE_H_ #define _CMDLINE_H_ -#ifndef RTE_EXEC_ENV_WINDOWS -#include -#endif - #include #include @@ -27,23 +23,8 @@ extern "C" { #endif -#ifndef RTE_EXEC_ENV_WINDOWS - -struct cmdline { - int s_in; - int s_out; - cmdline_parse_ctx_t *ctx; - struct rdline rdl; - char prompt[RDLINE_PROMPT_SIZE]; - struct termios oldterm; -}; - -#else - struct cmdline; -#endif /* RTE_EXEC_ENV_WINDOWS */ - struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out); void cmdline_set_prompt(struct cmdline *cl, const char *prompt); void cmdline_free(struct cmdline *cl); diff --git a/lib/cmdline/cmdline_private.h b/lib/cmdline/cmdline_private.h index a87c45275c..2e93674c66 100644 --- a/lib/cmdline/cmdline_private.h +++ b/lib/cmdline/cmdline_private.h @@ -11,6 +11,8 @@ #include #ifdef RTE_EXEC_ENV_WINDOWS #include +#else +#include #endif #include @@ -22,6 +24,7 @@ struct terminal { int is_console_input; int is_console_output; }; +#endif struct cmdline { int s_in; @@ -29,11 +32,14 @@ struct cmdline { cmdline_parse_ctx_t *ctx; struct rdline rdl; char prompt[RDLINE_PROMPT_SIZE]; +#ifdef RTE_EXEC_ENV_WINDOWS struct terminal oldterm; char repeated_char; WORD repeat_count; -}; +#else + struct termios oldterm; #endif +}; /* Disable buffering and echoing, save previous settings to oldterm. */ void terminal_adjust(struct cmdline *cl);