Skip to content

Commit

Permalink
net/gve: support secondary process
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
priyadarshitathagat authored and ferruhy committed Jul 19, 2024
1 parent d08a322 commit 82c7f5c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,7 @@ Tao Zhu <taox.zhu@intel.com>
Taripin Samuel <samuel.taripin@intel.com>
Tarun Singh <tarun.k.singh@intel.com>
Tasnim Bashar <tbashar@nvidia.com> <tbashar@mellanox.com>
Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
Tejasree Kondoj <ktejasree@marvell.com> <kondoj.tejasree@caviumnetworks.com>
Tengfei Zhang <zypscode@outlook.com>
Tero Aho <tero.aho@coriant.com>
Expand Down
12 changes: 11 additions & 1 deletion drivers/net/gve/gve_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,8 +1185,18 @@ gve_dev_init(struct rte_eth_dev *eth_dev)
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);

Expand Down

0 comments on commit 82c7f5c

Please sign in to comment.