From 3bb946c9d323f4b47b87bd73134125d562f72448 Mon Sep 17 00:00:00 2001 From: Fei Qin Date: Wed, 10 Apr 2024 13:26:35 +0200 Subject: [PATCH 1/2] devlink: add a new info version tag Add definition and documentation for the new generic info "board.part_number". The new one is for part number specific use, and board.id is modified to match the documentation in devlink-info. Signed-off-by: Fei Qin Signed-off-by: Louis Peens Signed-off-by: David S. Miller --- Documentation/networking/devlink/devlink-info.rst | 5 +++++ include/net/devlink.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/devlink/devlink-info.rst b/Documentation/networking/devlink/devlink-info.rst index 1242b0e6826bfa..23073bc219d8ed 100644 --- a/Documentation/networking/devlink/devlink-info.rst +++ b/Documentation/networking/devlink/devlink-info.rst @@ -146,6 +146,11 @@ board.manufacture An identifier of the company or the facility which produced the part. +board.part_number +----------------- + +Part number of the board and its components. + fw -- diff --git a/include/net/devlink.h b/include/net/devlink.h index bb1af599d10105..d31769a116cef2 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -599,12 +599,14 @@ enum devlink_param_generic_id { .validate = _validate, \ } -/* Part number, identifier of board design */ +/* Identifier of board design */ #define DEVLINK_INFO_VERSION_GENERIC_BOARD_ID "board.id" /* Revision of board design */ #define DEVLINK_INFO_VERSION_GENERIC_BOARD_REV "board.rev" /* Maker of the board */ #define DEVLINK_INFO_VERSION_GENERIC_BOARD_MANUFACTURE "board.manufacture" +/* Part number of the board and its components */ +#define DEVLINK_INFO_VERSION_GENERIC_BOARD_PART_NUMBER "board.part_number" /* Part number, identifier of asic design */ #define DEVLINK_INFO_VERSION_GENERIC_ASIC_ID "asic.id" From 8910f93b95706b4b11485bb0f318f88918a46b04 Mon Sep 17 00:00:00 2001 From: Fei Qin Date: Wed, 10 Apr 2024 13:26:36 +0200 Subject: [PATCH 2/2] nfp: update devlink device info output Newer NIC will introduce a new part number, now add it into devlink device info. This patch also updates the information of "board.id" in nfp.rst to match the devlink-info.rst. Signed-off-by: Fei Qin Signed-off-by: Louis Peens Reviewed-by: Jacob Keller Signed-off-by: David S. Miller --- Documentation/networking/devlink/nfp.rst | 5 ++++- drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/devlink/nfp.rst b/Documentation/networking/devlink/nfp.rst index a1717db0dfccb6..3093642bdae411 100644 --- a/Documentation/networking/devlink/nfp.rst +++ b/Documentation/networking/devlink/nfp.rst @@ -32,7 +32,7 @@ The ``nfp`` driver reports the following versions - Description * - ``board.id`` - fixed - - Part number identifying the board design + - Identifier of the board design * - ``board.rev`` - fixed - Revision of the board design @@ -42,6 +42,9 @@ The ``nfp`` driver reports the following versions * - ``board.model`` - fixed - Model name of the board design + * - ``board.part_number`` + - fixed + - Part number of the board and its components * - ``fw.bundle_id`` - stored, running - Firmware bundle id diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c index 635d33c0d6d3f8..ea75b9a063130d 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c @@ -160,6 +160,7 @@ static const struct nfp_devlink_versions_simple { { DEVLINK_INFO_VERSION_GENERIC_BOARD_REV, "assembly.revision", }, { DEVLINK_INFO_VERSION_GENERIC_BOARD_MANUFACTURE, "assembly.vendor", }, { "board.model", /* code name */ "assembly.model", }, + { DEVLINK_INFO_VERSION_GENERIC_BOARD_PART_NUMBER, "pn", }, }; static int