[PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
priyadarshitathagat
tathagat.dpdk at gmail.com
Fri Jul 19 06:36:54 CEST 2024
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 at gmail.com>
Acked-by: Rushil Gupta <rushilg at google.com>
Acked-by: Joshua Washington <joshwash at 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
More information about the dev
mailing list