JSON file wrongly formate ? (Mlx5Cmd.exe -stat -json )

Hello,

I am using mlx5cmd version 2.30.21713.0, and it seems to me that the JSON format is not correct

Section Adapter, the “name” : line has no cote, neither , at the end

Here attached my exemple

Json text.txt (4.52 KB)

You are right.

I do see in the WinOF-2 driver v2.30 the missing of one inverted-commas + a comma at the end of the “name” in the “json” format

I presume you have used the command # mlx5cmd.exe -stat -json (to get the output in JSON format)

if so, then notice that it is already fixed in WinOF-2 driver v2.40

Have checked & confirmed it myself (see attached mlx5cm_json_file_v2.40)

+++++++++++++++++++++++++++++++++++++++++++++++++++

PS C:> Mlx5Cmd.exe -stat | findstr driver_ver

driver_ver=2.40.22511.0

+++++++++++++++++++++++++++++++++++++++++

you can also pars it using the site: http://json.parser.online.fr/

Hope this helps

Hello,

I have installed the version 2.40 … but I still believe that it’s not correct for me

see the code here below and the attached TXT.

Thank you for your reply / help

Mlx5Cmd.exe -stat -json | Convertfrom-Json

Invalid object passed in, ‘:’ or ‘}’ expected. (662):

{

“NIC 1”: {

“Info”: {

“physical_location”: “Bus 4, Device 0, Function 1”,

“state”: “ENABLED”,

“uplink”: {

“BUS”: “PCI-E Gen3”,

“SPEED”: “8.0 GT/s”,

“WIDTH”: “x8”,

“CAPS”: “8.0*x8”,

“MaxPayloadSize”: “256 Bytes”,

“MaxReadReqSize”: “4096 Bytes”

},

“vendor_id”: “0x15b3”,

“vendor_part_id”: “4117”,

“hw_ver”: “0x0”,

“fw_ver”: “14.26.1040”,

“driver_ver”: “2.40.22511.0”,

“PSID”: “HP_2690110034”,

“system_image_guid”: “98f2:b3ff:ffde:5cd0”

},

“Adapters”: {

“Adapter 1”: {

“name”: "Embedded

“interface_description”: “HPE Ethernet 10/25Gb 2-port 640FLR-SFP28 Adapter #2”,