From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
jiri@resnulli.us, andrew@lunn.ch, f.fainelli@gmail.com,
mkubecek@suse.cz, eugenem@fb.com, jonathan.lemon@gmail.com,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next 0/7] devlink: add device (driver) information API
Date: Mon, 28 Jan 2019 19:34:13 -0800 [thread overview]
Message-ID: <20190129033420.27235-1-jakub.kicinski@netronome.com> (raw)
Hi!
fw_version field in ethtool -i does not suit modern needs with 31
characters being quite limiting on more complex systems. There is
also no distinction between the running and flashed versions of
the firmware.
Since the driver information pertains to the entire device, rather
than a particular netdev, it seems wise to move it do devlink, at
the same time fixing the aforementioned issues.
The new API allows exposing the device serial number and versions
of the components of the card - both hardware, firmware (running
and flashed). Driver authors can choose descriptive identifiers
for the version fields. A few version identifiers which seemed
relevant for most devices have been added to the global devlink
header.
Example:
$ devlink dev info pci/0000:05:00.0
pci/0000:05:00.0:
driver nfp
serial_number 16240145
versions:
fixed:
board.id AMDA0099-0001
board.rev 07
board.vendor SMA
board.model carbon
running:
fw.mgmt: 010156.010156.010156
fw.cpld: 0x44
fw.app: sriov-2.1.16
stored:
fw.mgmt: 010158.010158.010158
fw.cpld: 0x44
fw.app: sriov-2.1.20
Last patch also includes a compat code for ethtool. If driver
reports no fw_version via the traditional ethtool API, ethtool
can call into devlink and try to cram as many versions as possible
into the 31 characters.
this non-RFC, v3 some would say:
- add three more versions in the NFP patches;
- add last patch (ethool compat) - Andrew & Michal.
RFCv2:
- use one driver op;
- allow longer serial number;
- wrap the skb into an opaque request struct;
- add some common identifier into the devlink header.
Jakub Kicinski (7):
devlink: add device information API
devlink: add version reporting to devlink info API
nfp: devlink: report driver name and serial number
nfp: devlink: report fixed versions
nfp: nsp: add support for versions command
nfp: devlink: report the running and flashed versions
ethtool: add compat for devlink info
.../net/ethernet/netronome/nfp/nfp_devlink.c | 145 +++++++++++++
.../ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 61 ++++++
.../ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 20 ++
include/net/devlink.h | 59 +++++
include/uapi/linux/devlink.h | 10 +
net/core/devlink.c | 204 ++++++++++++++++++
net/core/ethtool.c | 7 +
7 files changed, 506 insertions(+)
--
2.19.2
next reply other threads:[~2019-01-29 3:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-29 3:34 Jakub Kicinski [this message]
2019-01-29 3:34 ` [PATCH net-next 1/7] devlink: add device information API Jakub Kicinski
2019-01-29 3:34 ` [PATCH net-next 2/7] devlink: add version reporting to devlink info API Jakub Kicinski
2019-01-29 3:34 ` [PATCH net-next 3/7] nfp: devlink: report driver name and serial number Jakub Kicinski
2019-01-29 3:34 ` [PATCH net-next 4/7] nfp: devlink: report fixed versions Jakub Kicinski
2019-01-29 3:34 ` [PATCH net-next 5/7] nfp: nsp: add support for versions command Jakub Kicinski
2019-01-29 3:34 ` [PATCH net-next 6/7] nfp: devlink: report the running and flashed versions Jakub Kicinski
2019-01-29 3:34 ` [PATCH net-next 7/7] ethtool: add compat for devlink info Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190129033420.27235-1-jakub.kicinski@netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=eugenem@fb.com \
--cc=f.fainelli@gmail.com \
--cc=jiri@resnulli.us \
--cc=jonathan.lemon@gmail.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).