From: Wei Zhao Date: Fri, 13 Jul 2018 03:16:33 +0000 (+0800) Subject: net/i40e: fix check of flow director programming status X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7546dc4a1331;p=dpdk.git net/i40e: fix check of flow director programming status 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") Cc: stable@dpdk.org Signed-off-by: Wei Zhao Acked-by: Qi Zhang --- diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index d41601a176..2b299c78d8 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;