DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix reconfiguration of rx queues
@ 2018-01-29 15:21 Chas Williams
  2018-01-29 16:25 ` Ananyev, Konstantin
  0 siblings, 1 reply; 9+ messages in thread
From: Chas Williams @ 2018-01-29 15:21 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, konstantin.ananyev, Charles (Chas) Williams

From: "Charles (Chas) Williams" <chas3@att.com>

.dev_configure() may be called again after RX queues have been setup.
This has the effect of clearing whatever setting the RX queues made for
rx_bulk_alloc_allowed or rx_vec_allowed.  Only reset this configuration
is there aren't any currently allocated queues.

Fixes: 01fa1d6215fa ("ixgbe: unify Rx setup")

Signed-off-by: Chas Williams <chas3@att.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 37eb668..b39249a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2348,6 +2348,7 @@ ixgbe_dev_configure(struct rte_eth_dev *dev)
 	struct ixgbe_adapter *adapter =
 		(struct ixgbe_adapter *)dev->data->dev_private;
 	int ret;
+	uint16_t i;
 
 	PMD_INIT_FUNC_TRACE();
 	/* multipe queue mode checking */
@@ -2363,11 +2364,17 @@ ixgbe_dev_configure(struct rte_eth_dev *dev)
 
 	/*
 	 * Initialize to TRUE. If any of Rx queues doesn't meet the bulk
-	 * allocation or vector Rx preconditions we will reset it.
+	 * allocation or vector Rx preconditions we will reset it. We
+	 * can only do this is there aren't any existing RX queues.
 	 */
+	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		if (dev->data->rx_queues[i])
+			goto out;
+	}
 	adapter->rx_bulk_alloc_allowed = true;
 	adapter->rx_vec_allowed = true;
 
+out:
 	return 0;
 }
 
@@ -4959,6 +4966,7 @@ ixgbevf_dev_configure(struct rte_eth_dev *dev)
 	struct rte_eth_conf *conf = &dev->data->dev_conf;
 	struct ixgbe_adapter *adapter =
 			(struct ixgbe_adapter *)dev->data->dev_private;
+	uint16_t i;
 
 	PMD_INIT_LOG(DEBUG, "Configured Virtual Function port id: %d",
 		     dev->data->port_id);
@@ -4981,11 +4989,17 @@ ixgbevf_dev_configure(struct rte_eth_dev *dev)
 
 	/*
 	 * Initialize to TRUE. If any of Rx queues doesn't meet the bulk
-	 * allocation or vector Rx preconditions we will reset it.
+	 * allocation or vector Rx preconditions we will reset it. We
+	 * can only do this is there aren't any existing RX queues.
 	 */
+	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		if (dev->data->rx_queues[i])
+			goto out;
+	}
 	adapter->rx_bulk_alloc_allowed = true;
 	adapter->rx_vec_allowed = true;
 
+out:
 	return 0;
 }
 
-- 
2.9.5

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-29  5:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 15:21 [dpdk-dev] [PATCH] net/ixgbe: fix reconfiguration of rx queues Chas Williams
2018-01-29 16:25 ` Ananyev, Konstantin
2018-01-29 16:49   ` Chas Williams
     [not found]     ` <2601191342CEEE43887BDE71AB97725890565545@IRSMSX103.ger.corp.intel.com>
2018-01-29 18:05       ` Ananyev, Konstantin
2018-01-29 18:30         ` Chas Williams
     [not found]           ` <2601191342CEEE43887BDE71AB97725890565AC3@IRSMSX103.ger.corp.intel.com>
2018-01-30 13:14             ` Ananyev, Konstantin
2018-01-30 16:15               ` Chas Williams
     [not found]                 ` <2601191342CEEE43887BDE71AB977258905662FE@IRSMSX103.ger.corp.intel.com>
2018-01-31 13:38                   ` Ananyev, Konstantin
2018-03-29  5:14                     ` Zhang, Helin

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).