]> git.droids-corp.org - dpdk.git/commitdiff
app/procinfo: show all non-owned ports
authorSubendu Santra <subendu@arista.com>
Wed, 25 May 2022 05:46:05 +0000 (22:46 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 26 Jun 2022 15:25:38 +0000 (17:25 +0200)
Show all non-owned ports when no port mask is specified.

The show-port option, without the mask option,
was showing 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: stable@dpdk.org
Signed-off-by: Subendu Santra <subendu@arista.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
app/proc-info/main.c

index 56070a3317278af48c4fa22d03970c2526b1315b..e1ccdbbaa5a61097ad11f8474a6efb873a875f8d 100644 (file)
@@ -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++) {