All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net] ice: Print the api_patch as part of the fw.mgmt.api
@ 2021-09-27 18:21 Brett Creeley
  2021-09-30 16:29 ` G, GurucharanX
  0 siblings, 1 reply; 2+ messages in thread
From: Brett Creeley @ 2021-09-27 18:21 UTC (permalink / raw)
  To: intel-wired-lan

Currently when a user uses "devlink dev info", the fw.mgmt.api will be
the major.minor numbers as shown below:

devlink dev info pci/0000:3b:00.0
pci/0000:3b:00.0:
  driver ice
  serial_number 00-01-00-ff-ff-00-00-00
  versions:
      fixed:
        board.id K91258-000
      running:
        fw.mgmt 6.1.2
        fw.mgmt.api 1.7 <--- No patch number included
        fw.mgmt.build 0xd75e7d06
        fw.mgmt.srev 5
        fw.undi 1.2992.0
        fw.undi.srev 5
        fw.psid.api 3.10
        fw.bundle_id 0x800085cc
        fw.app.name ICE OS Default Package
        fw.app 1.3.27.0
        fw.app.bundle_id 0xc0000001
        fw.netlist 3.10.2000-3.1e.0
        fw.netlist.build 0x2a76e110
      stored:
        fw.mgmt.srev 5
        fw.undi 1.2992.0
        fw.undi.srev 5
        fw.psid.api 3.10
        fw.bundle_id 0x800085cc
        fw.netlist 3.10.2000-3.1e.0
        fw.netlist.build 0x2a76e110

There are many features in the driver that depend on the major, minor,
and patch version of the FW. Without the patch number in the output for
fw.mgmt.api debugging issues related to the FW API version is difficult.
Also, using major.minor.patch aligns with the existing firmware version
which uses a 3 digit value.

Fix this by making the fw.mgmt.api print the major.minor.patch
versions. Shown below is the result:

devlink dev info pci/0000:3b:00.0
pci/0000:3b:00.0:
  driver ice
  serial_number 00-01-00-ff-ff-00-00-00
  versions:
      fixed:
        board.id K91258-000
      running:
        fw.mgmt 6.1.2
        fw.mgmt.api 1.7.9 <--- patch number included
        fw.mgmt.build 0xd75e7d06
        fw.mgmt.srev 5
        fw.undi 1.2992.0
        fw.undi.srev 5
        fw.psid.api 3.10
        fw.bundle_id 0x800085cc
        fw.app.name ICE OS Default Package
        fw.app 1.3.27.0
        fw.app.bundle_id 0xc0000001
        fw.netlist 3.10.2000-3.1e.0
        fw.netlist.build 0x2a76e110
      stored:
        fw.mgmt.srev 5
        fw.undi 1.2992.0
        fw.undi.srev 5
        fw.psid.api 3.10
        fw.bundle_id 0x800085cc
        fw.netlist 3.10.2000-3.1e.0
        fw.netlist.build 0x2a76e110

Fixes: ff2e5c700e08 ("ice: add basic handler for devlink .info_get")
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
---
 Documentation/networking/devlink/ice.rst     | 9 +++++----
 drivers/net/ethernet/intel/ice/ice_devlink.c | 3 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Documentation/networking/devlink/ice.rst b/Documentation/networking/devlink/ice.rst
index a432dc419fa4..5d97cee9457b 100644
--- a/Documentation/networking/devlink/ice.rst
+++ b/Documentation/networking/devlink/ice.rst
@@ -30,10 +30,11 @@ The ``ice`` driver reports the following versions
         PHY, link, etc.
     * - ``fw.mgmt.api``
       - running
-      - 1.5
-      - 2-digit version number of the API exported over the AdminQ by the
-        management firmware. Used by the driver to identify what commands
-        are supported.
+      - 1.5.1
+      - 3-digit version number (major.minor.patch) of the API exported over
+        the AdminQ by the management firmware. Used by the driver to
+        identify what commands are supported. Historical versions of the
+        kernel only displayed a 2-digit version number (major.minor).
     * - ``fw.mgmt.build``
       - running
       - 0x305d955f
diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c
index 14afce82ef63..da7288bdc9a3 100644
--- a/drivers/net/ethernet/intel/ice/ice_devlink.c
+++ b/drivers/net/ethernet/intel/ice/ice_devlink.c
@@ -63,7 +63,8 @@ static int ice_info_fw_api(struct ice_pf *pf, struct ice_info_ctx *ctx)
 {
 	struct ice_hw *hw = &pf->hw;
 
-	snprintf(ctx->buf, sizeof(ctx->buf), "%u.%u", hw->api_maj_ver, hw->api_min_ver);
+	snprintf(ctx->buf, sizeof(ctx->buf), "%u.%u.%u", hw->api_maj_ver,
+		 hw->api_min_ver, hw->api_patch);
 
 	return 0;
 }
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Intel-wired-lan] [PATCH net] ice: Print the api_patch as part of the fw.mgmt.api
  2021-09-27 18:21 [Intel-wired-lan] [PATCH net] ice: Print the api_patch as part of the fw.mgmt.api Brett Creeley
@ 2021-09-30 16:29 ` G, GurucharanX
  0 siblings, 0 replies; 2+ messages in thread
