DPDK patches and discussions
 help / color / mirror / Atom feed
From: Xingui Yang <yangxingui@huawei.com>
To: <dev@dpdk.org>
Cc: <stephen@networkplumber.org>, <david.marchand@redhat.com>,
	<liuyonglong@huawei.com>, <kangfenglong@huawei.com>,
	<fengchengwen@huawei.com>, <lihuisong@huawei.com>
Subject: [PATCH 2/2] net/hns3: print invalid MAC address from firmware
Date: Mon, 29 Sep 2025 19:35:54 +0800	[thread overview]
Message-ID: <20250929113554.2443832-3-yangxingui@huawei.com> (raw)
In-Reply-To: <20250929113554.2443832-1-yangxingui@huawei.com>

The default MAC address from the firmware is usually valid. Print the
default MAC address when it's invalid to locate the problem.

Signed-off-by: Xingui Yang <yangxingui@huawei.com>
---
 drivers/net/hns3/hns3_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 6709d7a70b..28d7e94ffb 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -723,12 +723,12 @@ hns3_init_mac_addrs(struct rte_eth_dev *dev)
 	eth_addr = (struct rte_ether_addr *)hw->mac.mac_addr;
 	if (!hns->is_vf) {
 		if (!rte_is_valid_assigned_ether_addr(eth_addr)) {
+			hns3_warn(hw, "MAC address " RTE_ETHER_ADDR_PRT_FMT " from firmware is invalid",
+				  RTE_ETHER_ADDR_BYTES(eth_addr));
 			rte_eth_random_addr(hw->mac.mac_addr);
 			hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
 				(struct rte_ether_addr *)hw->mac.mac_addr);
-			hns3_warn(hw, "default mac_addr from firmware is an invalid "
-				  "unicast address, using random MAC address %s",
-				  mac_str);
+			hns3_warn(hw, "using random MAC address %s", mac_str);
 		}
 	} else {
 		/*
-- 
2.33.0


  parent reply	other threads:[~2025-09-29 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-29 11:35 [PATCH 0/2] bugfix for hns3 Xingui Yang
2025-09-29 11:35 ` [PATCH 1/2] net/hns3: fix VLAN tag loss for short tunnel frame Xingui Yang
2025-09-29 11:35 ` Xingui Yang [this message]
2025-09-29 23:57 ` [PATCH 0/2] bugfix for hns3 Stephen Hemminger

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=20250929113554.2443832-3-yangxingui@huawei.com \
    --to=yangxingui@huawei.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=kangfenglong@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=stephen@networkplumber.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 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).