[dpdk-dev] [PATCH] usertools: fix parsing error from dpdk-pmdinfo.py

Thomas Monjalon thomas at monjalon.net
Sun Nov 22 22:09:34 CET 2020


19/11/2020 10:44, Julien Massonneau:
> 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: c67c9a5c646a ("tools: query binaries for HW and other support information")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Julien Massonneau <julien.massonneau at 6wind.com>

Applied, thanks




More information about the dev mailing list