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 4DD54A0577; Tue, 14 Apr 2020 08:25:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7592D1C0CE; Tue, 14 Apr 2020 08:25:18 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 7839A1BE80 for ; Tue, 14 Apr 2020 08:25:16 +0200 (CEST) IronPort-SDR: qlbK+G9KM3yiz2F4DSKbKTYqHiVbgtv6k+s3Uk9HMehI3osmijkyT5YuoOBojYFe0lWKZP65at hcMKJBnECF/A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 23:25:14 -0700 IronPort-SDR: ZI6mBPJUbeCt4OKG6ymIukykh3c4nSihMv27a3ne7WcwuShltKUM5vmhSmtAF7Wy4nEwwEl4+0 FZO7e+w7M84g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="426956322" Received: from dpdk-lrong-srv-04.sh.intel.com ([10.67.119.221]) by orsmga005.jf.intel.com with ESMTP; 13 Apr 2020 23:25:08 -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: Tue, 14 Apr 2020 14:15:08 +0800 Message-Id: <20200414061517.86124-3-leyi.rong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200414061517.86124-1-leyi.rong@intel.com> References: <20200316074603.10998-1-leyi.rong@intel.com> <20200414061517.86124-1-leyi.rong@intel.com> Subject: [dpdk-dev] [PATCH v4 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