From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B7FB7A0561; Mon, 20 Apr 2020 08:26:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44BEC1D37F; Mon, 20 Apr 2020 08:26:28 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3C9491C43A for ; Mon, 20 Apr 2020 08:26:25 +0200 (CEST) IronPort-SDR: 6z69Cm77thUzlU+H6gLBBZWiCm28kmZfAGbjwqZcI5Oi7d+1p8H9CvbKZtNciGjg+n0AYaAZ9E V01wbRzxXFPg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2020 23:26:24 -0700 IronPort-SDR: yWXOzuu5fzChAsUmHlbyfkgy58IXa6f/JmtTTiS9n8M3HZ3di2PGhtyDoD7b6cHtKLhyzkoDdD l4A2R3YqDhZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,405,1580803200"; d="scan'208";a="258241864" Received: from dpdk-lrong-srv-04.sh.intel.com ([10.67.119.221]) by orsmga006.jf.intel.com with ESMTP; 19 Apr 2020 23:26:23 -0700 From: Leyi Rong To: jingjing.wu@intel.com, qi.z.zhang@intel.com, beilei.xing@intel.com, xiaolong.ye@intel.com Cc: dev@dpdk.org, Leyi Rong Date: Mon, 20 Apr 2020 14:16:16 +0800 Message-Id: <20200420061625.21424-3-leyi.rong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420061625.21424-1-leyi.rong@intel.com> References: <20200316074603.10998-1-leyi.rong@intel.com> <20200420061625.21424-1-leyi.rong@intel.com> Subject: [dpdk-dev] [PATCH v6 02/11] net/iavf: return error if opcode is mismatched 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Adds error return when the opcode of read message is mismatched which is received from adminQ. Signed-off-by: Leyi Rong --- drivers/net/iavf/iavf_vchnl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index fa4da3a6d..b7fb05d32 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -52,9 +52,11 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len, PMD_DRV_LOG(DEBUG, "AQ from pf carries opcode %u, retval %d", opcode, vf->cmd_retval); - if (opcode != vf->pend_cmd) + if (opcode != vf->pend_cmd) { PMD_DRV_LOG(WARNING, "command mismatch, expect %u, get %u", vf->pend_cmd, opcode); + return IAVF_ERR_OPCODE_MISMATCH; + } return IAVF_SUCCESS; } -- 2.17.1