From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A4759A0C43; Fri, 8 Oct 2021 19:19:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7296D40685; Fri, 8 Oct 2021 19:19:13 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id EF64F40140 for ; Fri, 8 Oct 2021 19:19:11 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10131"; a="207362108" X-IronPort-AV: E=Sophos;i="5.85,358,1624345200"; d="scan'208";a="207362108" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2021 10:19:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,358,1624345200"; d="scan'208";a="523050381" Received: from silpixa00399126.ir.intel.com ([10.237.223.151]) by orsmga001.jf.intel.com with ESMTP; 08 Oct 2021 10:18:59 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Ciara Power , David Marchand , Anatoly Burakov , Kevin Traynor , Bruce Richardson Date: Fri, 8 Oct 2021 18:18:47 +0100 Message-Id: <20211008171852.736387-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210915141030.23514-1-bruce.richardson@intel.com> References: <20210915141030.23514-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 0/5] improve telemetry support with in-memory mode 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" This patchset cleans up telemetry support for "in-memory" mode, so that multiple independent processes can be run using that mode and still have telemetry support. It also removes problems of one process removing the socket of another - which was the original issue reported. The main changes in this set are to: * disable telemetry for secondary processes, which prevents any socket conflicts in multi-process cases. * when multiple processes are run using the same runtime directory (i.e. "in-memory" mode or similar), add a counter suffix to the socket names to avoid conflicts over the socket. Each process will use the lowest available suffix, with the first process using the directory, not adding any suffix. * update the telemetry script and documentation to allow it to connect to in-memory DPDK processes. --- V7: Change from adding a pid suffix generally in "in-memory" mode, to adding an increasing counter as a suffix in case of name conflicts generally. This achieves the same result in terms of connectivity, but keeps compatibility of behaviour for the case of a single in-memory process, while also providing predictable more socket names for each process i.e. 4 running in-memory instances they will always use suffixes 1-3 for the extra 3 sockets, even across restarts. V6: fixed issue whereby the failing of the legacy telemetry init would roll-back init of the v2 telemetry, causing the socket to be deleted, even though it was still necessary. V5: Rebase on latest main after other script cleanups were merged V4: Move from simple-fix patch to proper fix patchset V3: Drop CC stable, as will have separate backport patch which does not error out, so avoiding causing problems with currently running application V2: fix build error on FreeBSD Bruce Richardson (5): eal: limit telemetry to primary processes telemetry: fix deletion of active sockets telemetry: use unique socket paths for in-memory mode usertools/dpdk-telemetry: connect to separate instances usertools/dpdk-telemetry: provide info on available sockets doc/guides/howto/telemetry.rst | 41 +++++++++++++++++++++ lib/eal/freebsd/eal.c | 2 +- lib/eal/linux/eal.c | 2 +- lib/telemetry/telemetry.c | 65 +++++++++++++++++++++++++--------- usertools/dpdk-telemetry.py | 45 ++++++++++++++++++++--- 5 files changed, 133 insertions(+), 22 deletions(-) -- 2.30.2