app/testpmd: move forward streams initialisation
authorBernard Iremonger <bernard.iremonger@intel.com>
Tue, 14 Jun 2016 15:35:39 +0000 (16:35 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 16 Jun 2016 08:20:28 +0000 (10:20 +0200)
Move call to init_fwd_streams from start_port function
to start_packet_forwarding function.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test-pmd/testpmd.c

index 5afce27..38cddca 100644 (file)
@@ -994,6 +994,12 @@ start_packet_forwarding(int with_tx_first)
                printf("Packet forwarding already started\n");
                return;
        }
+
+       if (init_fwd_streams() < 0) {
+               printf("Fail from init_fwd_streams()\n");
+               return;
+       }
+
        if(dcb_test) {
                for (i = 0; i < nb_fwd_ports; i++) {
                        pt_id = fwd_ports_ids[i];
@@ -1284,11 +1290,6 @@ start_port(portid_t pid)
        if (port_id_is_invalid(pid, ENABLED_WARN))
                return 0;
 
-       if (init_fwd_streams() < 0) {
-               printf("Fail from init_fwd_streams()\n");
-               return -1;
-       }
-
        if(dcb_config)
                dcb_test = 1;
        FOREACH_PORT(pi, ports) {