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 83F94A00C4; Mon, 25 Jul 2022 18:35:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2ADE5410FA; Mon, 25 Jul 2022 18:35:58 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 5256340684 for ; Mon, 25 Jul 2022 18:35:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658766956; x=1690302956; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=G6GGRY0xwfKE8kKo/7t1alcmjooEvKWv0/cQKaS29TM=; b=ahZanyDE3o17k9aG9rjGz2y4bhFs9TxE7g0Bq8sMV1vHALDsOgUt29pJ 1koR90VUv7gdEtD97LY/jh7dKehgvzmwyxOQkqR4oqs/gI8FG74EmVN9H 5X+zRbAeyf7K9XObEE82KZVhX1/WRZR89uA9FY4QXC51Ci3Gb8W0ul7EH SDr4vQwzcrPy6HOWjvXsu99r/Zhu9OynO5rL064IcaGlafDrCLY9mEEfk CiH/hVkik2Pyabg98Mx/qjgFkFnj6WBvj30ibCy87kM+/eo4dS12WIUIr WGjwPM8q42f5WD58kUGb2CKg1le6o303ZFIM1KaoUlrcEQYAQTsrZA/dP Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10419"; a="274606792" X-IronPort-AV: E=Sophos;i="5.93,193,1654585200"; d="scan'208";a="274606792" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2022 09:35:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,193,1654585200"; d="scan'208";a="575121581" Received: from silpixa00401385.ir.intel.com (HELO silpixa00401385.ger.corp.intel.com.) ([10.237.223.47]) by orsmga006.jf.intel.com with ESMTP; 25 Jul 2022 09:35:52 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 00/13] telemetry JSON escaping and other enhancements Date: Mon, 25 Jul 2022 17:35:29 +0100 Message-Id: <20220725163543.875775-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220623164245.561371-1-bruce.richardson@intel.com> References: <20220623164245.561371-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This patchset contains fixes for the problem of handling characters returned by telemetry callbacks which require escaping when encoded in JSON format. It also includes unit tests to validate the correct encoding in such scenarios and a number of smaller enhancements to telemetry and telemetry testing. RFC->V2: * limited characters allowed in dictionary element names and command names to side-step the encoding problems there. * added support for proper escaping of dictionary string values * added more testing and test cases * added other misc telemetry cleanups and refactoring Bruce Richardson (13): test/telemetry_json: print success or failure per subtest telemetry: fix escaping of invalid json characters test/telemetry_json: add test for string character escaping telemetry: add escaping of strings in arrays test/telemetry-json: add test for escaping strings in arrays telemetry: limit characters allowed in dictionary names telemetry: add escaping of strings in dicts test/telemetry_json: add test for string escaping in objects telemetry: limit command characters test/telemetry_data: refactor for maintainability test/telemetry_data: add test cases for character escaping telemetry: eliminate duplicate code for json output telemetry: make help command more helpful app/test/test_telemetry_data.c | 138 +++++++++++++++++++-------- app/test/test_telemetry_json.c | 98 +++++++++++++++++-- doc/guides/rel_notes/deprecation.rst | 8 -- lib/telemetry/rte_telemetry.h | 8 ++ lib/telemetry/telemetry.c | 51 +++++----- lib/telemetry/telemetry_data.c | 32 +++++++ lib/telemetry/telemetry_json.h | 72 ++++++++++++-- 7 files changed, 318 insertions(+), 89 deletions(-) -- 2.34.1