From: Gagandeep Singh <g.singh@nxp.com>
To: dev@dpdk.org, ferruh.yigit@intel.com
Cc: Gagandeep Singh <g.singh@nxp.com>
Subject: [dpdk-dev] [PATCH v5 3/4] net/enetc: add log level notice
Date: Wed, 23 Oct 2019 11:36:01 +0530 [thread overview]
Message-ID: <20191023060602.32456-4-g.singh@nxp.com> (raw)
In-Reply-To: <20191023060602.32456-1-g.singh@nxp.com>
To display random MAC address as notice,
a log level NOTICE is added.
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/net/enetc/enetc_ethdev.c | 4 +++-
drivers/net/enetc/enetc_logs.h | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index d07e61c3f..c6099714e 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -130,7 +130,7 @@ print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
char buf[RTE_ETHER_ADDR_FMT_SIZE];
rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
- ENETC_PMD_INFO("%s%s\n", name, buf);
+ ENETC_PMD_NOTICE("%s%s\n", name, buf);
}
static int
@@ -158,6 +158,8 @@ enetc_hardware_init(struct enetc_eth_hw *hw)
if ((high_mac | low_mac) == 0) {
char *first_byte;
+ ENETC_PMD_NOTICE("MAC is not available for this SI, "
+ "set random MAC\n");
mac = (uint32_t *)hw->mac.addr;
*mac = (uint32_t)rte_rand();
first_byte = (char *)mac;
diff --git a/drivers/net/enetc/enetc_logs.h b/drivers/net/enetc/enetc_logs.h
index c8a6c0cf3..0976d42de 100644
--- a/drivers/net/enetc/enetc_logs.h
+++ b/drivers/net/enetc/enetc_logs.h
@@ -21,6 +21,8 @@ extern int enetc_logtype_pmd;
ENETC_PMD_LOG(CRIT, fmt, ## args)
#define ENETC_PMD_INFO(fmt, args...) \
ENETC_PMD_LOG(INFO, fmt, ## args)
+#define ENETC_PMD_NOTICE(fmt, args...) \
+ ENETC_PMD_LOG(NOTICE, fmt, ## args)
#define ENETC_PMD_ERR(fmt, args...) \
ENETC_PMD_LOG(ERR, fmt, ## args)
#define ENETC_PMD_WARN(fmt, args...) \
--
2.17.1
next prev parent reply other threads:[~2019-10-23 6:22 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 6:29 [dpdk-dev] [PATCH 1/2] net/enetc: add macro for BD ring alignment Gagandeep Singh
2019-10-21 6:29 ` [dpdk-dev] [PATCH 2/2] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-21 8:58 ` [dpdk-dev] [PATCH v2 0/2] enetc PMD specific changes Gagandeep Singh
2019-10-21 8:58 ` [dpdk-dev] [PATCH v2 1/2] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-21 8:58 ` [dpdk-dev] [PATCH v2 2/2] net/enetc: enable dpaax library Gagandeep Singh
2019-10-21 9:11 ` [dpdk-dev] [PATCH v3 0/3] enetc PMD specific changes Gagandeep Singh
2019-10-21 9:11 ` [dpdk-dev] [PATCH v3 1/3] net/enetc: add macro for BD ring alignment Gagandeep Singh
2019-10-21 9:11 ` [dpdk-dev] [PATCH v3 2/3] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-21 9:11 ` [dpdk-dev] [PATCH v3 3/3] net/enetc: enable dpaax library Gagandeep Singh
2019-10-21 10:50 ` [dpdk-dev] [PATCH v4 0/3] enetc PMD specific changes Gagandeep Singh
2019-10-21 10:50 ` [dpdk-dev] [PATCH v4 1/3] net/enetc: add macro for BD ring alignment Gagandeep Singh
2019-10-21 15:54 ` Ferruh Yigit
2019-10-22 5:32 ` Gagandeep Singh
2019-10-21 10:50 ` [dpdk-dev] [PATCH v4 2/3] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-21 16:04 ` Ferruh Yigit
2019-10-22 5:31 ` Gagandeep Singh
2019-10-22 8:59 ` Ferruh Yigit
2019-10-22 11:32 ` Gagandeep Singh
2019-10-21 10:50 ` [dpdk-dev] [PATCH v4 3/3] net/enetc: enable dpaax library Gagandeep Singh
2019-10-21 15:55 ` Ferruh Yigit
2019-10-22 5:31 ` Gagandeep Singh
2019-10-22 9:00 ` Ferruh Yigit
2019-10-22 11:30 ` Gagandeep Singh
2019-10-23 6:05 ` [dpdk-dev] [PATCH v5 0/4] enetc PMD specific changes Gagandeep Singh
2019-10-23 6:05 ` [dpdk-dev] [PATCH v5 1/4] net/enetc: fix BD ring alignment Gagandeep Singh
2019-10-23 6:06 ` [dpdk-dev] [PATCH v5 2/4] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-23 6:06 ` Gagandeep Singh [this message]
2019-10-23 6:06 ` [dpdk-dev] [PATCH v5 4/4] net/enetc: enable dpaax library Gagandeep Singh
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=20191023060602.32456-4-g.singh@nxp.com \
--to=g.singh@nxp.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.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).