DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/gve: Fix TX/RX queue setup and stop for DQO
@ 2024-07-24  5:58 Tathagat Priyadarshi
  2024-07-24  6:56 ` [PATCH v2] net/gve: Fix TX/RX queue setup and stop Tathagat Priyadarshi
  2024-07-24 13:35 ` [PATCH] " Tathagat Priyadarshi
  0 siblings, 2 replies; 13+ messages in thread
From: Tathagat Priyadarshi @ 2024-07-24  5:58 UTC (permalink / raw)
  To: rushilg, joshwash; +Cc: dev, Tathagat Priyadarshi

The PR aims to update the TX/RQ queue setup/stop routines that are
unique to DQO, so that they may be called for instances that use the DQO
RDA format during dev start/stop.

Signed-off-by: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
Acked-by: Joshua Washington <joshwash@google.com>
---
 drivers/net/gve/gve_ethdev.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index ca92277..2c558ed 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -289,7 +289,11 @@ struct gve_queue_page_list *
 		return ret;
 	}
 	for (i = 0; i < num_queues; i++)
-		if (gve_tx_queue_start(dev, i) != 0) {
+		if (gve_is_gqi(priv))
+			ret = gve_tx_queue_start(dev, i);
+		else
+			ret = gve_tx_queue_start_dqo(dev, i);
+		if (ret != 0) {
 			PMD_DRV_LOG(ERR, "Fail to start Tx queue %d", i);
 			goto err_tx;
 		}
@@ -315,9 +319,15 @@ struct gve_queue_page_list *
 	return 0;
 
 err_rx:
-	gve_stop_rx_queues(dev);
+	if (gve_is_gqi(priv))
+		gve_stop_rx_queues(dev);
+	else
+		gve_stop_rx_queues_dqo(dev);
 err_tx:
-	gve_stop_tx_queues(dev);
+	if (gve_is_gqi(priv))
+		gve_stop_tx_queues(dev);
+	else
+		gve_stop_tx_queues_dqo(dev);
 	return ret;
 }
 
@@ -362,10 +372,16 @@ struct gve_queue_page_list *
 static int
 gve_dev_stop(struct rte_eth_dev *dev)
 {
+	struct gve_priv *priv = dev->data->dev_private;
 	dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
 
-	gve_stop_tx_queues(dev);
-	gve_stop_rx_queues(dev);
+	if (gve_is_gqi(priv)) {
+		gve_stop_tx_queues(dev);
+		gve_stop_rx_queues(dev);
+	} else {
+		gve_stop_tx_queues_dqo(dev);
+		gve_stop_rx_queues_dqo(dev);
+	}
 
 	dev->data->dev_started = 0;
 
-- 
1.8.3.1


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

end of thread, other threads:[~2024-07-31 13:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-24  5:58 [PATCH] net/gve: Fix TX/RX queue setup and stop for DQO Tathagat Priyadarshi
2024-07-24  6:56 ` [PATCH v2] net/gve: Fix TX/RX queue setup and stop Tathagat Priyadarshi
2024-07-24 13:35 ` [PATCH] " Tathagat Priyadarshi
2024-07-25 12:38   ` Ferruh Yigit
2024-07-25 12:51     ` Tathagat Priyadarshi
2024-07-25 13:09       ` Ferruh Yigit
2024-07-25 13:31   ` [PATCH v2] " Tathagat Priyadarshi
2024-07-26 10:37     ` Tathagat Priyadarshi
2024-07-26 11:33       ` Ferruh Yigit
2024-07-29 18:10         ` Joshua Washington
2024-07-30 11:26         ` Ferruh Yigit
2024-07-31  5:26     ` Tathagat Priyadarshi
2024-07-31 13:02       ` Ferruh Yigit

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