From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id C63B6A0C47;
	Thu, 14 Oct 2021 12:49:57 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 40C964112E;
	Thu, 14 Oct 2021 12:49:57 +0200 (CEST)
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by mails.dpdk.org (Postfix) with ESMTP id 85AFB40041
 for <dev@dpdk.org>; Thu, 14 Oct 2021 12:49:55 +0200 (CEST)
X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="227609276"
X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="227609276"
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:54 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="481214273"
Received: from silpixa00399126.ir.intel.com ([10.237.223.151])
 by orsmga007.jf.intel.com with ESMTP; 14 Oct 2021 03:49:53 -0700
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Ciara Power <ciara.power@intel.com>,
 David Marchand <david.marchand@redhat.com>,
 Anatoly Burakov <anatoly.burakov@intel.com>,
 Kevin Traynor <ktraynor@redhat.com>,
 Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 14 Oct 2021 11:49:03 +0100
Message-Id: <20211014104907.856490-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 v9 0/4] 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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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.

---
V9: sort output lines in help text in script

V8: Merged patches 2 & 3 of the set together. Fixed some checkpatch warnings
flagged by the CI.

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 (4):
  eal: limit telemetry to primary processes
  telemetry: fix socket path conflicts 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