[dpdk-stable] patch 'net/ena: fix cleaning HW IO rings configuration' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Thu Nov 29 14:20:52 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 6595edeaefccca9db7d9a4dff655dfec9d000337 Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk at semihalf.com>
Date: Wed, 14 Nov 2018 10:59:45 +0100
Subject: [PATCH] net/ena: fix cleaning HW IO rings configuration

[ upstream commit 778677dcb20cf29d966f239972b043f0640f55ef ]

When queues are stopped release Tx buffers.
During start initialize array of empty Tx/Rx reqs with default values.

Fixes: df238f84c0a2 ("net/ena: recreate HW IO rings on start and stop")

Signed-off-by: Rafal Kozik <rk at semihalf.com>
Acked-by: Michal Krawczyk <mk at semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index acb1a08e0..9e462099f 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1081,4 +1081,5 @@ static int ena_create_io_queue(struct ena_ring *ring)
 		  0, 0, 0, 0, 0 };
 	uint16_t ena_qid;
+	unsigned int i;
 	int rc;
 
@@ -1091,8 +1092,12 @@ static int ena_create_io_queue(struct ena_ring *ring)
 		ctx.mem_queue_type = ena_dev->tx_mem_queue_type;
 		ctx.queue_size = adapter->tx_ring_size;
+		for (i = 0; i < ring->ring_size; i++)
+			ring->empty_tx_reqs[i] = i;
 	} else {
 		ena_qid = ENA_IO_RXQ_IDX(ring->id);
 		ctx.direction = ENA_COM_IO_QUEUE_DIRECTION_RX;
 		ctx.queue_size = adapter->rx_ring_size;
+		for (i = 0; i < ring->ring_size; i++)
+			ring->empty_rx_reqs[i] = i;
 	}
 	ctx.qid = ena_qid;
@@ -1137,4 +1142,6 @@ static void ena_free_io_queues_all(struct ena_adapter *adapter)
 		ena_qid = ENA_IO_TXQ_IDX(i);
 		ena_com_destroy_io_queue(ena_dev, ena_qid);
+
+		ena_tx_queue_release_bufs(&adapter->tx_ring[i]);
 	}
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 13:11:36.370653088 +0000
+++ 0051-net-ena-fix-cleaning-HW-IO-rings-configuration.patch	2018-11-29 13:11:34.000000000 +0000
@@ -1,13 +1,14 @@
-From 778677dcb20cf29d966f239972b043f0640f55ef Mon Sep 17 00:00:00 2001
+From 6595edeaefccca9db7d9a4dff655dfec9d000337 Mon Sep 17 00:00:00 2001
 From: Rafal Kozik <rk at semihalf.com>
 Date: Wed, 14 Nov 2018 10:59:45 +0100
 Subject: [PATCH] net/ena: fix cleaning HW IO rings configuration
 
+[ upstream commit 778677dcb20cf29d966f239972b043f0640f55ef ]
+
 When queues are stopped release Tx buffers.
 During start initialize array of empty Tx/Rx reqs with default values.
 
 Fixes: df238f84c0a2 ("net/ena: recreate HW IO rings on start and stop")
-Cc: stable at dpdk.org
 
 Signed-off-by: Rafal Kozik <rk at semihalf.com>
 Acked-by: Michal Krawczyk <mk at semihalf.com>
@@ -16,16 +17,16 @@
  1 file changed, 7 insertions(+)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index 05a4fbe0e..3690afe3b 100644
+index acb1a08e0..9e462099f 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -1097,4 +1097,5 @@ static int ena_create_io_queue(struct ena_ring *ring)
+@@ -1081,4 +1081,5 @@ static int ena_create_io_queue(struct ena_ring *ring)
  		  0, 0, 0, 0, 0 };
  	uint16_t ena_qid;
 +	unsigned int i;
  	int rc;
  
-@@ -1107,8 +1108,12 @@ static int ena_create_io_queue(struct ena_ring *ring)
+@@ -1091,8 +1092,12 @@ static int ena_create_io_queue(struct ena_ring *ring)
  		ctx.mem_queue_type = ena_dev->tx_mem_queue_type;
  		ctx.queue_size = adapter->tx_ring_size;
 +		for (i = 0; i < ring->ring_size; i++)
@@ -38,7 +39,7 @@
 +			ring->empty_rx_reqs[i] = i;
  	}
  	ctx.qid = ena_qid;
-@@ -1153,4 +1158,6 @@ static void ena_free_io_queues_all(struct ena_adapter *adapter)
+@@ -1137,4 +1142,6 @@ static void ena_free_io_queues_all(struct ena_adapter *adapter)
  		ena_qid = ENA_IO_TXQ_IDX(i);
  		ena_com_destroy_io_queue(ena_dev, ena_qid);
 +


More information about the stable mailing list