Skip to contentSkip to conversation

ethdev: add missing buses in dev iterator

PATCH Applied Hemant Agrawal 6 participants 10 messages Apr 29, 2021 – May 5, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethdev: add missing buses in dev iterator

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

Fixes 214ed1acd125 ("ethdev: add iterator to match devargs input")
---
 lib/ethdev/rte_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
lib/ethdev/rte_ethdev.c +3 -1
index a1879765e8..483013ec7a 100644
@@ -260,7 +260,9 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str)
 	}
 
 	/* Convert bus args to new syntax for use with new API dev_iterate. */
-	if (strcmp(iter->bus->name, "vdev") == 0) {
+	if ((strcmp(iter->bus->name, "vdev") == 0) ||
+		(strcmp(iter->bus->name, "fslmc") == 0) ||
+		(strcmp(iter->bus->name, "dpaa_bus") == 0)) {
 		bus_param_key = "name";
 	} else if (strcmp(iter->bus->name, "pci") == 0) {
 		bus_param_key = "addr";
Signature · 1 line
2.17.1
#1 lore raw

29/04/2021 07:55, Hemant Agrawal:

Quoted 5 lines

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

I think we should add VMBus as well.

#2 lore raw
Quoted 7 lines · Thomas Monjalon

29/04/2021 07:55, Hemant Agrawal:

Quoted 5 lines

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

I think we should add VMBus as well.

They are 2 buses remaining vmbus and ifpga. However I don't know, if they use args as vdev or as pci?

Quoted 1 line
#3 lore raw
Quoted 11 lines · Hemant Agrawal
Quoted 7 lines · Thomas Monjalon

29/04/2021 07:55, Hemant Agrawal:

Quoted 5 lines

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

I think we should add VMBus as well.

They are 2 buses remaining vmbus and ifpga. However I don't know, if they use args as vdev or as pci?

cc Rosen for the 'ifpga' bus, 'vmbus' maintainer seems already cc'ed.

This variable ('bus_param_key') is used to construct 'bus_str', and 'bus_str' seems used only for the '.dev_iterate' bus operation.

Since 'ifpga' & 'vmbus' are not implementing the '.dev_iterate', so is it really required to add them?

#4 lore raw

04/05/2021 14:49, Ferruh Yigit:

Quoted 13 lines · Hemant Agrawal
Quoted 11 lines · Thomas Monjalon
Quoted 7 lines

29/04/2021 07:55, Hemant Agrawal:

Quoted 5 lines

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

I think we should add VMBus as well.

They are 2 buses remaining vmbus and ifpga. However I don't know, if they use args as vdev or as pci?

Quoted 7 lines

cc Rosen for the 'ifpga' bus, 'vmbus' maintainer seems already cc'ed.

This variable ('bus_param_key') is used to construct 'bus_str', and 'bus_str' seems used only for the '.dev_iterate' bus operation.

Since 'ifpga' & 'vmbus' are not implementing the '.dev_iterate', so is it really required to add them?

Good point Ferruh.

The only bus implementing dev_iterate are dpaa, fslmc, pci and vdev. So this patch makes sense.

Applied
#5 lore raw
Quoted 22 lines · Thomas Monjalon

04/05/2021 14:49, Ferruh Yigit:

Quoted 13 lines · Hemant Agrawal
Quoted 11 lines · Thomas Monjalon
Quoted 7 lines

29/04/2021 07:55, Hemant Agrawal:

Quoted 5 lines

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

I think we should add VMBus as well.

They are 2 buses remaining vmbus and ifpga. However I don't know, if they use args as vdev or as pci?

Quoted 7 lines

cc Rosen for the 'ifpga' bus, 'vmbus' maintainer seems already cc'ed.

This variable ('bus_param_key') is used to construct 'bus_str', and 'bus_str' seems used only for the '.dev_iterate' bus operation.

Since 'ifpga' & 'vmbus' are not implementing the '.dev_iterate', so is it really required to add them?

Quoted 7 lines

Good point Ferruh.

The only bus implementing dev_iterate are dpaa, fslmc, pci and vdev. So this patch makes sense.

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

#6 lore raw
In reply to Thomas Monjalon

Hi Thomas and Ferruh,

I just back from my Labor Day Holiday. I have checked there is no usage in ifpga bus.

Thanks,
Rosen

Quoted 38 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, May 04, 2021 23:50
To: [email protected]; Yigit, Ferruh <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Xu, Rosen <[email protected]>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: add missing buses in dev iterator

04/05/2021 14:49, Ferruh Yigit:

Quoted 13 lines · Hemant Agrawal
Quoted 11 lines · Thomas Monjalon
Quoted 7 lines

29/04/2021 07:55, Hemant Agrawal:

Quoted 5 lines

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

I think we should add VMBus as well.

They are 2 buses remaining vmbus and ifpga. However I don't know, if they use args as vdev or as pci?

Quoted 7 lines

cc Rosen for the 'ifpga' bus, 'vmbus' maintainer seems already cc'ed.

This variable ('bus_param_key') is used to construct 'bus_str', and 'bus_str' seems used only for the '.dev_iterate' bus operation.

Since 'ifpga' & 'vmbus' are not implementing the '.dev_iterate', so is it really required to add them?

Good point Ferruh.

The only bus implementing dev_iterate are dpaa, fslmc, pci and vdev. So this patch makes sense.

#7 lore raw
In reply to Hemant Agrawal
Quoted 27 lines

From: dev [mailto:[email protected]] On Behalf Of Hemant Agrawal
Sent: Thursday, April 29, 2021 7:56 AM

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

Fixes 214ed1acd125 ("ethdev: add iterator to match devargs input")
---
 lib/ethdev/rte_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
lib/ethdev/rte_ethdev.c +0 -0
index a1879765e8..483013ec7a 100644
@@ -260,7 +260,9 @@ rte_eth_iterator_init(struct rte_dev_iterator
 *iter, const char *devargs_str)
 	}
 
 	/* Convert bus args to new syntax for use with new API

dev_iterate. */

lib/ethdev/rte_ethdev.c rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) · line 265

