From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0050.outbound.protection.outlook.com [104.47.41.50]) by dpdk.org (Postfix) with ESMTP id 24D621AFE8 for ; Sat, 7 Oct 2017 08:31:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=pnGwG6K057lbe7WxsZGzfGK/seD4qQxK+75L4zYlNcA=; b=IO45Htx4dRhdgz2mFWfG+N12JzryUgcU+z22OQmkUv4LaWegvGKZcSLobClILN2I9LEjOQe5h35Y0QHpMyVpxn5ypRUxOpyFzdxamxBNt/jcj5sq3wGr9T5w2rBfL3KO8IorgtQ9I7cO+xWtrXv7Er/ZQgk2xKCRPuBUzK0AB2k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; Received: from cavium.com (198.186.0.2) by MWHPR0701MB3833.namprd07.prod.outlook.com (2603:10b6:301:7f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sat, 7 Oct 2017 06:31:44 +0000 From: Rasesh Mody To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Rasesh Mody , Dept-EngDPDKDev@cavium.com Date: Fri, 6 Oct 2017 23:31:04 -0700 Message-Id: <1507357872-26475-10-git-send-email-rasesh.mody@cavium.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1507357872-26475-1-git-send-email-rasesh.mody@cavium.com> References: <1507357872-26475-1-git-send-email-rasesh.mody@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [198.186.0.2] X-ClientProxiedBy: SN4PR0501CA0012.namprd05.prod.outlook.com (2603:10b6:803:40::25) To MWHPR0701MB3833.namprd07.prod.outlook.com (2603:10b6:301:7f::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 056be7d4-fab5-4589-0363-08d50d4d147c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR0701MB3833; X-Microsoft-Exchange-Diagnostics: 1; MWHPR0701MB3833; 3:pcJd5l2gUSdMTbKewl12AsTSXkJrJQsCk6yiscC9auQ8AJ+w0lq3V5zUAAugZQi7fAVr8gcjGmfK4aFnVlzoMDv2eLZ9mQ511ucRI2BMjXV0SC0GmqNv2PDXgkMFvD7upFlNj/QWvzBLusfobkNUQEcu6+sQG9ZQRfMTbIAoC2czRv0iT42rnO8mU5em9cJzTbI4Nn1/2/w2FV0QOEyOTCDdEUM7cGPMomxPbpPvixo5gImgXhBYDGos+fBL35s/; 25:o7wSyh6qoZDEg/LK9N+oLsn2sX/1elS4YGLIzqMK+YO2RHoW/13KGbdfTEtTbzLQO1LKAgO3hgpgun6/nV5YoT6TV7yQ9ks0jhDDT+uA4S9t1oTW8CgK9OwvVYvDpzQ15O2hAvVH6qOUcDyuExBmsV7uFnEB3EGgv63bKFtlkB2ul/ixWdsyHILX27LCyrmUZkTPCZ+y3Nk1teVT90SdC1v3FbG7VdvbzQ1BdDi7yx2OorsxFncaLzaGoiXxRmvVwfdkAs2IfO62smnvQIeb2UW89aCjBFm85GqJiL01Wz1KfHAunqO9xM0WQpu4+BIqOpobNlP2yD0vc/O1AFSzPg==; 31:Pi/eYQGSkpJiuaxIz6SnDRwErGMDnLXaVzEYaiWJoByrWFOjMPA+Z3NTT8Jxh6CkJSkmfXbpamQgFl77FiNeKh51f+99jD9d7x1v9Bst3Ka4BsZttaNpzLQc5FB2rBtfaxJDBTy2yKQ4xMawPgSbp00zZrH9aa3vaIDA/jCEX9EgvDDBbCYRQipRuBECCpizse3ysjL7wnZ/alLsML7uqAyECiCX5gFEaAFVKi3dvB8= X-MS-TrafficTypeDiagnostic: MWHPR0701MB3833: X-Microsoft-Exchange-Diagnostics: 1; MWHPR0701MB3833; 20:nS7augZwVLURESSinzfrknbTRpvjaPTzjzTMnKHe+a2DfkHOnStSBaDWkb2otlEVznn5wGmJQj1lxY3Qmlxc0bGn+kCQjdEv+/Cmyi+g0ygHXnxXWXUETTo7m6XsTPa4tv8TxqZmirHcQXc8YXP737+Jw9Al+Yz9tHrMMQ8qovbTG7IbcPEjlQI2Tvf0UHhhJdz9eg0q77qxQiNuBo2BoaVT8XsrDL0aFSx5kHqpr06wtHCaeTbYsziWouRb9I9VJf8JYsd33wXy0i0QySEvUgxo+oOkchCq3nzcUjE28xbl/Z3eL+mMeW66G0ecbpT83I/+XcuKuW+IzqN7AcRh68HU6SctYQiCr4kOGqF9MBYV2iQOzIkQRpq3wUwvyCNyPJvDUDXFnyBbvrZCht0k6gpmI3/Yd/UkgNaUnsUBf6QxYqhdqSmd2YUl1KSjeIc1tq4ghpmyvY8lXc21Sc0XFD2iE4TFwPlmmxZenq7kpMgr5oXkUO9viBf/+4eldTBQ; 4:+MFTmG1YEDzAfWgSPeDMl52TzWQxRL/Av0x1LybA4la+AelO+GT+KUmf6i6uXXs9j14MX8RKx7VC9sMHN6WizXgfCshpwr+qBiqfYAUQVD95/SQdNHsuKDfw0LbOhwCjpsfCgk5YL/k3FV6hi8GvTaeXPZKR+QSIZEJnHxCdCb1EQuezfX9rIdF9SL51bu6FVFm/C9LwdIVnB2BAIFulBfP8CmGZvLRvQzB1gDIE0qjdpPwB7oTZihTUcOG56MDc X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR0701MB3833; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR0701MB3833; X-Forefront-PRVS: 045315E1EE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(189002)(2906002)(6116002)(8936002)(3846002)(48376002)(68736007)(478600001)(101416001)(105586002)(50226002)(106356001)(72206003)(5660300001)(50466002)(33646002)(25786009)(4720700003)(21086003)(2950100002)(6666003)(69596002)(36756003)(76176999)(50986999)(81156014)(53936002)(107886003)(4326008)(55016002)(47776003)(66066001)(5003940100001)(81166006)(189998001)(8676002)(305945005)(97736004)(16586007)(316002)(7736002)(16526018)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR0701MB3833; H:cavium.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR0701MB3833; 23:DYiRBb22lbszM3UW2YzVhoqj00IHiXd9Qaz2de7?= =?us-ascii?Q?3/QyZbk/Oenwywx9NRDzDc0kkXauCc7txLqXejrZj2GpzTklHuwYVO9nAIui?= =?us-ascii?Q?HCCPr5vGIpF7oP8/MBJYE/xuefC+tAbwuYW9C61Oh0vFwVpLFOVCVnGCnEbH?= =?us-ascii?Q?SQS8+3EZi1utD/XVsSs9zSLr30OI9ZUb1LQH9FauS2mMN7vKqztuV+jtK/e+?= =?us-ascii?Q?vtP+0aNSxjgWRzuc0PwSiffah/S2aSHNMHZSyPPycAMTaF01kc1RrAHUi32e?= =?us-ascii?Q?GV2q+JiabrQ8RtHFXm+F0fiAeVj7s9wXdMey7GCfnzizZ2kg0trAh9vMgeM6?= =?us-ascii?Q?CUAh2T1jMgpWsCPhvA8jgNmWy8fgGl9C2Dr6TLfX7kLzjA5478IKvIzksPK6?= =?us-ascii?Q?I/sE7UMuY0Ky7QFktOnxkPMCX2dPO1E3wqoK2yLVSnBR9mjJfFOgkFzYuwoL?= =?us-ascii?Q?JjwWnhMDPDYPMy19aax3640bGWFrzS8PLA8tDBsTKQRftcGgYd1absr1PUKO?= =?us-ascii?Q?7hq95UC/E2wksT76FmDeP8RpO6Cube1OFJQf4EdD5ABBBw3qHBKgw243USdH?= =?us-ascii?Q?/QyLvUEDpxkJ2iQ61niXJfAKzomLQ8NNxGj9sLwsRsOkkiJOM4avPztSGuoX?= =?us-ascii?Q?TN0mWfxHtFit1f4HD2QbemAs5MwiXM41agMACD55WKqUAP8nQNHTiBtKKZ+C?= =?us-ascii?Q?S+5igWWGTAnN6Di53v1Jk1OLfGzsEjf7+mOvGqioSx0QmRQutivFNBldjszp?= =?us-ascii?Q?MUp5o4+FInxvEy3mzEBcesIUNlNbQBkUmFaLKkX9/g28hPMuhB4nEoyZwKUQ?= =?us-ascii?Q?GIJckmbpDlJXtp7j40U0A0dHYg7Bqkh/G92YnL/4Z4DIgapCv4gHpj1fkak/?= =?us-ascii?Q?aOpA5alw+KTNjv58Xika/4XuhB3Wz7eqP3nRx2uZ/mA+PuXbpmYUzLJXeTkx?= =?us-ascii?Q?P8dcB8577iE4WahJpLFM5v1bj/hVzpjbaeBVwUCdmUy6O5xppJh+db+9qO68?= =?us-ascii?Q?rCv6dMjzdZT/BVzc6wZgBkEU6uL1iLzjqM+kf1fIJ6WRAkPHIawr1vVr/W+U?= =?us-ascii?Q?8vrTHEGBldZ1IRPy5gzoMfweH0DuqVq7qfBNHe7WAKSfAMZQ8eCIRBwARnFX?= =?us-ascii?Q?gokrrhWf7Zss=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR0701MB3833; 6:XhuBnSnhqmrk20auz1E61Fv22Gs+GI3c3SpQ/s+/cLN8zJpNqHBgY4MvVz54WKv6h/X20igNPbuoyOV+hvH0UXM7gkYmp72tKwi59B6IQqB+Jdqgq6AlQDAM5Wy+wwS1Oi+Co622qr2O/xtTQmRwvreACMtG2ia5VNxnFibPf3/hRi34VQeyEK69Jn3W1lwHRAqx0mIjAZFtK+HZzsVZzaomQ/T4jsAZYNQfbIIBzlUgXmqbXQ+B00/NiWsAsZd09kDFVzqxNkAu4i5+kzhLdA+erlgb19svz5WS1pLzsgtABbbzNcXtIW8MZpnYmgNOWl3VZlqraQKJPU+5ngYdKg==; 5:r7CoiHq+8OnEgIx7vUaaU0rYkGDKdJZZwCZsqwZm5e0ly+2LWWItION2Z2H5TqEkY50ApmctjfvGfRjvvYACr0/XJzubYZ5mG8y0iF+URsjGqoJnsiYq1GySETzRVgI6POYfJ97RKN58hsPF4YhdUA==; 24:psy/yv0YoC3q7RyLsoWHiiFIe825/5m55xWMkBNdvWKZbrQGCvJBKDLqQ5jo/c2V2a9y8h0BKV7YI0r4VqHv2JyBlQDAxxpgnteFanLX7uk=; 7:+TEW5PyXfT4mn+ZXDcBwQp+b1jaevLZE0Jb3yrjR8AgY8joKjri4LliHhbT45ix6rly/WkkA/7Ye5f98yVY2aWgVzUCVvHImutYuG4jrXhKqnjuJ0ZgStLHXEE+c0ek0RRduulzI2rEosHEXSV5m9xjFX9PHWVVJzFuyKYuHzdDGln2Afm9i1VAYmLbOFeUBjzMyu7vBQMVIB0eJKaJiGOGO+oD9+pI76MdbCJUcD5k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2017 06:31:44.4795 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0701MB3833 Subject: [dpdk-dev] [PATCH 09/17] net/qede/base: add/change/revise logs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Oct 2017 06:31:46 -0000 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 --- 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, ¶ms->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