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 EF0D5A04C5; Fri, 4 Sep 2020 01:05:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B238D1C0BD; Fri, 4 Sep 2020 01:05:08 +0200 (CEST) Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id EDA7F1C0B8 for ; Fri, 4 Sep 2020 01:05:07 +0200 (CEST) Received: by mail-pj1-f66.google.com with SMTP id gf14so2164514pjb.5 for ; Thu, 03 Sep 2020 16:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q1RJ1xGemNby+HhLQQ/M1t/2haBL4t5uWbXn6WrB9Mw=; b=w2uxj7nftOOoiag+AWHnYIsXXhae6dDjsnwobP3C7XlizXGI3fZNJP8CmqFZlzD3Bu cFfoQTgzku8AO+wqXs3VrJ8DxGaMqAtxVyqrOwnIEmXFMhik/6tnrVzS8BjJsrZLepb2 IhKBSFIQd7E9gTmFeAmZ8n3IXVhMpDdBrSCPUI5s4lgs7J976kI4rLJIbBJElDo7tWXm 83U8YqVjsAKeFSoP2f4r03uWgO4DddnAWymO9Yk1LBw2IFLlxknGph6vSB6dEG26izvL ypEq9ocnI7FGWn8sl/hCX8ZMYUF91MreATcRfLAKluGWEPRhL5a5B72Oaeyip9wsUMbY ZV8w== 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=q1RJ1xGemNby+HhLQQ/M1t/2haBL4t5uWbXn6WrB9Mw=; b=QWrOB5Q9b7RmEfAKfH29DFuOG67fdSmo7a5414rBHal81Dc5RjdQQFW9oe9avjb1Yg 0rnbNuuQbpS121kRSlozKVX8RAlmSo5KNqAGHHr2LfsbrICZmJSo8qNvVBkTF7AVHu9N ENZ3b2mqfvm76ZlXiQSDDqdYSEDj5fGxKWsXEVmPcfQrOodFsIVzPwNxthvLzuznrNwU lycHI3xP2e5QtlqVlb9yKzvjbGOzQ3iUL6RdYHrr3NnpNhBqvd+PgmaamnGP/oTNPLmh rC50L/ljUq/xpAFRz4NB0fTTKKRA1hGFZLgXMizcnsYc0gwyJAH6YzRr5Dxy/jnXMyPL rTIQ== X-Gm-Message-State: AOAM530s/RRyr3mjOutDuPg0fHJm81P+LNnZ7Pq2fvfi7TcoaHxGYXWa zQuMG9YtjgZkTeJQ123ZfzD0t/xoDy7qaQ== X-Google-Smtp-Source: ABdhPJx3GHaWGiDKm0GuYkjISXzEEvs6lwT97YUGSsTuaAv2vCpeuX2redF77Z1AQx2fAmiEiWUyPg== X-Received: by 2002:a17:90a:5283:: with SMTP id w3mr5440777pjh.201.1599174306790; Thu, 03 Sep 2020 16:05:06 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id i1sm3773790pgq.41.2020.09.03.16.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 16:05:06 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko Date: Thu, 3 Sep 2020 16:04:54 -0700 Message-Id: <20200903230454.30602-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200903230454.30602-1-stephen@networkplumber.org> References: <20200827225414.6623-1-stephen@networkplumber.org> <20200903230454.30602-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/2] rte_log: make rte_logs private 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" As announced in earlier releases, rte_logs can now be made internal to eal_common_log. Acked-by: Andrew Rybchenko Signed-off-by: Stephen Hemminger --- doc/guides/rel_notes/deprecation.rst | 4 ---- doc/guides/rel_notes/release_20_11.rst | 2 ++ lib/librte_eal/common/eal_common_log.c | 11 ++++++++--- lib/librte_eal/include/rte_log.h | 16 ++-------------- lib/librte_eal/rte_eal_version.map | 1 - 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 345c38d5b630..5445a4f0a061 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -77,10 +77,6 @@ Deprecation Notices * eal: The function ``rte_eal_remote_launch`` will return new error codes after read or write error on the pipe, instead of calling ``rte_panic``. -* eal: The ``rte_logs`` struct and global symbol will be made private to - remove it from the externally visible ABI and allow it to be updated in the - future. - * eal: The ``rte_dev_event`` structure will be made private to the EAL as no public API makes use of it. diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index df227a1773b8..e422ac790912 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -84,6 +84,8 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* eal: The ``rte_logs`` struct and global symbol was made private + and is no longer part of the API. ABI Changes ----------- diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index 8835c8fff897..a25766de181a 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -17,11 +17,16 @@ #include "eal_private.h" -/* global log structure */ -struct rte_logs rte_logs = { +/** The rte_log structure. */ +static struct rte_logs { + uint32_t type; /**< Bitfield with enabled logs. */ + uint32_t level; /**< Log level. */ + FILE *file; /**< Output file set by rte_openlog_stream, or NULL. */ + size_t dynamic_types_len; + struct rte_log_dynamic_type *dynamic_types; +} rte_logs = { .type = ~0, .level = RTE_LOG_DEBUG, - .file = NULL, }; struct rte_eal_opt_loglevel { diff --git a/lib/librte_eal/include/rte_log.h b/lib/librte_eal/include/rte_log.h index 7fe0968383db..adc5c83d4250 100644 --- a/lib/librte_eal/include/rte_log.h +++ b/lib/librte_eal/include/rte_log.h @@ -29,18 +29,6 @@ extern "C" { struct rte_log_dynamic_type; -/** The rte_log structure. */ -struct rte_logs { - uint32_t type; /**< Bitfield with enabled logs. */ - uint32_t level; /**< Log level. */ - FILE *file; /**< Output file set by rte_openlog_stream, or NULL. */ - size_t dynamic_types_len; - struct rte_log_dynamic_type *dynamic_types; -}; - -/** Global log information */ -extern struct rte_logs rte_logs; - /* SDK log type */ #define RTE_LOGTYPE_EAL 0 /**< Log related to eal. */ #define RTE_LOGTYPE_MALLOC 1 /**< Log related to malloc. */ @@ -273,7 +261,7 @@ void rte_log_dump(FILE *f); * to rte_openlog_stream(). * * The level argument determines if the log should be displayed or - * not, depending on the global rte_logs variable. + * not, depending on the loglevel settings. * * The preferred alternative is the RTE_LOG() because it adds the * level and type in the logged string. @@ -304,7 +292,7 @@ int rte_log(uint32_t level, uint32_t logtype, const char *format, ...) * to rte_openlog_stream(). * * The level argument determines if the log should be displayed or - * not, depending on the global rte_logs variable. A trailing + * not, depending on the loglevel settings. A trailing * newline may be added if needed. * * The preferred alternative is the RTE_LOG() because it adds the diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 0564f2fdc7aa..eba868ee0f38 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -115,7 +115,6 @@ DPDK_21 { rte_log_set_level; rte_log_set_level_pattern; rte_log_set_level_regexp; - rte_logs; rte_malloc; rte_malloc_dump_stats; rte_malloc_get_socket_stats; -- 2.27.0