diff mbox series

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

Message ID 20240410112636.18905-3-louis.peens@corigine.com (mailing list archive)
State Accepted
Commit 8910f93b95706b4b11485bb0f318f88918a46b04
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: 942 this patch: 942
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 4 maintainers not CCed: linux-doc@vger.kernel.org edumazet@google.com ryno.swart@corigine.com corbet@lwn.net
netdev/build_clang success Errors and warnings before: 953 this patch: 953
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: 953 this patch: 953
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 24 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-04-12--06-00 (tests: 962)

Commit Message

Louis Peens April 10, 2024, 11:26 a.m. UTC
From: Fei Qin <fei.qin@corigine.com>

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 <fei.qin@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
---
 Documentation/networking/devlink/nfp.rst         | 5 ++++-
 drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Jacob Keller April 10, 2024, 10:27 p.m. UTC | #1
On 4/10/2024 4:26 AM, Louis Peens wrote:
> From: Fei Qin <fei.qin@corigine.com>
> 
> 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.
> 

I was a bit confused since you didn't update the board.id to reference
something else. I am guessing in newer images, the "assembly.partno"
would be different from "pn"?

Thanks,
Jake
Louis Peens April 11, 2024, 6:18 a.m. UTC | #2
On Wed, Apr 10, 2024 at 03:27:22PM -0700, Jacob Keller wrote:
> 
> 
> On 4/10/2024 4:26 AM, Louis Peens wrote:
> > From: Fei Qin <fei.qin@corigine.com>
> > 
> > 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.
> > 
> 
> I was a bit confused since you didn't update the board.id to reference
> something else. I am guessing in newer images, the "assembly.partno"
> would be different from "pn"?

Hi - yes, they would be two different things, approximate example for
new images:
    board.id ~ AMDA2001-1003
    board.part_number ~ CGX11-A2PSNM

Old images will just have board.id. The field naming we get from the
hardware is indeed slightly confusing, but since they are used
differently we could not just update board.id.

I hope this clears things up.

Regards
Louis
> 
> Thanks,
> Jake
Jacob Keller April 11, 2024, 4:10 p.m. UTC | #3
> -----Original Message-----
> From: Louis Peens <louis.peens@corigine.com>
> Sent: Wednesday, April 10, 2024 11:19 PM
> To: Keller, Jacob E <jacob.e.keller@intel.com>
> Cc: David Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>;
> Paolo Abeni <pabeni@redhat.com>; Jiri Pirko <jiri@resnulli.us>; Fei Qin
> <fei.qin@corigine.com>; netdev@vger.kernel.org; oss-drivers@corigine.com
> Subject: Re: [PATCH net-next v5 2/2] nfp: update devlink device info output
> 
> On Wed, Apr 10, 2024 at 03:27:22PM -0700, Jacob Keller wrote:
> >
> >
> > On 4/10/2024 4:26 AM, Louis Peens wrote:
> > > From: Fei Qin <fei.qin@corigine.com>
> > >
> > > 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.
> > >
> >
> > I was a bit confused since you didn't update the board.id to reference
> > something else. I am guessing in newer images, the "assembly.partno"
> > would be different from "pn"?
> 
> Hi - yes, they would be two different things, approximate example for
> new images:
>     board.id ~ AMDA2001-1003
>     board.part_number ~ CGX11-A2PSNM
> 
> Old images will just have board.id. The field naming we get from the
> hardware is indeed slightly confusing, but since they are used
> differently we could not just update board.id.
> 
> I hope this clears things up.
> 

Yes, thanks! It might be helpful to include examples of actual values in the doc.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

> Regards
> Louis
> >
> > Thanks,
> > Jake
diff mbox series

Patch

diff --git a/Documentation/networking/devlink/nfp.rst b/Documentation/networking/devlink/nfp.rst
index a1717db0dfcc..3093642bdae4 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 635d33c0d6d3..ea75b9a06313 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