Skip to contentSkip to conversation

app/procinfo: show all non-owned ports

PATCH Superseded Subendu Santra 2 participants 7 messages May 10, 2022 – May 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/procinfo: show all non-owned ports

Show all non-owned ports when no port mask is specified

Fixes 1dd6cffb6571 ("app/procinfo: provide way to request info on owned

ports")
Cc: [email protected]

---
 app/proc-info/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/proc-info/main.c +2 -2
index 56070a3317..2be24b584e 100644
@@ -1504,10 +1504,10 @@ main(int argc, char **argv)
 	if (nb_ports == 0)
 		rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-	/* If no port mask was specified, then show non-owned ports */
+	/* If no port mask was specified, then show all non-owned ports */
 	if (enabled_port_mask == 0) {
 		RTE_ETH_FOREACH_DEV(i)
-			enabled_port_mask = 1ul << i;
+			enabled_port_mask |= (1ul << i);
 	}
 
 	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
Signature · 1 line
2.28.0
#1 lore raw

Hi Reshma, Thomas,

What do you think about this patch?

Regards,
Subendu.

Quoted 32 lines · Subendu Santra

Show all non-owned ports when no port mask is specified

Fixes 1dd6cffb6571 ("app/procinfo: provide way to request info on owned

ports")
Cc: [email protected]

---
 app/proc-info/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/proc-info/main.c +2 -3
index 56070a3317..2be24b584e 100644
@@ -1504,10 +1504,10 @@ main(int argc, char **argv)
        if (nb_ports == 0)
                rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-       /* If no port mask was specified, then show non-owned ports */
+       /* If no port mask was specified, then show all non-owned ports */
        if (enabled_port_mask == 0) {
                RTE_ETH_FOREACH_DEV(i)
-                       enabled_port_mask = 1ul << i;
+                       enabled_port_mask |= (1ul << i);
        }
 
        for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
--

2.28.0

#2 lore raw

23/05/2022 12:53, Subendu Santra:

Quoted 3 lines

Hi Reshma, Thomas,

What do you think about this patch?

It looks to be a fix, right?
Please add a sentence about the previous behaviour, explaining what is fixed.

Ideally you should show the commit doing the mistake with the syntax "Fixes:" as in other commits of this tree.

Thanks

Quoted 34 lines · Subendu Santra
Quoted 32 lines

Show all non-owned ports when no port mask is specified

Fixes 1dd6cffb6571 ("app/procinfo: provide way to request info on owned

ports")
Cc: [email protected]

---
 app/proc-info/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/proc-info/main.c +2 -3
index 56070a3317..2be24b584e 100644
@@ -1504,10 +1504,10 @@ main(int argc, char **argv)
        if (nb_ports == 0)
                rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-       /* If no port mask was specified, then show non-owned ports */
+       /* If no port mask was specified, then show all non-owned ports */
        if (enabled_port_mask == 0) {
                RTE_ETH_FOREACH_DEV(i)
-                       enabled_port_mask = 1ul << i;
+                       enabled_port_mask |= (1ul << i);
        }
 
        for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
--

2.28.0

#3 lore raw

Sure. Will add a sentence about the issue which is getting fixed. However, I have already added Fixes: 1dd6cffb6571 in the patch. Is there anything else that needs to be done apart from this w.r.to "Fixes:" comment?

Regards,
Subendu.

Quoted 55 lines · Thomas Monjalon

23/05/2022 12:53, Subendu Santra:

Quoted 3 lines

Hi Reshma, Thomas,

What do you think about this patch?

It looks to be a fix, right?
Please add a sentence about the previous behaviour, explaining what is fixed.

Ideally you should show the commit doing the mistake with the syntax "Fixes:" as in other commits of this tree.

Thanks

Quoted 34 lines · Subendu Santra
Quoted 32 lines

Show all non-owned ports when no port mask is specified

Fixes 1dd6cffb6571 ("app/procinfo: provide way to request info on owned

ports")
Cc: [email protected]

---
 app/proc-info/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/proc-info/main.c +2 -3
index 56070a3317..2be24b584e 100644
@@ -1504,10 +1504,10 @@ main(int argc, char **argv)
        if (nb_ports == 0)
                rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-       /* If no port mask was specified, then show non-owned ports */
+       /* If no port mask was specified, then show all non-owned ports */
        if (enabled_port_mask == 0) {
                RTE_ETH_FOREACH_DEV(i)
-                       enabled_port_mask = 1ul << i;
+                       enabled_port_mask |= (1ul << i);
        }
 
        for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
--

2.28.0

#4 lore raw

23/05/2022 18:10, Subendu Santra:

Quoted 2 lines

Sure. Will add a sentence about the issue which is getting fixed. However, I have already added Fixes: 1dd6cffb6571 in the patch.

Sorry I missed it.

Quoted 2 lines

Is there anything else that needs to be done apart from this w.r.to "Fixes:" comment?

No that's fine, thanks.

Quoted 62 lines

Regards,
Subendu.

Quoted 55 lines · Thomas Monjalon

23/05/2022 12:53, Subendu Santra:

Quoted 3 lines

Hi Reshma, Thomas,

What do you think about this patch?

It looks to be a fix, right?
Please add a sentence about the previous behaviour, explaining what is fixed.

Ideally you should show the commit doing the mistake with the syntax "Fixes:" as in other commits of this tree.

Thanks

Quoted 34 lines · Subendu Santra
Quoted 32 lines

Show all non-owned ports when no port mask is specified

Fixes 1dd6cffb6571 ("app/procinfo: provide way to request info on owned

ports")
Cc: [email protected]

---
 app/proc-info/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/proc-info/main.c +2 -3
index 56070a3317..2be24b584e 100644
@@ -1504,10 +1504,10 @@ main(int argc, char **argv)
        if (nb_ports == 0)
                rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-       /* If no port mask was specified, then show non-owned ports */
+       /* If no port mask was specified, then show all non-owned ports */
        if (enabled_port_mask == 0) {
                RTE_ETH_FOREACH_DEV(i)
-                       enabled_port_mask = 1ul << i;
+                       enabled_port_mask |= (1ul << i);
        }
 
        for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
--

2.28.0

#5 lore raw

PATCH v2 1/1 app/procinfo: show all non-owned ports

In reply to Subendu Santra

Show all non-owned ports when no port mask is specified

show-port option without the mask option, displays only the last non-owned port. Show all the non-owned ports instead.

Fixes 1dd6cffb6571 ("app/procinfo: provide way to request info on owned

ports")
Cc: [email protected]

---
 app/proc-info/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/proc-info/main.c +2 -2
index 56070a3317..2be24b584e 100644
@@ -1504,10 +1504,10 @@ main(int argc, char **argv)
 	if (nb_ports == 0)
 		rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-	/* If no port mask was specified, then show non-owned ports */
+	/* If no port mask was specified, then show all non-owned ports */
 	if (enabled_port_mask == 0) {
 		RTE_ETH_FOREACH_DEV(i)
-			enabled_port_mask = 1ul << i;
+			enabled_port_mask |= (1ul << i);
 	}
 
 	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
Signature · 1 line
2.28.0
#6 lore raw

I have updated the v2 of the patch with the explanation. Kindly advise if it looks ok.

Regards,
Subendu.

Quoted 35 lines · Subendu Santra

Show all non-owned ports when no port mask is specified

show-port option without the mask option, displays only the last non-owned port. Show all the non-owned ports instead.

Fixes 1dd6cffb6571 ("app/procinfo: provide way to request info on owned

ports")
Cc: [email protected]

---
 app/proc-info/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/proc-info/main.c +2 -3
index 56070a3317..2be24b584e 100644
@@ -1504,10 +1504,10 @@ main(int argc, char **argv)
        if (nb_ports == 0)
                rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-       /* If no port mask was specified, then show non-owned ports */
+       /* If no port mask was specified, then show all non-owned ports */
        if (enabled_port_mask == 0) {
                RTE_ETH_FOREACH_DEV(i)
-                       enabled_port_mask = 1ul << i;
+                       enabled_port_mask |= (1ul << i);
        }
 
        for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
--

2.28.0