Quoted 4 lines
lib/ethdev/rte_ethdev.c +3 -1
-	if (strcmp(iter->bus->name, "vdev") == 0) {
+	if ((strcmp(iter->bus->name, "vdev") == 0) ||
+		(strcmp(iter->bus->name, "fslmc") == 0) ||
+		(strcmp(iter->bus->name, "dpaa_bus") == 0)) {

Shouldn't that be "dpaa" instead of "dpaa_bus"?

Quoted 6 lines
lib/ethdev/rte_ethdev.c +0 -1
 		bus_param_key = "name";
 	} else if (strcmp(iter->bus->name, "pci") == 0) {
 		bus_param_key = "addr";
--

2.17.1

#8 lore raw
Quoted 25 lines · Morten Brørup
Quoted 25 lines

From: dev [mailto:[email protected]] On Behalf Of Hemant Agrawal
Sent: Thursday, April 29, 2021 7:56 AM

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

Fixes 214ed1acd125 ("ethdev: add iterator to match devargs input")
---
  lib/ethdev/rte_ethdev.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
lib/ethdev/rte_ethdev.c +0 -0
index a1879765e8..483013ec7a 100644
@@ -260,7 +260,9 @@ rte_eth_iterator_init(struct rte_dev_iterator
 *iter, const char *devargs_str)
  	}
 
Quoted 7 lines

lib/ethdev/rte_ethdev.c rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) · line 265

Quoted 6 lines
lib/ethdev/rte_ethdev.c +0 -0
  	/* Convert bus args to new syntax for use with new API

dev_iterate. */

lib/ethdev/rte_ethdev.c +3 -1
-	if (strcmp(iter->bus->name, "vdev") == 0) {
+	if ((strcmp(iter->bus->name, "vdev") == 0) ||
+		(strcmp(iter->bus->name, "fslmc") == 0) ||
+		(strcmp(iter->bus->name, "dpaa_bus") == 0)) {

Shouldn't that be "dpaa" instead of "dpaa_bus"?

The registered bus name is "dpaa_bus" only.

Quoted 7 lines
Quoted 7 lines

bus_param_key = "name";
} else if (strcmp(iter->bus->name, "pci") == 0) {
bus_param_key = "addr";
--
2.17.1

#9 lore raw
Quoted 29 lines

From: dev [mailto:[email protected]] On Behalf Of Hemant Agrawal
Sent: Thursday, April 29, 2021 3:57 PM

Quoted 25 lines · Morten Brørup
Quoted 25 lines

From: dev [mailto:[email protected]] On Behalf Of Hemant Agrawal
Sent: Thursday, April 29, 2021 7:56 AM

This patch fixes issue with OVS 2.15 not working on DPAA/FSLMC based platform due to missing support for these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator for bus arguments.

Fixes 214ed1acd125 ("ethdev: add iterator to match devargs input")
---
  lib/ethdev/rte_ethdev.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
lib/ethdev/rte_ethdev.c +0 -0
index a1879765e8..483013ec7a 100644
@@ -260,7 +260,9 @@ rte_eth_iterator_init(struct rte_dev_iterator
 *iter, const char *devargs_str)
  	}
 
Quoted 8 lines
Quoted 7 lines

lib/ethdev/rte_ethdev.c rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) · line 265

Quoted 6 lines
lib/ethdev/rte_ethdev.c +0 -0
  	/* Convert bus args to new syntax for use with new API

dev_iterate. */

lib/ethdev/rte_ethdev.c +3 -1
-	if (strcmp(iter->bus->name, "vdev") == 0) {
+	if ((strcmp(iter->bus->name, "vdev") == 0) ||
+		(strcmp(iter->bus->name, "fslmc") == 0) ||
+		(strcmp(iter->bus->name, "dpaa_bus") == 0)) {

Shouldn't that be "dpaa" instead of "dpaa_bus"?

The registered bus name is "dpaa_bus" only.

OK. Then it obviously has to match.