patches for DPDK stable branches
 help / color / Atom feed
From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
To: stable@dpdk.org
Subject: [dpdk-stable] [PATCH 18.11 2/3] net/bnxt: fix to advance producer index
Date: Fri, 16 Oct 2020 14:50:46 +0530
Message-ID: <20201016092047.30846-3-kalesh-anakkur.purayil@broadcom.com> (raw)
In-Reply-To: <20201016092047.30846-1-kalesh-anakkur.purayil@broadcom.com>

From: Rahul Gupta <rahul.gupta@broadcom.com>

[ upstream commit 20cb28a0ec7fb0c49807c63e6f57b5e0cdb36065 ]

When a queue is started after deferred_start, then increment raw_prod
irrespective of new mbuf is allocated or old mbufs are used.

Fixes: 20f9c70ffa33 ("net/bnxt: fix for memleak during queue restart")

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index b73561b..24c760e 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -775,9 +775,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 					    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;
@@ -793,9 +793,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 					    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");
 
-- 
2.10.1


  parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16  9:20 [dpdk-stable] [PATCH 18.11 0/3] bnxt patches for 18.11 Kalesh A P
2020-10-16  9:20 ` [dpdk-stable] [PATCH 18.11 1/3] net/bnxt: fix for memleak during queue restart Kalesh A P
2020-10-16  9:20 ` Kalesh A P [this message]
2020-10-16  9:20 ` [dpdk-stable] [PATCH 18.11 3/3] net/bnxt: fix flow error on filter creation Kalesh A P
2020-10-16 12:26 ` [dpdk-stable] [PATCH 18.11 0/3] bnxt patches for 18.11 Kevin Traynor
2020-10-30 13:13 ` Kevin Traynor

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201016092047.30846-3-kalesh-anakkur.purayil@broadcom.com \
    --to=kalesh-anakkur.purayil@broadcom.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox