From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 704B21B435; Fri, 13 Jul 2018 05:39:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2018 20:39:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,346,1526367600"; d="scan'208";a="66583062" Received: from dpdk6.bj.intel.com ([172.16.182.94]) by fmsmga002.fm.intel.com with ESMTP; 12 Jul 2018 20:38:05 -0700 From: Zhao Wei To: dev@dpdk.org Cc: qi.z.zhang@intel.com, stable@dpdk.org, Wei Zhao Date: Fri, 13 Jul 2018 11:16:33 +0800 Message-Id: <1531451793-37321-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1531451340-36952-1-git-send-email-wei.zhao1@intel.com> References: <1531451340-36952-1-git-send-email-wei.zhao1@intel.com> Subject: [dpdk-dev] [PATCH v3] net/i40e: fix FDIR check programming status error 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: Fri, 13 Jul 2018 03:39:25 -0000 In i40e FDIR PMD code for checking programming status function i40e_check_fdir_programming_status(), the initial value of return value ret should be set to -1 not 0, because if DD bit of I40E_RX_DESC_STATUS_DD is not write back, this function will return 0 to upper function, this give an error info to upper function, the fact for this is it is time out for DD write back and it should return -1. Fixes: 05999aab4ca6 ("i40e: add or delete flow director") Signed-off-by: Wei Zhao --- v2: -fix patch error in ret value set. v3: -fix patch check warning. --- drivers/net/i40e/i40e_fdir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index d41601a..2b299c7 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -1360,6 +1360,8 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq) I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1); else I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1); + } else { + ret = -1; } return ret; -- 2.7.5