DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Daley <johndale@cisco.com>
To: ferruh.yigit@intel.com
Cc: dev@dpdk.org, John Daley <johndale@cisco.com>
Subject: [dpdk-dev] [PATCH] net/enic: retain previous message logging
Date: Wed, 24 Jul 2019 19:46:19 -0700	[thread overview]
Message-ID: <20190725024619.26040-1-johndale@cisco.com> (raw)

Prior to fix, RTE_LOGTYPE_INFO messages would display in testpmd by
default. After the fix, using dynamic logging, only NOTICE level and
higher were displayed by default and INFO level were not. Change the
messages to NOTICE level so they continue to display.

DTS uses testpmd and parses messages and some tests failed because
messages were no longer displayed. Other apps may also depend on
the messages.

Fixes: bbd8ecc05434 ("net/enic: remove PMD log type references")

Signed-off-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_compat.h |  2 +-
 drivers/net/enic/enic_main.c   | 25 ++++++++++++-------------
 drivers/net/enic/enic_res.c    | 10 +++++-----
 3 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h
index bf9e998a6..0447bfc14 100644
--- a/drivers/net/enic/enic_compat.h
+++ b/drivers/net/enic/enic_compat.h
@@ -54,7 +54,7 @@ extern int enic_pmd_logtype;
 		"PMD: rte_enic_pmd: " fmt, ##args)
 
 #define dev_err(x, args...) dev_printk(ERR, args)
-#define dev_info(x, args...) dev_printk(INFO,  args)
+#define dev_notice(x, args...) dev_printk(NOTICE,  args)
 #define dev_warning(x, args...) dev_printk(WARNING, args)
 #define dev_debug(x, args...) dev_printk(DEBUG, args)
 
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 40af3781b..17331dc44 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -654,8 +654,7 @@ int enic_alloc_intr_resources(struct enic *enic)
 	int err;
 	unsigned int i;
 
