From: Simon Horman <horms@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, saeedm@nvidia.com,
leon@kernel.org, tariqt@nvidia.com, andrew+netdev@lunn.ch,
donald.hunter@gmail.com, parav@nvidia.com
Subject: Re: [PATCH net-next 2/4] net/mlx5: Expose serial numbers in devlink info
Date: Thu, 20 Mar 2025 13:50:49 +0000 [thread overview]
Message-ID: <20250320135049.GW280585@kernel.org> (raw)
In-Reply-To: <xtt6lkxht2ewaa7wncf2pq6rkgp7x5deoszfvh3hswrerqzfof@hvlgtcws6qx5>
On Wed, Mar 19, 2025 at 12:39:59PM +0100, Jiri Pirko wrote:
> Tue, Mar 18, 2025 at 06:38:58PM +0100, horms@kernel.org wrote:
> >On Tue, Mar 18, 2025 at 04:36:25PM +0100, Jiri Pirko wrote:
> >> From: Jiri Pirko <jiri@nvidia.com>
> >>
> >> Devlink info allows to expose serial number and board serial number
> >> Get the values from PCI VPD and expose it.
> >>
> >> $ devlink dev info
> >> pci/0000:08:00.0:
> >> driver mlx5_core
> >> serial_number e4397f872caeed218000846daa7d2f49
> >> board.serial_number MT2314XZ00YA
> >
> >Hi Jiri,
> >
> >I'm sorry if this is is somehow obvious, but what is
> >the difference between the serial number and board serial number
> >(yes, I do see that they are different numbers :)
>
> Quoting Documentation/networking/devlink/devlink-info.rst:
>
> * - ``serial_number``
> - Serial number of the device.
>
> This is usually the serial number of the ASIC, also often available
> in PCI config space of the device in the *Device Serial Number*
> capability.
>
> The serial number should be unique per physical device.
> Sometimes the serial number of the device is only 48 bits long (the
> length of the Ethernet MAC address), and since PCI DSN is 64 bits long
> devices pad or encode additional information into the serial number.
> One example is adding port ID or PCI interface ID in the extra two bytes.
> Drivers should make sure to strip or normalize any such padding
> or interface ID, and report only the part of the serial number
> which uniquely identifies the hardware. In other words serial number
> reported for two ports of the same device or on two hosts of
> a multi-host device should be identical.
>
> * - ``board.serial_number``
> - Board serial number of the device.
>
> This is usually the serial number of the board, often available in
> PCI *Vital Product Data*.
Thanks, I should have known that :)
next prev parent reply other threads:[~2025-03-20 13:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 15:36 [PATCH net-next 0/4] net/mlx5: Expose additional devlink dev info Jiri Pirko
2025-03-18 15:36 ` [PATCH net-next 1/4] ynl: devlink: add missing board-serial-number Jiri Pirko
2025-03-23 17:18 ` Simon Horman
2025-03-18 15:36 ` [PATCH net-next 2/4] net/mlx5: Expose serial numbers in devlink info Jiri Pirko
2025-03-18 17:38 ` Simon Horman
2025-03-19 11:39 ` Jiri Pirko
2025-03-20 13:50 ` Simon Horman [this message]
2025-03-23 17:18 ` Simon Horman
2025-03-18 15:36 ` [PATCH net-next 3/4] devlink: add function unique identifier to devlink dev info Jiri Pirko
2025-03-23 17:18 ` Simon Horman
2025-03-18 15:36 ` [PATCH net-next 4/4] net/mlx5: Expose function UID in devlink info Jiri Pirko
2025-03-23 17:19 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250320135049.GW280585@kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).