DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
To: rushilg@google.com, joshwash@google.com
Cc: dev@dpdk.org, Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
Subject: [PATCH] net/gve: Fix TX/RX queue setup and stop for DQO
Date: Wed, 24 Jul 2024 05:58:56 +0000	[thread overview]
Message-ID: <1721800736-2392953-1-git-send-email-tathagat.dpdk@gmail.com> (raw)

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


             reply	other threads:[~2024-07-24  6:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24  5:58 Tathagat Priyadarshi [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1721800736-2392953-1-git-send-email-tathagat.dpdk@gmail.com \
    --to=tathagat.dpdk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=joshwash@google.com \
    --cc=rushilg@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).