DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
@ 2024-07-18  5:34 Tathagat Priyadarshi
  2024-07-18 17:59 ` Joshua Washington
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tathagat Priyadarshi @ 2024-07-18  5:34 UTC (permalink / raw)
  To: jeroendb, rushilg, joshwash; +Cc: dev

[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]

From 9fa6f7d425d66a00c3f63c7a3033eb06fd6b1852 Mon Sep 17 00:00:00 2001
From: priyadarshitathagat <tathagat.dpdk@gmail.com>
Date: Wed, 17 Jul 2024 18:53:47 +0000
Subject: [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY

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


https://github.com/DPDK/dpdk/pull/86

[-- Attachment #2: Type: text/html, Size: 1753 bytes --]

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

* Re: [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
  2024-07-18  5:34 [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY Tathagat Priyadarshi
@ 2024-07-18 17:59 ` Joshua Washington
  2024-07-19  3:23   ` Joshua Washington
  2024-07-19  4:36 ` priyadarshitathagat
  2024-07-19  4:52 ` [PATCH v2] " priyadarshitathagat
  2 siblings, 1 reply; 7+ messages in thread
From: Joshua Washington @ 2024-07-18 17:59 UTC (permalink / raw)
  To: Tathagat Priyadarshi; +Cc: jeroendb, rushilg, dev

Acked-by: Joshua Washington <joshwash@google.com>

Thanks!

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

* Re: [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
  2024-07-18 17:59 ` Joshua Washington
@ 2024-07-19  3:23   ` Joshua Washington
  2024-07-19  4:15     ` Tathagat Priyadarshi
  0 siblings, 1 reply; 7+ messages in thread
From: Joshua Washington @ 2024-07-19  3:23 UTC (permalink / raw)
  To: Tathagat Priyadarshi; +Cc: jeroendb, rushilg, dev

My ack might have been a bit premature. This patch seems to have a
number of style errors, and does not seem to apply to HEAD of
dpdk-next-net. See http://dpdk.org/patch/142498 for more detail.

The code supplied in the patch does not seem to have any indentation.
Please note that DPDK uses tabs (assumed to take up 8 spaces for the
purposes of wrapping long lines) instead of spaces. The style guide
can be found at
https://doc.dpdk.org/guides/contributing/coding_style.html.

The dpdk-next-net repository can be found at
http://git.dpdk.org/next/dpdk-next-net.

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

* Re: [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
  2024-07-19  3:23   ` Joshua Washington
@ 2024-07-19  4:15     ` Tathagat Priyadarshi
  0 siblings, 0 replies; 7+ messages in thread
From: Tathagat Priyadarshi @ 2024-07-19  4:15 UTC (permalink / raw)
  To: Joshua Washington; +Cc: jeroendb, rushilg, dev

[-- Attachment #1: Type: text/plain, Size: 746 bytes --]

Thanks Joshua, I will fix all the nits in my next email.

On Fri, Jul 19, 2024 at 8:53 AM Joshua Washington <joshwash@google.com>
wrote:

> My ack might have been a bit premature. This patch seems to have a
> number of style errors, and does not seem to apply to HEAD of
> dpdk-next-net. See http://dpdk.org/patch/142498 for more detail.
>
> The code supplied in the patch does not seem to have any indentation.
> Please note that DPDK uses tabs (assumed to take up 8 spaces for the
> purposes of wrapping long lines) instead of spaces. The style guide
> can be found at
> https://doc.dpdk.org/guides/contributing/coding_style.html.
>
> The dpdk-next-net repository can be found at
> http://git.dpdk.org/next/dpdk-next-net.
>

[-- Attachment #2: Type: text/html, Size: 1313 bytes --]

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

* [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
  2024-07-18  5:34 [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY Tathagat Priyadarshi
  2024-07-18 17:59 ` Joshua Washington
@ 2024-07-19  4:36 ` priyadarshitathagat
  2024-07-19  4:52 ` [PATCH v2] " priyadarshitathagat
  2 siblings, 0 replies; 7+ messages in thread
From: priyadarshitathagat @ 2024-07-19  4:36 UTC (permalink / raw)
  To: dev; +Cc: priyadarshitathagat

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


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

* [PATCH v2] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
  2024-07-18  5:34 [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY Tathagat Priyadarshi
  2024-07-18 17:59 ` Joshua Washington
  2024-07-19  4:36 ` priyadarshitathagat
@ 2024-07-19  4:52 ` priyadarshitathagat
  2024-07-19 19:59   ` Ferruh Yigit
  2 siblings, 1 reply; 7+ messages in thread
From: priyadarshitathagat @ 2024-07-19  4:52 UTC (permalink / raw)
  To: dev; +Cc: priyadarshitathagat

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


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

* Re: [PATCH v2] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY
  2024-07-19  4:52 ` [PATCH v2] " priyadarshitathagat
@ 2024-07-19 19:59   ` Ferruh Yigit
  0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2024-07-19 19:59 UTC (permalink / raw)
  To: priyadarshitathagat, dev

On 7/19/2024 5:52 AM, priyadarshitathagat wrote:
> 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>
>

Applied to dpdk-next-net/main, thanks.

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

end of thread, other threads:[~2024-07-19 19:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-18  5:34 [PATCH] net/gve: Update Rx/Tx functions for RTE_PROC_SECONDARY 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 ` [PATCH v2] " priyadarshitathagat
2024-07-19 19:59   ` 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).