On 8/27/19 8:16 PM, Jakub Kicinski wrote:
On Tue, 27 Aug 2019 14:22:55 -0700, Shannon Nelson wrote:
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
b/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
index e24ef6971cd5..1ca1e33cca04 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_devlink.c
@@ -11,8 +11,28 @@
static int ionic_dl_info_get(struct devlink *dl, struct devlink_info_req
*req,
struct netlink_ext_ack *extack)
{
+ struct ionic *ionic = devlink_priv(dl);
+ struct ionic_dev *idev = &ionic->idev;
+ char buf[16];
+
devlink_info_driver_name_put(req, IONIC_DRV_NAME);
+ devlink_info_version_running_put(req,
+ DEVLINK_INFO_VERSION_GENERIC_FW_MGMT,
+ idev->dev_info.fw_version);
Are you sure this is not the FW that controls the data path?
There is only one FW rev to report, and this covers mgmt and data.
Can you add a key for that? Cause this one clearly says management..
Perhaps something like this?
/* Overall FW version */
#define DEVLINK_INFO_VERSION_GENERIC_FW "fw"
Since I don't have any board info available at this point, shall I use
my own "asic.id" and "asic.rev" strings, or in this patch shall I add
something like this to devlink.h and use them here:
/* Part number, identifier of asic design */
#define DEVLINK_INFO_VERSION_GENERIC_ASIC_ID "asic.id"
/* Revision of asic design */
#define DEVLINK_INFO_VERSION_GENERIC_ASIC_REV "asic.rev"
Yes, please add these to the generic items and document appropriately.
Sure. Is there any place besides
Documentation/networking/devlink-info-versions.rst?
sln