Move call to init_fwd_streams from start_port function
to start_packet_forwarding function.

Signed-off-by: Bernard Iremonger <bernard.iremonger at intel.com>
---
 app/test-pmd/testpmd.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e5e50ca..e632a5b 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -981,6 +981,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];
@@ -1271,11 +1277,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) {
-- 
2.6.3

Reply via email to