DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@cavium.com>
To: dev@dpdk.org, ferruh.yigit@intel.com
Cc: Rasesh Mody <rasesh.mody@cavium.com>, Dept-EngDPDKDev@cavium.com
Subject: [dpdk-dev] [PATCH 09/17] net/qede/base: add/change/revise logs
Date: Fri,  6 Oct 2017 23:31:04 -0700	[thread overview]
Message-ID: <1507357872-26475-10-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1507357872-26475-1-git-send-email-rasesh.mody@cavium.com>

Changes include:
 - adding new log to print Dcbx version
 - reformatting log in ecore_dmae_operation_wait() in case of DMA engine
   failure
 - changing verbosity of some log messages such as:
   VFs incorrect behavior should be logged on PF with DP_VERBOSE(), not
   DP_NOTICE(). In general keep IOV-related logs at low verbosity.
   Log the critical issues from VF perspective, like message to PF
   times-out or the PF rejects the VF configuration, as NOTICE than
   VERBOSE
 - Add a printout of some MCP CPU info in case of no MFW response

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_dcbx.c  |    3 +++
 drivers/net/qede/base/ecore_hw.c    |    6 +++---
 drivers/net/qede/base/ecore_mcp.c   |   19 +++++++++++++++++++
 drivers/net/qede/base/ecore_sriov.c |    4 ++--
 drivers/net/qede/base/ecore_vf.c    |   18 ++++++++++++------
 5 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c
index a37b7c6..af8a239 100644
--- a/drivers/net/qede/base/ecore_dcbx.c
+++ b/drivers/net/qede/base/ecore_dcbx.c
@@ -1164,6 +1164,9 @@ enum _ecore_status_t ecore_dcbx_query_params(struct ecore_hwfn *p_hwfn,
 		local_admin->config = DCBX_CONFIG_VERSION_DISABLED;
 	}
 
+	DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Dcbx version = %d\n",
+		   local_admin->config);
+
 	if (params->override_flags & ECORE_DCBX_OVERRIDE_PFC_CFG)
 		ecore_dcbx_set_pfc_data(p_hwfn, &local_admin->features.pfc,
 					&params->config.params);
diff --git a/drivers/net/qede/base/ecore_hw.c b/drivers/net/qede/base/ecore_hw.c
index bc0138f..84f273b 100644
--- a/drivers/net/qede/base/ecore_hw.c
+++ b/drivers/net/qede/base/ecore_hw.c
@@ -744,10 +744,10 @@ static enum _ecore_status_t ecore_dmae_operation_wait(struct ecore_hwfn *p_hwfn)
 
 	if (ecore_status != ECORE_SUCCESS) {
 		DP_NOTICE(p_hwfn, ECORE_MSG_HW,
-			  "ecore_dmae_host2grc: Wait Failed. source_addr"
-			  " 0x%lx, grc_addr 0x%lx, size_in_dwords 0x%x\n",
+			  "Wait Failed. source_addr 0x%lx, grc_addr 0x%lx, size_in_dwords 0x%x, intermediate buffer 0x%lx.\n",
 			  (unsigned long)src_addr, (unsigned long)dst_addr,
-			  length_dw);
+			  length_dw,
+			  (unsigned long)p_hwfn->dmae_info.intermediate_buffer_phys_addr);
 		return ecore_status;
 	}
 
diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c
index 50f73e5..3caf08b 100644
--- a/drivers/net/qede/base/ecore_mcp.c
+++ b/drivers/net/qede/base/ecore_mcp.c
@@ -447,6 +447,24 @@ static void ecore_mcp_cmd_set_blocking(struct ecore_hwfn *p_hwfn,
 		block_cmd ? "Block" : "Unblock");
 }
 
+void ecore_mcp_print_cpu_info(struct ecore_hwfn *p_hwfn,
+			      struct ecore_ptt *p_ptt)
+{
+	u32 cpu_mode, cpu_state, cpu_pc_0, cpu_pc_1, cpu_pc_2;
+
+	cpu_mode = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
+	cpu_state = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
+	cpu_pc_0 = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
+	OSAL_UDELAY(CHIP_MCP_RESP_ITER_US);
+	cpu_pc_1 = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
+	OSAL_UDELAY(CHIP_MCP_RESP_ITER_US);
+	cpu_pc_2 = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
+
+	DP_NOTICE(p_hwfn, false,
+		  "MCP CPU info: mode 0x%08x, state 0x%08x, pc {0x%08x, 0x%08x, 0x%08x}\n",
+		  cpu_mode, cpu_state, cpu_pc_0, cpu_pc_1, cpu_pc_2);
+}
+
 static enum _ecore_status_t
 _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
 			 struct ecore_mcp_mb_params *p_mb_params,
