From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id AB8D6F94 for ; Wed, 12 Oct 2016 08:44:41 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 11 Oct 2016 23:44:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,332,1473145200"; d="scan'208";a="18797171" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga005.jf.intel.com with ESMTP; 11 Oct 2016 23:44:40 -0700 Date: Wed, 12 Oct 2016 14:44:24 +0800 From: Yuanhan Liu To: Olivier Matz Cc: dpdk stable Message-ID: <57fddbc8.V2XbpbA1QuNW+KIZ%yuanhan.liu@linux.intel.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [dpdk-stable] patch 'tools: fix json output of pmdinfo' has been queued to stable release 16.07.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 06:44:42 -0000 Hi, FYI, your patch has been queued to stable release 16.07.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before this Friday. So please shutout if anyone has objections. Thanks. --yliu --- >>From dd65e607929b21cf80fbb6bc3f63f4a3866db1e3 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Fri, 26 Aug 2016 15:15:32 +0200 Subject: [PATCH] tools: fix json output of pmdinfo [ upstream commit 5e3e5f0b569d3256b7b2bcb7566d13bb2771198a ] Using dpdk-pmdinfo with the '-r' flag does not produce a json output as documented. Instead, the python representation of the json object is shown, which is nearly the same, but cannot be properly parsed by a json parser. python repr (before): {u'pci_ids': [[5549, 1968, 65535, 65535]], u'name': u'vmxnet3'} json (after): {"pci_ids": [[5549, 1968, 65535, 65535]], "name": "vmxnet3"} Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information") Signed-off-by: Olivier Matz --- tools/dpdk-pmdinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dpdk-pmdinfo.py b/tools/dpdk-pmdinfo.py index dcc8db8..3db9819 100755 --- a/tools/dpdk-pmdinfo.py +++ b/tools/dpdk-pmdinfo.py @@ -319,7 +319,7 @@ class ReadElf(object): pmdinfo = json.loads(mystring) if raw_output: - print(pmdinfo) + print(json.dumps(pmdinfo)) return print("PMD NAME: " + pmdinfo["name"]) -- 1.9.0