patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'tools: fix json output of pmdinfo' has been queued to stable release 16.07.1
Date: Wed, 12 Oct 2016 14:44:24 +0800	[thread overview]
Message-ID: <57fddbc8.V2XbpbA1QuNW+KIZ%yuanhan.liu@linux.intel.com> (raw)

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 <olivier.matz@6wind.com>
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 <olivier.matz@6wind.com>
---
 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

                 reply	other threads:[~2016-10-12  6:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57fddbc8.V2XbpbA1QuNW+KIZ%yuanhan.liu@linux.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).