From: G, GurucharanX @ 2021-09-30 16:29 UTC (permalink / raw)
  To: intel-wired-lan



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Brett Creeley
> Sent: Monday, September 27, 2021 11:52 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net] ice: Print the api_patch as part of the
> fw.mgmt.api
> 
> Currently when a user uses "devlink dev info", the fw.mgmt.api will be the
> major.minor numbers as shown below:
> 
> devlink dev info pci/0000:3b:00.0
> pci/0000:3b:00.0:
>   driver ice
>   serial_number 00-01-00-ff-ff-00-00-00
>   versions:
>       fixed:
>         board.id K91258-000
>       running:
>         fw.mgmt 6.1.2
>         fw.mgmt.api 1.7 <--- No patch number included
>         fw.mgmt.build 0xd75e7d06
>         fw.mgmt.srev 5
>         fw.undi 1.2992.0
>         fw.undi.srev 5
>         fw.psid.api 3.10
>         fw.bundle_id 0x800085cc
>         fw.app.name ICE OS Default Package
>         fw.app 1.3.27.0
>         fw.app.bundle_id 0xc0000001
>         fw.netlist 3.10.2000-3.1e.0
>         fw.netlist.build 0x2a76e110
>       stored:
>         fw.mgmt.srev 5
>         fw.undi 1.2992.0
>         fw.undi.srev 5
>         fw.psid.api 3.10
>         fw.bundle_id 0x800085cc
>         fw.netlist 3.10.2000-3.1e.0
>         fw.netlist.build 0x2a76e110
> 
> There are many features in the driver that depend on the major, minor, and
> patch version of the FW. Without the patch number in the output for
> fw.mgmt.api debugging issues related to the FW API version is difficult.
> Also, using major.minor.patch aligns with the existing firmware version which
> uses a 3 digit value.
> 
> Fix this by making the fw.mgmt.api print the major.minor.patch versions.
> Shown below is the result:
> 
> devlink dev info pci/0000:3b:00.0
> pci/0000:3b:00.0:
>   driver ice
>   serial_number 00-01-00-ff-ff-00-00-00
>   versions:
>       fixed:
>         board.id K91258-000
>       running:
>         fw.mgmt 6.1.2
>         fw.mgmt.api 1.7.9 <--- patch number included
>         fw.mgmt.build 0xd75e7d06
>         fw.mgmt.srev 5
>         fw.undi 1.2992.0
>         fw.undi.srev 5
>         fw.psid.api 3.10
>         fw.bundle_id 0x800085cc
>         fw.app.name ICE OS Default Package
>         fw.app 1.3.27.0
>         fw.app.bundle_id 0xc0000001
>         fw.netlist 3.10.2000-3.1e.0
>         fw.netlist.build 0x2a76e110
>       stored:
>         fw.mgmt.srev 5
>         fw.undi 1.2992.0
>         fw.undi.srev 5
>         fw.psid.api 3.10
>         fw.bundle_id 0x800085cc
>         fw.netlist 3.10.2000-3.1e.0
>         fw.netlist.build 0x2a76e110
> 
> Fixes: ff2e5c700e08 ("ice: add basic handler for devlink .info_get")
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> ---
>  Documentation/networking/devlink/ice.rst     | 9 +++++----
>  drivers/net/ethernet/intel/ice/ice_devlink.c | 3 ++-
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 

Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-30 16:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 18:21 [Intel-wired-lan] [PATCH net] ice: Print the api_patch as part of the fw.mgmt.api Brett Creeley
2021-09-30 16:29 ` G, GurucharanX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.