Add support for reading the device serial number, driver name
and various versions. Example:
$ devlink dev info pci/0000:82:00.0
pci/0000:82:00.0:
driver nfp
serial_number 16240145
versions:
fixed:
board.id AMDA0081-0001
board.rev 15
board.vendor SMA
board.model hydrogen
running:
fw.mgmt 010181.010181.0101d4
fw.cpld 0x1030000
fw.app abm-d372b6
fw.undi 0.0.2
chip.init AMDA-0081-0001 20160318164536
stored:
fw.mgmt 010181.010181.0101d4
fw.app abm-d372b6
fw.undi 0.0.2
chip.init AMDA-0081-0001 20160318164536
$ devlink -jp dev info pci/0000:82:00.0
{
"info": {
"pci/0000:82:00.0": {
"driver": "nfp",
"serial_number": "16240145",
"versions": {
"fixed": {
"board.id": "AMDA0081-0001",
"board.rev": "15",
"board.vendor": "SMA",
"board.model": "hydrogen"
},
"running": {
"fw.mgmt": "010181.010181.0101d4",
"fw.cpld": "0x1030000",
"fw.app": "abm-d372b6",
"fw.undi": "0.0.2",
"chip.init": "AMDA-0081-0001 20160318164536"
},
"stored": {
"fw.mgmt": "010181.010181.0101d4",
"fw.app": "abm-d372b6",
"fw.undi": "0.0.2",
"chip.init": "AMDA-0081-0001 20160318164536"
}
}
}
}
}
v5:
- remove spurious new line.
v4:
- more commit message improvements.
v3:
- show up-to-date output in the commit message.
v2 (Jiri):
- remove filtering;
- add example in the commit message.
RFCv2:
- make info subcommand of dev.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
|
||
|---|---|---|
| bash-completion | ||
| bridge | ||
| devlink | ||
| doc/actions | ||
| etc/iproute2 | ||
| examples | ||
| genl | ||
| include | ||
| ip | ||
| lib | ||
| man | ||
| misc | ||
| netem | ||
| rdma | ||
| schema | ||
| tc | ||
| testsuite | ||
| tipc | ||
| .clang-format | ||
| .gitignore | ||
| COPYING | ||
| Makefile | ||
| README | ||
| README.devel | ||
| README.distribution | ||
| README.iproute2+tc | ||
| README.lnstat | ||
| configure | ||
README
This is a set of utilities for Linux networking.
Information:
https://wiki.linuxfoundation.org/networking/iproute2
Download:
http://www.kernel.org/pub/linux/utils/net/iproute2/
Stable version repository:
git://git.kernel.org/pub/scm/network/iproute2/iproute2.git
Development repository:
git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git
How to compile this.
--------------------
1. libdbm
arpd needs to have the berkeleydb development libraries. For Debian
users this is the package with a name like libdbX.X-dev.
DBM_INCLUDE points to the directory with db_185.h which
is the include file used by arpd to get to the old format Berkeley
database routines. Often this is in the db-devel package.
2. make
The makefile will automatically build a config.mk file which
contains definitions of libraries that may or may not be available
on the system such as: ATM, ELF, MNL, and SELINUX.
3. To make documentation, cd to doc/ directory , then
look at start of Makefile and set correct values for
PAGESIZE=a4 , ie: a4 , letter ... (string)
PAGESPERPAGE=2 , ie: 1 , 2 ... (numeric)
and make there. It assumes, that latex, dvips and psnup
are in your path.
4. This package includes matching sanitized kernel headers because
the build environment may not have up to date versions. See Makefile
if you have special requirements and need to point at different
kernel include files.
Stephen Hemminger
stephen@networkplumber.org
Alexey Kuznetsov
kuznet@ms2.inr.ac.ru