-	dev_info(enic, "vNIC resources used:  "\
-		"wq %d rq %d cq %d intr %d\n",
+	dev_notice(enic, "vNIC resources used:  wq %d rq %d cq %d intr %d\n",
 		enic->wq_count, enic_vnic_rq_count(enic),
 		enic->cq_count, enic->intr_count);
 
@@ -811,11 +810,11 @@ int enic_alloc_rq(struct enic *enic, uint16_t queue_idx,
 
 	if (enic->rte_dev->data->dev_conf.rxmode.offloads &
 	    DEV_RX_OFFLOAD_SCATTER) {
-		dev_info(enic, "Rq %u Scatter rx mode enabled\n", queue_idx);
+		dev_notice(enic, "Rq %u Scatter rx mode enabled\n", queue_idx);
 		/* ceil((max pkt len)/mbuf_size) */
 		mbufs_per_pkt = (max_rx_pkt_len + mbuf_size - 1) / mbuf_size;
 	} else {
-		dev_info(enic, "Scatter rx mode disabled\n");
+		dev_notice(enic, "Scatter rx mode disabled\n");
 		mbufs_per_pkt = 1;
 		if (max_rx_pkt_len > mbuf_size) {
 			dev_warning(enic, "The maximum Rx packet size (%u) is"
@@ -827,7 +826,7 @@ int enic_alloc_rq(struct enic *enic, uint16_t queue_idx,
 	}
 
 	if (mbufs_per_pkt > 1) {
-		dev_info(enic, "Rq %u Scatter rx mode in use\n", queue_idx);
+		dev_notice(enic, "Rq %u Scatter rx mode in use\n", queue_idx);
 		rq_sop->data_queue_enable = 1;
 		rq_data->in_use = 1;
 		/*
@@ -843,7 +842,7 @@ int enic_alloc_rq(struct enic *enic, uint16_t queue_idx,
 				    " when scatter rx mode is in use.\n");
 		}
 	} else {
-		dev_info(enic, "Rq %u Scatter rx mode not being used\n",
+		dev_notice(enic, "Rq %u Scatter rx mode not being used\n",
 			 queue_idx);
 		rq_sop->data_queue_enable = 0;
 		rq_data->in_use = 0;
@@ -881,12 +880,12 @@ int enic_alloc_rq(struct enic *enic, uint16_t queue_idx,
 		nb_data_desc = max_data;
 	}
 	if (mbufs_per_pkt > 1) {
-		dev_info(enic, "For max packet size %u and mbuf size %u valid"
+		dev_notice(enic, "For max packet size %u and mbuf size %u valid"
 			 " rx descriptor range is %u to %u\n",
 			 max_rx_pkt_len, mbuf_size, min_sop + min_data,
 			 max_sop + max_data);
 	}
-	dev_info(enic, "Using %d rx descriptors (sop %d, data %d)\n",
+	dev_notice(enic, "Using %d rx descriptors (sop %d, data %d)\n",
 		 nb_sop_desc + nb_data_desc, nb_sop_desc, nb_data_desc);
 
 	/* Allocate sop queue resources */
@@ -992,7 +991,7 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx,
 	 * rte_eth_tx_queue_setup() checks min, max, and alignment. So just
 	 * print an info message for diagnostics.
 	 */
-	dev_info(enic, "TX Queues - effective number of descs:%d\n", nb_desc);
+	dev_notice(enic, "TX Queues - effective number of descs:%d\n", nb_desc);
 
 	/* Allocate queue resources */
 	err = vnic_wq_alloc(enic->vdev, &enic->wq[queue_idx], queue_idx,
@@ -1518,7 +1517,7 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
 		return -EINVAL;
 	}
 	if (new_mtu < ENIC_MIN_MTU) {
-		dev_info(enic,
+		dev_notice(enic,
 			"MTU not updated: requested (%u) less than min (%u)\n",
 			new_mtu, ENIC_MIN_MTU);
 		return -EINVAL;
@@ -1609,7 +1608,7 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
 	}
 
 set_mtu_done:
-	dev_info(enic, "MTU changed from %u to %u\n",  old_mtu, new_mtu);
+	dev_notice(enic, "MTU changed from %u to %u\n",  old_mtu, new_mtu);
 	rte_spinlock_unlock(&enic->mtu_lock);
 	return rc;
 }
@@ -1694,7 +1693,7 @@ static int enic_dev_init(struct enic *enic)
 						  OVERLAY_OFFLOAD_DISABLE)) {
 			dev_err(enic, "failed to disable overlay offload\n");
 		} else {
-			dev_info(enic, "Overlay offload is disabled\n");
+			dev_notice(enic, "Overlay offload is disabled\n");
 		}
 	}
 	if (!enic->disable_overlay && enic->vxlan &&
@@ -1712,7 +1711,7 @@ static int enic_dev_init(struct enic *enic)
 			PKT_TX_OUTER_IP_CKSUM |
 			PKT_TX_TUNNEL_MASK;
 		enic->overlay_offload = true;
-		dev_info(enic, "Overlay offload is enabled\n");
+		dev_notice(enic, "Overlay offload is enabled\n");
 	}
 	/*
 	 * Reset the vxlan port if HW vxlan parsing is available. It
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 9405e1933..364ac527f 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -72,7 +72,7 @@ int enic_get_vnic_config(struct enic *enic)
 					 max_t(u16, ENIC_MIN_MTU, c->mtu));
 
 	enic->adv_filters = vnic_dev_capable_adv_filters(enic->vdev);
-	dev_info(enic, "Advanced Filters %savailable\n", ((enic->adv_filters)
+	dev_notice(enic, "Advanced Filters %savailable\n", ((enic->adv_filters)
 		 ? "" : "not "));
 
 	err = vnic_dev_capable_filter_mode(enic->vdev, &enic->flow_filter_mode,
@@ -85,7 +85,7 @@ int enic_get_vnic_config(struct enic *enic)
 	vnic_dev_capable_udp_rss_weak(enic->vdev, &enic->nic_cfg_chk,
 				      &enic->udp_rss_weak);
 
-	dev_info(enic, "Flow api filter mode: %s Actions: %s%s%s\n",
+	dev_notice(enic, "Flow api filter mode: %s Actions: %s%s%s\n",
 		((enic->flow_filter_mode == FILTER_DPDK_1) ? "DPDK" :
 		((enic->flow_filter_mode == FILTER_USNIC_IP) ? "USNIC" :
 		((enic->flow_filter_mode == FILTER_IPV4_5TUPLE) ? "5TUPLE" :
@@ -112,14 +112,14 @@ int enic_get_vnic_config(struct enic *enic)
 	c->intr_timer_usec = min_t(u32, c->intr_timer_usec,
 		vnic_dev_get_intr_coal_timer_max(enic->vdev));
 
-	dev_info(enic_get_dev(enic),
+	dev_notice(enic_get_dev(enic),
 		"vNIC MAC addr %02x:%02x:%02x:%02x:%02x:%02x "
 		"wq/rq %d/%d mtu %d, max mtu:%d\n",
 		enic->mac_addr[0], enic->mac_addr[1], enic->mac_addr[2],
 		enic->mac_addr[3], enic->mac_addr[4], enic->mac_addr[5],
 		c->wq_desc_count, c->rq_desc_count,
 		enic->rte_dev->data->mtu, enic->max_mtu);
-	dev_info(enic_get_dev(enic), "vNIC csum tx/rx %s/%s "
+	dev_notice(enic_get_dev(enic), "vNIC csum tx/rx %s/%s "
 		"rss %s intr mode %s type %s timer %d usec "
 		"loopback tag 0x%04x\n",
 		ENIC_SETTING(enic, TXCSUM) ? "yes" : "no",
@@ -268,7 +268,7 @@ void enic_get_res_counts(struct enic *enic)
 	enic->conf_intr_count = vnic_dev_get_res_count(enic->vdev,
 		RES_TYPE_INTR_CTRL);
 
-	dev_info(enic_get_dev(enic),
+	dev_notice(enic_get_dev(enic),
 		"vNIC resources avail: wq %d rq %d cq %d intr %d\n",
 		enic->conf_wq_count, enic->conf_rq_count,
 		enic->conf_cq_count, enic->conf_intr_count);
-- 
2.22.0


             reply	other threads:[~2019-07-25  2:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25  2:46 John Daley [this message]
2019-07-25 10:07 ` Ferruh Yigit
2019-07-25 20:25   ` John Daley (johndale)
2019-07-26  4:21     ` Hyong Youb Kim (hyonkim)
2019-07-26  9:51       ` Ferruh Yigit
2019-07-26 20:50       ` Stephen Hemminger
2019-07-26 21:15         ` John Daley (johndale)
2019-07-26  8:17     ` John Daley (johndale)
2019-07-26 10:00       ` Ferruh Yigit
2019-07-26 20:06         ` John Daley (johndale)
2019-07-26 20:12 ` [dpdk-dev] [PATCH v2] " John Daley
2019-07-29 11:03   ` Ferruh Yigit

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=20190725024619.26040-1-johndale@cisco.com \
    --to=johndale@cisco.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).