app/testpmd: fix bond port creation
authorMichal Jastrzebski <michalx.k.jastrzebski@intel.com>
Fri, 6 Mar 2015 07:38:59 +0000 (08:38 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 9 Mar 2015 11:47:25 +0000 (12:47 +0100)
When invoking creation of bonded device using:
create bonded device mode socket in testpmd the bonded port was not
enabled at the end of cmd_create_bonded_device_parsed function.
This caused commands 'show port info' and 'show port stats' not working
properly with bonding device. This patch fixed it.

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test-pmd/cmdline.c

index c8312be..8b0ac85 100644 (file)
@@ -4050,6 +4050,7 @@ static void cmd_create_bonded_device_parsed(void *parsed_result,
                nb_ports = rte_eth_dev_count();
                reconfig(port_id, res->socket);
                rte_eth_promiscuous_enable(port_id);
+               ports[port_id].enabled = 1;
        }
 
 }