All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org,
	Vasundhara Volam <vasundhara-v.volam@broadcom.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Michael Chan <michael.chan@broadcom.com>
Subject: [PATCH v2 net-next 4/7] bnxt_en: Add hw addr to devlink info_get cb.
Date: Thu, 26 Mar 2020 11:57:01 +0530	[thread overview]
Message-ID: <1585204021-10317-5-git-send-email-vasundhara-v.volam@broadcom.com> (raw)
In-Reply-To: <1585204021-10317-1-git-send-email-vasundhara-v.volam@broadcom.com>

Also update bnxt.rst documentation file.

Cc: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
v1->v2: Remove mutlihost base hw addr info.
---
 Documentation/networking/devlink/bnxt.rst         | 3 +++
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/Documentation/networking/devlink/bnxt.rst b/Documentation/networking/devlink/bnxt.rst
index 71f5a5a..a514664 100644
--- a/Documentation/networking/devlink/bnxt.rst
+++ b/Documentation/networking/devlink/bnxt.rst
@@ -57,6 +57,9 @@ The ``bnxt_en`` driver reports the following versions
    * - ``asic.rev``
      - fixed
      - ASIC design revision
+   * - ``hw.addr``
+     - stored, running
+     - Hardware address of the interface
    * - ``fw.psid``
      - stored, running
      - Firmware parameter set version of the board
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index 51abc6c..493a9eb 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -425,6 +425,12 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
 			return rc;
 	}
 
+	sprintf(buf, "%pM", bp->dev->dev_addr);
+	rc = devlink_info_version_running_put(req,
+				DEVLINK_INFO_VERSION_GENERIC_HW_ADDR, buf);
+	if (rc)
+		return rc;
+
 	if (strlen(ver_resp->active_pkg_name)) {
 		rc =
 		    devlink_info_version_running_put(req,
-- 
1.8.3.1


      parent reply	other threads:[~2020-03-26  6:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  6:26 [PATCH v2 net-next 0/7] bnxt_en: Updates to devlink info_get cb Vasundhara Volam
2020-03-26  6:26 ` [PATCH v2 net-next 1/7] devlink: Add macro for "fw.api" to " Vasundhara Volam
2020-03-26  9:28   ` Jiri Pirko
2020-03-26  6:26 ` [PATCH v2 net-next 2/7] bnxt_en: Add fw.api version to devlink " Vasundhara Volam
2020-03-26  6:27 ` [PATCH v2 net-next 3/7] devlink: Add macro for "hw.addr" to " Vasundhara Volam
2020-03-26  9:26   ` Jiri Pirko
2020-03-26 11:02     ` Vasundhara Volam
2020-03-26 15:54       ` Jiri Pirko
2020-03-26 16:03         ` Vasundhara Volam
2020-03-26  6:27 ` Vasundhara Volam [this message]

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=1585204021-10317-5-git-send-email-vasundhara-v.volam@broadcom.com \
    --to=vasundhara-v.volam@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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 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.