diff mbox series

net/dpaa2: set queues after reconfiguration

Message ID 1509524201-5952-1-git-send-email-hemant.agrawal@nxp.com
State New
Headers show
Series net/dpaa2: set queues after reconfiguration | expand

Commit Message

Hemant Agrawal Nov. 1, 2017, 8:16 a.m. UTC
From: Akhil Goyal <akhil.goyal@nxp.com>


if dpaa2_dev_tx_queue_setup is called multiple times, the
assignment of device->data->tx_queues is not done, as a result
tx_queues remain NULL after reconfiguration.
This patch sets the tx_queues from the device private data to the
usable device tx queues.

Fixes: 7ae777d064e8 ("net/dpaa2: add support for congestion notification")
Cc: stable@dpdk.org

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>

---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.7.4

Comments

Ferruh Yigit Nov. 1, 2017, 8:37 p.m. UTC | #1
On 11/1/2017 1:16 AM, Hemant Agrawal wrote:
> From: Akhil Goyal <akhil.goyal@nxp.com>

> 

> if dpaa2_dev_tx_queue_setup is called multiple times, the

> assignment of device->data->tx_queues is not done, as a result

> tx_queues remain NULL after reconfiguration.

> This patch sets the tx_queues from the device private data to the

> usable device tx queues.

> 

> Fixes: 7ae777d064e8 ("net/dpaa2: add support for congestion notification")

> Cc: stable@dpdk.org

> 

> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>


Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>


Applied to dpdk-next-net/master, thanks.


(Since patch sent by Hemant, I assume Hemant is agree with the patch and added
an explicit Ack from him.)
diff mbox series

Patch

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 19c1191..202f84f 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -514,8 +514,10 @@  dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	PMD_INIT_FUNC_TRACE();
 
 	/* Return if queue already configured */
-	if (dpaa2_q->flow_id != 0xffff)
+	if (dpaa2_q->flow_id != 0xffff) {
+		dev->data->tx_queues[tx_queue_id] = dpaa2_q;
 		return 0;
+	}
 
 	memset(&tx_conf_cfg, 0, sizeof(struct dpni_queue));
 	memset(&tx_flow_cfg, 0, sizeof(struct dpni_queue));