diff mbox series

[net-next,1/2] nfp: update devlink device info output

Message ID 20240131085426.45374-2-louis.peens@corigine.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series nfp: series of minor driver improvements | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1048 this patch: 1048
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 1065 this patch: 1065
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1065 this patch: 1065
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-01--18-00 (tests: 717)

Commit Message

Louis Peens Jan. 31, 2024, 8:54 a.m. UTC
From: Fei Qin <fei.qin@corigine.com>

Newer NIC will introduce a new part number field, add it to devlink
device info.

Signed-off-by: Fei Qin <fei.qin@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jiri Pirko Jan. 31, 2024, 9:31 a.m. UTC | #1
Wed, Jan 31, 2024 at 09:54:25AM CET, louis.peens@corigine.com wrote:
>From: Fei Qin <fei.qin@corigine.com>
>
>Newer NIC will introduce a new part number field, add it to devlink
>device info.
>
>Signed-off-by: Fei Qin <fei.qin@corigine.com>
>Signed-off-by: Louis Peens <louis.peens@corigine.com>
>---
> drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
>index 635d33c0d6d3..91563b705639 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", },
>+	{ "board.pn",					"pn", },

This looks quite generic. Could you please introduce:
DEVLINK_INFO_VERSION_GENERIC_BOARD_MODEL
DEVLINK_INFO_VERSION_GENERIC_BOARD_PN
and use those while you are at it?

Thanks!

pw-bot: cr
Louis Peens Jan. 31, 2024, 9:40 a.m. UTC | #2
On Wed, Jan 31, 2024 at 10:31:51AM +0100, Jiri Pirko wrote:
> Wed, Jan 31, 2024 at 09:54:25AM CET, louis.peens@corigine.com wrote:
> >From: Fei Qin <fei.qin@corigine.com>
> >
> >Newer NIC will introduce a new part number field, add it to devlink
> >device info.
> >
> >Signed-off-by: Fei Qin <fei.qin@corigine.com>
> >Signed-off-by: Louis Peens <louis.peens@corigine.com>
> >---
> > drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> >diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
> >index 635d33c0d6d3..91563b705639 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", },
> >+	{ "board.pn",					"pn", },
> 
> This looks quite generic. Could you please introduce:
> DEVLINK_INFO_VERSION_GENERIC_BOARD_MODEL
> DEVLINK_INFO_VERSION_GENERIC_BOARD_PN
> and use those while you are at it?
We will do so, thanks.
> 
> Thanks!
> 
> pw-bot: cr
Jakub Kicinski Feb. 2, 2024, 4:29 a.m. UTC | #3
On Wed, 31 Jan 2024 10:54:25 +0200 Louis Peens wrote:
> +	{ "board.pn",					"pn", },

"part_number", spell it out, please.
Why "board"? Part number is for the entire product, isn't it?
diff mbox series

Patch

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
index 635d33c0d6d3..91563b705639 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", },
+	{ "board.pn",					"pn", },
 };
 
 static int