On Mon, 6 Jul 2020 08:34:50 +0200 Jiri Pirko <j...@resnulli.us> wrote:
> Sun, Jul 05, 2020 at 08:03:01PM CEST, step...@networkplumber.org wrote: > >On Mon, 29 Jun 2020 13:13:04 +0530 > >Vasundhara Volam <vasundhara-v.vo...@broadcom.com> wrote: > > > >> Add support for reading board serial_number to devlink info > >> subcommand. Example: > >> > >> $ devlink dev info pci/0000:af:00.0 -jp > >> { > >> "info": { > >> "pci/0000:af:00.0": { > >> "driver": "bnxt_en", > >> "serial_number": "00-10-18-FF-FE-AD-1A-00", > >> "board.serial_number": "433551F+172300000", > >> "versions": { > >> "fixed": { > >> "board.id": "7339763 Rev 0.", > >> "asic.id": "16D7", > >> "asic.rev": "1" > >> }, > >> "running": { > >> "fw": "216.1.216.0", > >> "fw.psid": "0.0.0", > >> "fw.mgmt": "216.1.192.0", > >> "fw.mgmt.api": "1.10.1", > >> "fw.ncsi": "0.0.0.0", > >> "fw.roce": "216.1.16.0" > >> } > >> } > >> } > >> } > >> } > > > >Although this is valid JSON, many JSON style guides do not allow > >for periods in property names. This is done so libraries can use > >dot notation to reference objects. > > > >Also the encoding of PCI is problematic > > Well, besides board.serial_number, this is what we have right now... Could you investigate JSON usage and decide what style to use. The rest of iproute2 doesn't do it.