From: Pablo de Lara Date: Fri, 27 Feb 2015 11:18:39 +0000 (+0000) Subject: app/testpmd: stop forwarding when quitting X-Git-Tag: spdx-start~9447 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8210ec2572ae887f76a3dff1e44f2c253d8e5616;p=dpdk.git app/testpmd: stop forwarding when quitting When user quits testpmd, and there is traffic being forwarded, that may produce a segmentation fault, due to ports being closed, while they are still transmitting packets. This patch prevents the issue from happening, by stopping packet forwarding before closing the ports. Signed-off-by: Pablo de Lara --- diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index e38c441c81..4828354bf4 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1633,6 +1633,9 @@ pmd_test_exit(void) { portid_t pt_id; + if (test_done == 0) + stop_packet_forwarding(); + FOREACH_PORT(pt_id, ports) { printf("Stopping port %d...", pt_id); fflush(stdout);