From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Zhao Subject: [PATCH] net/i40e: fix FDIR check programming status error Date: Wed, 11 Jul 2018 16:25:20 +0800 Message-ID: <1531297520-16545-1-git-send-email-wei.zhao1@intel.com> Cc: qi.z.zhang@intel.com, stable@dpdk.org, Wei Zhao To: dev@dpdk.org Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/i40e/i40e_fdir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index d41601a..b958bf6 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -1315,7 +1315,7 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq) uint32_t rx_status; uint32_t len, id; uint32_t error; - int ret = 0; + int ret = -1; rxdp = &rxq->rx_ring[rxq->rx_tail]; qword1 = rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len); @@ -1360,6 +1360,7 @@ 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); + ret = 0; } return ret; -- 2.7.5