From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 113F71B4B7 for ; Thu, 29 Nov 2018 14:23:29 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 58300155DD; Thu, 29 Nov 2018 13:23:28 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1BBD1057062; Thu, 29 Nov 2018 13:23:26 +0000 (UTC) From: Kevin Traynor To: Rafal Kozik Cc: Michal Krawczyk , dpdk stable Date: Thu, 29 Nov 2018 13:20:52 +0000 Message-Id: <20181129132128.7609-52-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 29 Nov 2018 13:23:28 +0000 (UTC) Subject: [dpdk-stable] patch 'net/ena: fix cleaning HW IO rings configuration' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 13:23:29 -0000 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 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 Acked-by: Michal Krawczyk --- 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 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@dpdk.org Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk @@ -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); +