From patchwork Thu Oct 14 10:49:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 101602 X-Patchwork-Delegate: david.marchand@redhat.com 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 6D035A0C47; Thu, 14 Oct 2021 12:50:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2EBF641235; Thu, 14 Oct 2021 12:49:59 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 9B06E40041 for ; Thu, 14 Oct 2021 12:49:56 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="227609277" X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="227609277" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 03:49:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="481214283" Received: from silpixa00399126.ir.intel.com ([10.237.223.151]) by orsmga007.jf.intel.com with ESMTP; 14 Oct 2021 03:49:54 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Ciara Power , David Marchand , Anatoly Burakov , Kevin Traynor , Bruce Richardson , Conor Walsh Date: Thu, 14 Oct 2021 11:49:04 +0100 Message-Id: <20211014104907.856490-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211014104907.856490-1-bruce.richardson@intel.com> References: <20210915141030.23514-1-bruce.richardson@intel.com> <20211014104907.856490-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 1/4] eal: limit telemetry to primary processes 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" Telemetry interface should be exposed for primary processes only, since secondary processes will conflict on socket creation, and since all data in secondary process is generally available to primary. For example, all device stats for ethdevs, cryptodevs, etc. will all be common across processes. Signed-off-by: Bruce Richardson Acked-by: Ciara Power Tested-by: Conor Walsh --- lib/eal/freebsd/eal.c | 2 +- lib/eal/linux/eal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c index fb734012a4..56a60f13e9 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -950,7 +950,7 @@ rte_eal_init(int argc, char **argv) rte_eal_init_alert("Cannot clear runtime directory"); return -1; } - if (!internal_conf->no_telemetry) { + if (rte_eal_process_type() == RTE_PROC_PRIMARY && !internal_conf->no_telemetry) { int tlog = rte_log_register_type_and_pick_level( "lib.telemetry", RTE_LOG_WARNING); if (tlog < 0) diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 3577eaeaa4..0d0fc66668 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1320,7 +1320,7 @@ rte_eal_init(int argc, char **argv) rte_eal_init_alert("Cannot clear runtime directory"); return -1; } - if (!internal_conf->no_telemetry) { + if (rte_eal_process_type() == RTE_PROC_PRIMARY && !internal_conf->no_telemetry) { int tlog = rte_log_register_type_and_pick_level( "lib.telemetry", RTE_LOG_WARNING); if (tlog < 0)