DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] net/ark: support secondary process
@ 2023-02-17 15:47 Ed Czeck
  2023-02-17 15:47 ` [PATCH 2/3] net/ark: support for single function with multiple port Ed Czeck
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ed Czeck @ 2023-02-17 15:47 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: John Miller, Shepard Siegel, Anatoly Burakov

From: John Miller <john.miller@atomicrules.com>

disable device configuration for secondary processes

Signed-off-by: John Miller <john.miller@atomicrules.com>
---
 drivers/net/ark/ark_ethdev.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b2995427c8..f96722551e 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -147,6 +147,9 @@ eth_ark_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	struct rte_eth_dev *eth_dev;
 	int ret;
 
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+		fprintf(stderr, "ARK probed by secondary process\n");
+
 	eth_dev = rte_eth_dev_pci_allocate(pci_dev, sizeof(struct ark_adapter));
 
 	if (eth_dev == NULL)
@@ -385,9 +388,11 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		    0xcafef00d, ark->sysctrl.t32[4], __func__);
 
 	/* We are a single function multi-port device. */
-	ret = ark_config_device(dev);
-	if (ret)
-		return -1;
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		ret = ark_config_device(dev);
+		if (ret)
+			return -1;
+	}
 
 	dev->dev_ops = &ark_eth_dev_ops;
 	dev->rx_queue_count = eth_ark_dev_rx_queue_count;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 1/3] net/ark: support secondary process
@ 2023-02-17 16:00 Ed Czeck
  2023-05-16 15:33 ` Burakov, Anatoly
  0 siblings, 1 reply; 7+ messages in thread
From: Ed Czeck @ 2023-02-17 16:00 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: John Miller, Shepard Siegel, Anatoly Burakov

From: John Miller <john.miller@atomicrules.com>

disable device configuration for secondary processes

Signed-off-by: John Miller <john.miller@atomicrules.com>
---
 drivers/net/ark/ark_ethdev.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b2995427c8..f96722551e 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -147,6 +147,9 @@ eth_ark_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	struct rte_eth_dev *eth_dev;
 	int ret;
 
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+		fprintf(stderr, "ARK probed by secondary process\n");
+
 	eth_dev = rte_eth_dev_pci_allocate(pci_dev, sizeof(struct ark_adapter));
 
 	if (eth_dev == NULL)
@@ -385,9 +388,11 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		    0xcafef00d, ark->sysctrl.t32[4], __func__);
 
 	/* We are a single function multi-port device. */
-	ret = ark_config_device(dev);
-	if (ret)
-		return -1;
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		ret = ark_config_device(dev);
+		if (ret)
+			return -1;
+	}
 
 	dev->dev_ops = &ark_eth_dev_ops;
 	dev->rx_queue_count = eth_ark_dev_rx_queue_count;
-- 
2.34.1


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

end of thread, other threads:[~2023-05-16 15:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 15:47 [PATCH 1/3] net/ark: support secondary process Ed Czeck
2023-02-17 15:47 ` [PATCH 2/3] net/ark: support for single function with multiple port Ed Czeck
2023-02-17 15:47 ` [PATCH 3/3] net/ark: resize data field to match fpga access Ed Czeck
2023-02-17 15:47 ` [PATCH] " Ed Czeck
2023-02-17 16:30 ` [PATCH 1/3] net/ark: support secondary process Stephen Hemminger
2023-02-17 16:00 Ed Czeck
2023-05-16 15:33 ` Burakov, Anatoly

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