@@ -526,6 +544,7 @@ static void ecore_mcp_cmd_set_blocking(struct ecore_hwfn *p_hwfn,
 		DP_NOTICE(p_hwfn, false,
 			  "The MFW failed to respond to command 0x%08x [param 0x%08x].\n",
 			  p_mb_params->cmd, p_mb_params->param);
+		ecore_mcp_print_cpu_info(p_hwfn, p_ptt);
 
 		OSAL_SPIN_LOCK(&p_hwfn->mcp_info->cmd_lock);
 		ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c
index 8eafb83..b85718f 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -3206,8 +3206,8 @@ static void ecore_iov_vf_mbx_vport_update(struct ecore_hwfn *p_hwfn,
 				   "Upper-layer prevents said VF"
 				   " configuration\n");
 		else
-			DP_NOTICE(p_hwfn, true,
-				  "No feature tlvs found for vport update\n");
+			DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
+				   "No feature tlvs found for vport update\n");
 		status = PFVF_STATUS_NOT_SUPPORTED;
 		goto out;
 	}
diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c
index c04fb09..25109db 100644
--- a/drivers/net/qede/base/ecore_vf.c
+++ b/drivers/net/qede/base/ecore_vf.c
@@ -130,14 +130,20 @@ static void ecore_vf_pf_req_end(struct ecore_hwfn *p_hwfn,
 	}
 
 	if (!*done) {
-		DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
-			   "VF <-- PF Timeout [Type %d]\n",
-			   p_req->first_tlv.tl.type);
+		DP_NOTICE(p_hwfn, true,
+			  "VF <-- PF Timeout [Type %d]\n",
+			  p_req->first_tlv.tl.type);
 		rc = ECORE_TIMEOUT;
 	} else {
-		DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
-			   "PF response: %d [Type %d]\n",
-			   *done, p_req->first_tlv.tl.type);
+		if ((*done != PFVF_STATUS_SUCCESS) &&
+		    (*done != PFVF_STATUS_NO_RESOURCE))
+			DP_NOTICE(p_hwfn, false,
+				  "PF response: %d [Type %d]\n",
+				  *done, p_req->first_tlv.tl.type);
+		else
+			DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
+				   "PF response: %d [Type %d]\n",
+				   *done, p_req->first_tlv.tl.type);
 	}
 
 	return rc;
-- 
1.7.10.3

  parent reply	other threads:[~2017-10-07  6:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-07  6:30 [dpdk-dev] [PATCH 00/17] update QEDE base driver to 8.30.8.0 Rasesh Mody
2017-10-07  6:30 ` [dpdk-dev] [PATCH 01/17] net/qede/base: add xcvr type and DON FW defines Rasesh Mody
2017-10-07  6:30 ` [dpdk-dev] [PATCH 02/17] net/qede/base: add NVRAM config options Rasesh Mody
2017-10-07  6:30 ` [dpdk-dev] [PATCH 03/17] net/qede/base: introduce HW/SW channel Rasesh Mody
2017-10-07  6:30 ` [dpdk-dev] [PATCH 04/17] net/qede/base: add LLDP support Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 05/17] net/qede/base: add check for DMA engine state Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 06/17] net/qede/base: use the correct size value Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 07/17] net/qede/base: add various OS abtraction macros Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 08/17] net/qede/base: add/fix comments Rasesh Mody
2017-10-07  6:31 ` Rasesh Mody [this message]
2017-10-07  6:31 ` [dpdk-dev] [PATCH 10/17] net/qede/base: semantic changes Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 11/17] net/qede/base: code cleanup Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 12/17] net/qede/base: check device personality for feature setting Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 13/17] net/qede/base: change default page size of ILT clients Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 14/17] net/qede/base: fix access to an uninitialized list Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 15/17] net/qede/base: fix for VF malicious indication Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 16/17] net/qede/base: fix return code to align with FW Rasesh Mody
2017-10-07  6:31 ` [dpdk-dev] [PATCH 17/17] net/qede/base: update base driver version to 8.30.8.0 Rasesh Mody
2017-10-09  3:33 ` [dpdk-dev] [PATCH 00/17] update QEDE base driver " 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=1507357872-26475-10-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.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).