DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: beilei.xing@intel.com
Cc: dev@dpdk.org, jingjing.wu@intel.com, Qi Zhang <qi.z.zhang@intel.com>
Subject: [dpdk-dev] [PATCH v3 19/24] net/i40e/base: add AQ critical error type
Date: Tue,  9 Jan 2018 15:30:17 -0500	[thread overview]
Message-ID: <1515529822-10732-20-git-send-email-qi.z.zhang@intel.com> (raw)
In-Reply-To: <1515529822-10732-1-git-send-email-qi.z.zhang@intel.com>

The FW has the ability to return a critical error on every AQ command.
So add the new return type as critical error to sync with firmware.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 17 +++++++++++++----
 drivers/net/i40e/base/i40e_common.c |  2 ++
 drivers/net/i40e/base/i40e_status.h |  1 +
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 9859e5359..7a70443c4 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -1004,10 +1004,19 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw,
 	/* update the error if time out occurred */
 	if ((!cmd_completed) &&
 	    (!details->async && !details->postpone)) {
-		i40e_debug(hw,
-			   I40E_DEBUG_AQ_MESSAGE,
-			   "AQTX: Writeback timeout.\n");
-		status = I40E_ERR_ADMIN_QUEUE_TIMEOUT;
+#ifdef PF_DRIVER
+		if (rd32(hw, hw->aq.asq.len) & I40E_GL_ATQLEN_ATQCRIT_MASK) {
+#else
+		if (rd32(hw, hw->aq.asq.len) & I40E_VF_ATQLEN1_ATQCRIT_MASK) {
+#endif
+			i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
+				   "AQTX: AQ Critical error.\n");
+			status = I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR;
+		} else {
+			i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
+				   "AQTX: Writeback timeout.\n");
+			status = I40E_ERR_ADMIN_QUEUE_TIMEOUT;
+		}
 	}
 
 asq_send_command_error:
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index de0a81eb1..a0a1f84b6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -310,6 +310,8 @@ const char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err)
 		return "I40E_NOT_SUPPORTED";
 	case I40E_ERR_FIRMWARE_API_VERSION:
 		return "I40E_ERR_FIRMWARE_API_VERSION";
+	case I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR:
+		return "I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR";
 	}
 
 	snprintf(hw->err_str, sizeof(hw->err_str), "%d", stat_err);
diff --git a/drivers/net/i40e/base/i40e_status.h b/drivers/net/i40e/base/i40e_status.h
index 5632ff2be..49af2d9f9 100644
--- a/drivers/net/i40e/base/i40e_status.h
+++ b/drivers/net/i40e/base/i40e_status.h
@@ -102,6 +102,7 @@ enum i40e_status_code {
 	I40E_ERR_NOT_READY			= -63,
 	I40E_NOT_SUPPORTED			= -64,
 	I40E_ERR_FIRMWARE_API_VERSION		= -65,
+	I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR	= -66,
 };
 
 #endif /* _I40E_STATUS_H_ */
-- 
2.14.1

  parent reply	other threads:[~2018-01-10  3:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 20:29 [dpdk-dev] [PATCH v3 00/24] net/i40e: update base code Qi Zhang
2018-01-09 20:29 ` [dpdk-dev] [PATCH v3 01/24] net/i40e/base: add new PHY type Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 02/24] net/i40e/base: add capability macros Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 03/24] net/i40e/base: add (Q)SFP module memory access definitions Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 04/24] net/i40e/base: release spinlock before function returns Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 05/24] net/i40e/base: retry AQC to overcome IRCRead hangs Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 06/24] net/i40e/base: add byte swaps in PHY register access Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 07/24] net/i40e/base: add macro for 25G device Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 08/24] net/i40e/base: code refactoring for LED blink Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 09/24] net/i40e/base: add link speed convert function Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 10/24] net/i40e/base: add AQ command for DCB parameters Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 11/24] net/i40e/base: fix NVM lock Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 12/24] net/i40e/base: code clean Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 13/24] net/i40e/base: add NVM update preservation flags Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 14/24] net/i40e/base: enable AQ event get in NVM update Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 15/24] net/i40e/base: fix link LED blink Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 16/24] net/i40e/base: add defines for flat NVM Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 17/24] net/i40e: enhanced loopback AQ command Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 18/24] net/i40e/base: add rearrange process " Qi Zhang
2018-01-09 20:30 ` Qi Zhang [this message]
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 20/24] net/i40e/base: fix compile issue for GCC 6.3 Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 21/24] net/i40e/base: fix reading LLDP configuration Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 22/24] net/i40e/base: fix unaligned data issue Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 23/24] net/i40e: rename a field Qi Zhang
2018-01-09 20:30 ` [dpdk-dev] [PATCH v3 24/24] net/i40e/base: update README file Qi Zhang
2018-01-10  5:37 ` [dpdk-dev] [PATCH v3 00/24] net/i40e: update base code Xing, Beilei
2018-01-10  9:29   ` Zhang, Helin

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=1515529822-10732-20-git-send-email-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@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).