* [dpdk-stable] [PATCH v2] net/i40e: fix fdir Rx resource defect [not found] <1516272612-118283-1-git-send-email-beilei.xing@intel.com> @ 2018-01-19 2:50 ` Beilei Xing 2018-01-19 4:59 ` Wu, Jingjing 2018-01-19 5:23 ` [dpdk-stable] [PATCH v3] " Beilei Xing 0 siblings, 2 replies; 4+ messages in thread From: Beilei Xing @ 2018-01-19 2:50 UTC (permalink / raw) To: qi.z.zhang, jingjing.wu; +Cc: dev, stable FDIR Rx ring isn't initialized and Rx queue HW tail isn't updated when there's error detected during programming FDIR flow. There'll be some potential risk. This patch updates FDIR Rx resource. Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director") Fixes: 05999aab4ca6 ("i40e: add or delete flow director") Cc: stable@dpdk.org Signed-off-by: Beilei Xing <beilei.xing@intel.com> --- v2 change: - Correct HW tail. drivers/net/i40e/i40e_fdir.c | 7 ++++++- drivers/net/i40e/i40e_rxtx.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 906c204..4164a24 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -1342,13 +1342,18 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq) PMD_DRV_LOG(ERR, "invalid programming status" " reported, error = %u.", error); } else - PMD_DRV_LOG(ERR, "unknown programming status" + PMD_DRV_LOG(INFO, "unknown programming status" " reported, len = %d, id = %u.", len, id); rxdp->wb.qword1.status_error_len = 0; rxq->rx_tail++; if (unlikely(rxq->rx_tail == rxq->nb_rx_desc)) rxq->rx_tail = 0; + if (rxq->rx_tail == 0) + I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1); + else + I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1); } + return ret; } diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 23256b7..f16944e 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -2719,6 +2719,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf) rxq->vsi = pf->fdir.fdir_vsi; rxq->rx_ring_phys_addr = rz->iova; + memset(rz->addr, 0, I40E_FDIR_NUM_RX_DESC * sizeof(union i40e_rx_desc)); rxq->rx_ring = (union i40e_rx_desc *)rz->addr; /* -- 2.5.5 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [PATCH v2] net/i40e: fix fdir Rx resource defect 2018-01-19 2:50 ` [dpdk-stable] [PATCH v2] net/i40e: fix fdir Rx resource defect Beilei Xing @ 2018-01-19 4:59 ` Wu, Jingjing 2018-01-19 5:23 ` [dpdk-stable] [PATCH v3] " Beilei Xing 1 sibling, 0 replies; 4+ messages in thread From: Wu, Jingjing @ 2018-01-19 4:59 UTC (permalink / raw) To: Xing, Beilei, Zhang, Qi Z; +Cc: dev, stable > -----Original Message----- > From: Xing, Beilei > Sent: Friday, January 19, 2018 10:50 AM > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [PATCH v2] net/i40e: fix fdir Rx resource defect > > FDIR Rx ring isn't initialized and Rx queue HW tail isn't updated > when there's error detected during programming FDIR flow. There'll > be some potential risk. > This patch updates FDIR Rx resource. > > Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director") > Fixes: 05999aab4ca6 ("i40e: add or delete flow director") > Cc: stable@dpdk.org > > Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com> Thanks Jingjing ^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v3] net/i40e: fix fdir Rx resource defect 2018-01-19 2:50 ` [dpdk-stable] [PATCH v2] net/i40e: fix fdir Rx resource defect Beilei Xing 2018-01-19 4:59 ` Wu, Jingjing @ 2018-01-19 5:23 ` Beilei Xing 2018-01-20 9:19 ` [dpdk-stable] [dpdk-dev] " Zhang, Helin 1 sibling, 1 reply; 4+ messages in thread From: Beilei Xing @ 2018-01-19 5:23 UTC (permalink / raw) To: qi.z.zhang, jingjing.wu; +Cc: dev, stable FDIR Rx ring isn't initialized and Rx queue HW tail isn't updated when there's error detected during programming FDIR flow. There'll be some potential risk. This patch updates FDIR Rx resource. Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director") Fixes: 05999aab4ca6 ("i40e: add or delete flow director") Cc: stable@dpdk.org Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com> --- v3 change: - Code clean. v2 change: - Correct HW tail. drivers/net/i40e/i40e_fdir.c | 8 ++++++-- drivers/net/i40e/i40e_rxtx.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 906c204..7ece7da 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -139,7 +139,6 @@ i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq) rte_wmb(); /* Init the RX tail regieter. */ - I40E_PCI_REG_WRITE(rxq->qrx_tail, 0); I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1); return err; @@ -1342,13 +1341,18 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq) PMD_DRV_LOG(ERR, "invalid programming status" " reported, error = %u.", error); } else - PMD_DRV_LOG(ERR, "unknown programming status" + PMD_DRV_LOG(INFO, "unknown programming status" " reported, len = %d, id = %u.", len, id); rxdp->wb.qword1.status_error_len = 0; rxq->rx_tail++; if (unlikely(rxq->rx_tail == rxq->nb_rx_desc)) rxq->rx_tail = 0; + if (rxq->rx_tail == 0) + I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1); + else + I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1); } + return ret; } diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 23256b7..f16944e 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -2719,6 +2719,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf) rxq->vsi = pf->fdir.fdir_vsi; rxq->rx_ring_phys_addr = rz->iova; + memset(rz->addr, 0, I40E_FDIR_NUM_RX_DESC * sizeof(union i40e_rx_desc)); rxq->rx_ring = (union i40e_rx_desc *)rz->addr; /* -- 2.5.5 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v3] net/i40e: fix fdir Rx resource defect 2018-01-19 5:23 ` [dpdk-stable] [PATCH v3] " Beilei Xing @ 2018-01-20 9:19 ` Zhang, Helin 0 siblings, 0 replies; 4+ messages in thread From: Zhang, Helin @ 2018-01-20 9:19 UTC (permalink / raw) To: Xing, Beilei, Zhang, Qi Z, Wu, Jingjing; +Cc: dev, stable > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Beilei Xing > Sent: Friday, January 19, 2018 1:24 PM > To: Zhang, Qi Z; Wu, Jingjing > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [dpdk-dev] [PATCH v3] net/i40e: fix fdir Rx resource defect > > FDIR Rx ring isn't initialized and Rx queue HW tail isn't updated when there's > error detected during programming FDIR flow. There'll be some potential risk. > This patch updates FDIR Rx resource. > > Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director") > Fixes: 05999aab4ca6 ("i40e: add or delete flow director") > Cc: stable@dpdk.org > > Signed-off-by: Beilei Xing <beilei.xing@intel.com> > Acked-by: Jingjing Wu <jingjing.wu@intel.com> Applied to dpdk-next-net-intel, thanks! /Helin ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-20 9:19 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1516272612-118283-1-git-send-email-beilei.xing@intel.com> 2018-01-19 2:50 ` [dpdk-stable] [PATCH v2] net/i40e: fix fdir Rx resource defect Beilei Xing 2018-01-19 4:59 ` Wu, Jingjing 2018-01-19 5:23 ` [dpdk-stable] [PATCH v3] " Beilei Xing 2018-01-20 9:19 ` [dpdk-stable] [dpdk-dev] " Zhang, Helin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).