* [dpdk-dev] [PATCH 0/2] bnxt bug fixes @ 2020-04-23 15:02 Kalesh A P 2020-04-23 15:02 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix for memleak during queue restart Kalesh A P ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Kalesh A P @ 2020-04-23 15:02 UTC (permalink / raw) To: dev; +Cc: ferruh.yigit, ajit.khaparde From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Please apply. Kalesh AP (1): net/bnxt: fix to reset VNIC rxq count on VNIC free Rahul Gupta (1): net/bnxt: fix for memleak during queue restart drivers/net/bnxt/bnxt_ethdev.c | 2 ++ drivers/net/bnxt/bnxt_hwrm.c | 12 ------------ drivers/net/bnxt/bnxt_rxr.c | 44 ++++++++++++++++++++++++------------------ 3 files changed, 27 insertions(+), 31 deletions(-) -- 2.10.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 1/2] net/bnxt: fix for memleak during queue restart 2020-04-23 15:02 [dpdk-dev] [PATCH 0/2] bnxt bug fixes Kalesh A P @ 2020-04-23 15:02 ` Kalesh A P 2020-04-23 15:02 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix to reset VNIC rxq count on VNIC free Kalesh A P 2020-04-23 22:50 ` [dpdk-dev] [PATCH 0/2] bnxt bug fixes Ajit Khaparde 2 siblings, 0 replies; 11+ messages in thread From: Kalesh A P @ 2020-04-23 15:02 UTC (permalink / raw) To: dev; +Cc: ferruh.yigit, ajit.khaparde From: Rahul Gupta <rahul.gupta@broadcom.com> During port 0 rxq 1 start ie queue start, bnxt_free_hwrm_rx_ring() we are clearing the pointers to mbuf array. Due to this we overwrite the queue with fresh mbuf allocations causing previously allocated mbufs to leak. Add a check before allocating mbuf to replenish only empty mbuf slots in the RxQ. Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") Cc: stable@dpdk.org Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com> --- drivers/net/bnxt/bnxt_hwrm.c | 12 ------------ drivers/net/bnxt/bnxt_rxr.c | 44 +++++++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index ebf73e4..b0a7835 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2476,13 +2476,6 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index) if (BNXT_HAS_RING_GRPS(bp)) bp->grp_info[queue_index].rx_fw_ring_id = INVALID_HW_RING_ID; - memset(rxr->rx_desc_ring, 0, - rxr->rx_ring_struct->ring_size * - sizeof(*rxr->rx_desc_ring)); - memset(rxr->rx_buf_ring, 0, - rxr->rx_ring_struct->ring_size * - sizeof(*rxr->rx_buf_ring)); - rxr->rx_prod = 0; } ring = rxr->ag_ring_struct; if (ring->fw_ring_id != INVALID_HW_RING_ID) { @@ -2490,11 +2483,6 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index) BNXT_CHIP_THOR(bp) ? HWRM_RING_FREE_INPUT_RING_TYPE_RX_AGG : HWRM_RING_FREE_INPUT_RING_TYPE_RX); - ring->fw_ring_id = INVALID_HW_RING_ID; - memset(rxr->ag_buf_ring, 0, - rxr->ag_ring_struct->ring_size * - sizeof(*rxr->ag_buf_ring)); - rxr->ag_prod = 0; if (BNXT_HAS_RING_GRPS(bp)) bp->grp_info[queue_index].ag_fw_ring_id = INVALID_HW_RING_ID; diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 40da2f2..a657150 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -963,14 +963,16 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) prod = rxr->rx_prod; for (i = 0; i < ring->ring_size; i++) { - if (bnxt_alloc_rx_data(rxq, rxr, prod) != 0) { - PMD_DRV_LOG(WARNING, - "init'ed rx ring %d with %d/%d mbufs only\n", - rxq->queue_id, i, ring->ring_size); - break; + if (unlikely(!rxr->rx_buf_ring[i].mbuf)) { + if (bnxt_alloc_rx_data(rxq, rxr, prod) != 0) { + PMD_DRV_LOG(WARNING, + "init'ed rx ring %d with %d/%d mbufs only\n", + rxq->queue_id, i, ring->ring_size); + break; + } + rxr->rx_prod = prod; + prod = RING_NEXT(rxr->rx_ring_struct, prod); } - rxr->rx_prod = prod; - prod = RING_NEXT(rxr->rx_ring_struct, prod); } ring = rxr->ag_ring_struct; @@ -979,14 +981,16 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) prod = rxr->ag_prod; for (i = 0; i < ring->ring_size; i++) { - if (bnxt_alloc_ag_data(rxq, rxr, prod) != 0) { - PMD_DRV_LOG(WARNING, - "init'ed AG ring %d with %d/%d mbufs only\n", - rxq->queue_id, i, ring->ring_size); - break; + if (unlikely(!rxr->ag_buf_ring[i].mbuf)) { + if (bnxt_alloc_ag_data(rxq, rxr, prod) != 0) { + PMD_DRV_LOG(WARNING, + "init'ed AG ring %d with %d/%d mbufs only\n", + rxq->queue_id, i, ring->ring_size); + break; + } + rxr->ag_prod = prod; + prod = RING_NEXT(rxr->ag_ring_struct, prod); } - rxr->ag_prod = prod; - prod = RING_NEXT(rxr->ag_ring_struct, prod); } PMD_DRV_LOG(DEBUG, "AGG Done!\n"); @@ -994,11 +998,13 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) unsigned int max_aggs = BNXT_TPA_MAX_AGGS(rxq->bp); for (i = 0; i < max_aggs; i++) { - rxr->tpa_info[i].mbuf = - __bnxt_alloc_rx_data(rxq->mb_pool); - if (!rxr->tpa_info[i].mbuf) { - rte_atomic64_inc(&rxq->rx_mbuf_alloc_fail); - return -ENOMEM; + if (unlikely(!rxr->tpa_info[i].mbuf)) { + rxr->tpa_info[i].mbuf = + __bnxt_alloc_rx_data(rxq->mb_pool); + if (!rxr->tpa_info[i].mbuf) { + rte_atomic64_inc(&rxq->rx_mbuf_alloc_fail); + return -ENOMEM; + } } } } -- 2.10.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/bnxt: fix to reset VNIC rxq count on VNIC free 2020-04-23 15:02 [dpdk-dev] [PATCH 0/2] bnxt bug fixes Kalesh A P 2020-04-23 15:02 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix for memleak during queue restart Kalesh A P @ 2020-04-23 15:02 ` Kalesh A P 2020-04-23 22:50 ` [dpdk-dev] [PATCH 0/2] bnxt bug fixes Ajit Khaparde 2 siblings, 0 replies; 11+ messages in thread From: Kalesh A P @ 2020-04-23 15:02 UTC (permalink / raw) To: dev; +Cc: ferruh.yigit, ajit.khaparde From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> bnxt_free_one_vnic and bnxt_setup_one_vnic are called on configuring port vlan stripping. bnxt_setup_one_vnic keeps incrementing the vnic rx_queue_cnt. Fix to reset vnic rx_queue_cnt in bnxt_free_one_vnic. Fixes: cfadfee41ed1 ("net/bnxt: fix VLAN strip") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> --- drivers/net/bnxt/bnxt_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 1a3c7e6..ecfc765 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2173,6 +2173,8 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id) rte_free(vnic->fw_grp_ids); vnic->fw_grp_ids = NULL; + vnic->rx_queue_cnt = 0; + return 0; } -- 2.10.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] bnxt bug fixes 2020-04-23 15:02 [dpdk-dev] [PATCH 0/2] bnxt bug fixes Kalesh A P 2020-04-23 15:02 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix for memleak during queue restart Kalesh A P 2020-04-23 15:02 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix to reset VNIC rxq count on VNIC free Kalesh A P @ 2020-04-23 22:50 ` Ajit Khaparde 2 siblings, 0 replies; 11+ messages in thread From: Ajit Khaparde @ 2020-04-23 22:50 UTC (permalink / raw) To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit On Thu, Apr 23, 2020 at 7:46 AM Kalesh A P < kalesh-anakkur.purayil@broadcom.com> wrote: > From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> > > Please apply. > Applied to dpdk-next-net-brcm. Thanks > > Kalesh AP (1): > net/bnxt: fix to reset VNIC rxq count on VNIC free > > Rahul Gupta (1): > net/bnxt: fix for memleak during queue restart > > drivers/net/bnxt/bnxt_ethdev.c | 2 ++ > drivers/net/bnxt/bnxt_hwrm.c | 12 ------------ > drivers/net/bnxt/bnxt_rxr.c | 44 > ++++++++++++++++++++++++------------------ > 3 files changed, 27 insertions(+), 31 deletions(-) > > -- > 2.10.1 > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 0/2] bnxt bug fixes @ 2021-03-10 7:50 Kalesh A P 2021-03-11 23:58 ` Ajit Khaparde 0 siblings, 1 reply; 11+ messages in thread From: Kalesh A P @ 2021-03-10 7:50 UTC (permalink / raw) To: dev; +Cc: ferruh.yigit, ajit.khaparde From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> This series contain couple of bug fixes in bnxt PMD. Kalesh AP (2): net/bnxt: fix HWRM and FW incompatibility handling net/bnxt: mute some failure logs drivers/net/bnxt/bnxt_hwrm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.10.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] bnxt bug fixes 2021-03-10 7:50 Kalesh A P @ 2021-03-11 23:58 ` Ajit Khaparde 0 siblings, 0 replies; 11+ messages in thread From: Ajit Khaparde @ 2021-03-11 23:58 UTC (permalink / raw) To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit [-- Attachment #1: Type: text/plain, Size: 472 bytes --] On Tue, Mar 9, 2021 at 11:28 PM Kalesh A P <kalesh-anakkur.purayil@broadcom.com> wrote: > > From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> > > This series contain couple of bug fixes in bnxt PMD. > > Kalesh AP (2): > net/bnxt: fix HWRM and FW incompatibility handling > net/bnxt: mute some failure logs Patchset applied to dpdk-next-net-brcm. > > drivers/net/bnxt/bnxt_hwrm.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > -- > 2.10.1 > ^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 0/2] bnxt bug fixes @ 2020-05-22 17:32 Kalesh A P 0 siblings, 0 replies; 11+ messages in thread From: Kalesh A P @ 2020-05-22 17:32 UTC (permalink / raw) To: dev; +Cc: ferruh.yigit, ajit.khaparde [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=y, Size: 576 bytes --] From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> These are two bug fixes observed during regression testing with DPDK 20.05-rc3. Please apply. Kalesh AP (1): net/bnxt: fix the check for validating link speed Rahul Gupta (1): net/bnxt: performance fix for Arm drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_cpr.h | 6 +++--- drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/bnxt/bnxt_hwrm.c | 14 +++++++++----- drivers/net/bnxt/bnxt_ring.h | 24 +++++++++++++----------- 5 files changed, 27 insertions(+), 20 deletions(-) -- 2.10.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 0/2] bnxt bug fixes @ 2020-05-06 6:27 Kalesh A P 2020-05-07 3:22 ` Ajit Khaparde 0 siblings, 1 reply; 11+ messages in thread From: Kalesh A P @ 2020-05-06 6:27 UTC (permalink / raw) To: dev; +Cc: ferruh.yigit, ajit.khaparde From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Please apply. Kalesh AP (2): net/bnxt: fix to alloc FW specified TQM ring context memory net/bnxt: fix TQM ring context memory sizing formulas drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 21 +++++++++++++-------- drivers/net/bnxt/bnxt_hwrm.c | 31 +++++++++++++++++++------------ 3 files changed, 33 insertions(+), 21 deletions(-) -- 2.10.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] bnxt bug fixes 2020-05-06 6:27 Kalesh A P @ 2020-05-07 3:22 ` Ajit Khaparde 0 siblings, 0 replies; 11+ messages in thread From: Ajit Khaparde @ 2020-05-07 3:22 UTC (permalink / raw) To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit On Tue, May 5, 2020 at 11:11 PM Kalesh A P < kalesh-anakkur.purayil@broadcom.com> wrote: > From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> > > Please apply. > > Kalesh AP (2): > net/bnxt: fix to alloc FW specified TQM ring context memory > net/bnxt: fix TQM ring context memory sizing formulas > Thanks Kalesh, Patches applied to dpdk-next-net-brcm. > > drivers/net/bnxt/bnxt.h | 2 +- > drivers/net/bnxt/bnxt_ethdev.c | 21 +++++++++++++-------- > drivers/net/bnxt/bnxt_hwrm.c | 31 +++++++++++++++++++------------ > 3 files changed, 33 insertions(+), 21 deletions(-) > > -- > 2.10.1 > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 0/2] bnxt bug fixes @ 2020-02-20 4:12 Kalesh A P 2020-02-20 6:23 ` Ajit Khaparde 0 siblings, 1 reply; 11+ messages in thread From: Kalesh A P @ 2020-02-20 4:12 UTC (permalink / raw) To: dev; +Cc: ferruh.yigit, ajit.khaparde From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> These are couple of bnxt PMD bug fixes. Please apply. Kalesh AP (2): net/bnxt: fix segmentation fault handling async events on port stop net/bnxt: fix race when port is stopped and async events are received drivers/net/bnxt/bnxt_cpr.c | 6 ++++++ drivers/net/bnxt/bnxt_hwrm.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) -- 2.10.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] bnxt bug fixes 2020-02-20 4:12 Kalesh A P @ 2020-02-20 6:23 ` Ajit Khaparde 0 siblings, 0 replies; 11+ messages in thread From: Ajit Khaparde @ 2020-02-20 6:23 UTC (permalink / raw) To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit On Wed, Feb 19, 2020 at 7:55 PM Kalesh A P < kalesh-anakkur.purayil@broadcom.com> wrote: > From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> > > These are couple of bnxt PMD bug fixes. Please apply. > Patches applied to dpdk-next-net-brcm. > > Kalesh AP (2): > net/bnxt: fix segmentation fault handling async events on port stop > net/bnxt: fix race when port is stopped and async events are received > > drivers/net/bnxt/bnxt_cpr.c | 6 ++++++ > drivers/net/bnxt/bnxt_hwrm.c | 12 +++++++++--- > 2 files changed, 15 insertions(+), 3 deletions(-) > > -- > 2.10.1 > > ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-03-11 23:58 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-23 15:02 [dpdk-dev] [PATCH 0/2] bnxt bug fixes Kalesh A P 2020-04-23 15:02 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix for memleak during queue restart Kalesh A P 2020-04-23 15:02 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix to reset VNIC rxq count on VNIC free Kalesh A P 2020-04-23 22:50 ` [dpdk-dev] [PATCH 0/2] bnxt bug fixes Ajit Khaparde -- strict thread matches above, loose matches on Subject: below -- 2021-03-10 7:50 Kalesh A P 2021-03-11 23:58 ` Ajit Khaparde 2020-05-22 17:32 Kalesh A P 2020-05-06 6:27 Kalesh A P 2020-05-07 3:22 ` Ajit Khaparde 2020-02-20 4:12 Kalesh A P 2020-02-20 6:23 ` Ajit Khaparde
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).