numam-dpdk/usertools
Julien Massonneau 3515fa1e5e usertools: fix pmdinfo parsing
In the display_pmd_info_strings function, the script parses the section
until to find a byte between 32 and 127, and get all data
until a byte equals to 0.
After, it searches "PMD_INFO_STRING" in the data and passes the whole
string in the parse_pmd_info_string function, which split the string
with "=" and convert it in python dict with json.loads().

But the string may contain a "=" before "PMD_INFO_STRING",
so it is not correctly split and will lead to an error
(json.decoder.JSONDecodeError).

Example of a string encountered that leads to an error:

"Ag%=C£°ÐÊ+Ë®{0´wË-£0òjB·;¾¬úPMD_INFO_STRING= {"name" :
"net_octeontx", "params" : "nr_port=<int> ", "pci_ids" : []}"

Fixes: c67c9a5c64 ("tools: query binaries for HW and other support information")
Cc: stable@dpdk.org

Signed-off-by: Julien Massonneau <julien.massonneau@6wind.com>
2020-11-22 22:22:44 +01:00
..
cpu_layout.py usertools: fix CPU layout script to be PEP8 compliant 2020-11-13 15:40:21 +01:00
dpdk-devbind.py usertools: test multiple strings with operator in 2020-11-22 22:22:44 +01:00
dpdk-pmdinfo.py usertools: fix pmdinfo parsing 2020-11-22 22:22:44 +01:00
dpdk-setup.sh usertools: warn about future removal of setup script 2020-08-07 13:39:45 +02:00
dpdk-telemetry-client.py usertools: remove unnecessary parens and else 2020-11-22 22:14:12 +01:00
dpdk-telemetry.py support python 3 only 2020-10-02 13:51:00 +02:00
meson.build usertools: add new telemetry script 2020-05-10 23:56:47 +02:00