Skip to content

Commit

Permalink
Merge branch 'nfp-minor-improvements'
Browse files Browse the repository at this point in the history
Louis Peens says:

====================
nfp: series of minor driver improvements

This short series bundles now only includes a small update to add a
board part number to devlink. Previously some dim patches also formed
part of this series, these were dropped in v5.

Patch1: Add new define for devlink string "board.part_number"
Patch2: Make use of this field in the nfp driver

Changes since V4:
- Dropped the dim patches, as there is a more significant rework in
  progress to make it more flexible, as mentioned in the V4 review:
  https://lore.kernel.org/all/[email protected]/
- Updated the devlink description of 'board.part_number'

Changes since V3:
- Fixed: Documentation/networking/devlink/devlink-info.rst:150:
    WARNING: Title underline too short.

Changes since V2:
- After some discussion on the previous series it was agreed that only
  the "board.part_number" field makes sense in the common code. The
  "board.model" field which was moved to devlink common code in V1 is
  now kept in the driver. The field is specific to the nfp driver,
  exposing the codename of the board.
- In summary, add "board.part_number" to devlink, and populate it
  in the the nfp driver.

Changes since V1:
- Move nfp local defines to devlink common code as it is quite generic.
- Add new 'dim' profile instead of using driver local overrides, as this
  allows use of the 'dim' helpers.
- This expanded 2 patches to 4, as the common code changes are split
  into seperate patches.
====================

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Apr 12, 2024
2 parents 697a6c8 + 8910f93 commit 982a73c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Documentation/networking/devlink/devlink-info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
--

Expand Down
5 changes: 4 additions & 1 deletion Documentation/networking/devlink/nfp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/netronome/nfp/nfp_devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion include/net/devlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 982a73c

Please sign in to comment.