DPDK patches and discussions
 help / color / mirror / Atom feed
From: priyadarshitathagat <tathagat.dpdk@gmail.com>
To: dev@dpdk.org
Cc: priyadarshitathagat <tathagat.dpdk@gmail.com>
Subject: [PATCH v2] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
Date: Fri, 19 Jul 2024 04:52:02 +0000	[thread overview]
Message-ID: <1721364722-2387983-1-git-send-email-tathagat.dpdk@gmail.com> (raw)
In-Reply-To: <CA++LmPWP+fAn_uB=mGNuB_9jG16sZc4gTrEpoAm-aUYw8kF70Q@mail.gmail.com>

The RSS support for GVE allows multiple CPU cores to
handle the rx/tx queues as pollers. This requires initializing
the eth_dev_ops and updating the RX/TX functions for these pollers.

Signed-off-by: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
Acked-by: Rushil Gupta <rushilg@google.com>
Acked-by: Joshua Washington <joshwash@google.com>
---
 drivers/net/gve/gve_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index ca92277..2d8ef6f 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -1173,8 +1173,18 @@ struct gve_queue_page_list *
 	rte_be32_t *db_bar;
 	int err;
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		if (gve_is_gqi(priv)) {
+			gve_set_rx_function(eth_dev);
+			gve_set_tx_function(eth_dev);
+			eth_dev->dev_ops = &gve_eth_dev_ops;
+		} else {
+			gve_set_rx_function_dqo(eth_dev);
+			gve_set_tx_function_dqo(eth_dev);
+			eth_dev->dev_ops = &gve_eth_dev_ops_dqo;
+		}
 		return 0;
+	}
 
 	pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
 
-- 
1.8.3.1


  parent reply	other threads:[~2024-07-19  4:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18  5:34 [PATCH] " Tathagat Priyadarshi
2024-07-18 17:59 ` Joshua Washington
2024-07-19  3:23   ` Joshua Washington
2024-07-19  4:15     ` Tathagat Priyadarshi
2024-07-19  4:36 ` priyadarshitathagat
2024-07-19  4:52 ` priyadarshitathagat [this message]
2024-07-19 19:59   ` [PATCH v2] " 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=1721364722-2387983-1-git-send-email-tathagat.dpdk@gmail.com \
    --to=tathagat.dpdk@gmail.com \
    --cc=dev@dpdk.org \
    /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).