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 3049BA0588; Thu, 16 Apr 2020 10:19:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A1D901DB06; Thu, 16 Apr 2020 10:19:19 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 04A951DB09 for ; Thu, 16 Apr 2020 10:19:15 +0200 (CEST) IronPort-SDR: AkLBSggxTayEWw8fWezzC0kfezlYS043GLeUGOyZtHFasrFgB/Cp7MtcWxR4Ha4WiZq7FwNqSs jzpAUWoBL8WA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 01:19:15 -0700 IronPort-SDR: rSpkD3nei9aNg7iTVIsLqiOslnwAFS3Mq8P1f1oGj2BQC3tFiCF0a+ydNRQ2CHL74Yie4ebWLJ sRsBJUoxgCZA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,390,1580803200"; d="scan'208";a="277913311" Received: from dpdk-lrong-srv-04.sh.intel.com ([10.67.119.221]) by fmsmga004.fm.intel.com with ESMTP; 16 Apr 2020 01:19:13 -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: Thu, 16 Apr 2020 16:09:38 +0800 Message-Id: <20200416080947.55005-3-leyi.rong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416080947.55005-1-leyi.rong@intel.com> References: <20200316074603.10998-1-leyi.rong@intel.com> <20200416080947.55005-1-leyi.rong@intel.com> Subject: [dpdk-dev] [PATCH v5 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