DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix Segment fault when start fwd
@ 2019-09-06  1:28 Wang ShougangX
  2019-09-12 13:26 ` Iremonger, Bernard
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Wang ShougangX @ 2019-09-06  1:28 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu, Yang Qiming, Wang ShougangX, stable

This patch fixed the reset function to avoid crash when user don't
call port reset , port stop and port start functions as sequence.

Fixes: 97f1e19679 ("app/testpmd: add port reset command")
Cc: stable@dpdk.org

Signed-off-by: Wang ShougangX <shougangx.wang@intel.com>
---
 app/test-pmd/testpmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e8e2a39b6..273a7aa02 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2344,6 +2344,9 @@ reset_port(portid_t pid)
 	if (port_id_is_invalid(pid, ENABLED_WARN))
 		return;
 
+	printf("Stopping ports...\n");
+	stop_port(pid);
+
 	printf("Resetting ports...\n");
 
 	RTE_ETH_FOREACH_DEV(pi) {
@@ -2372,6 +2375,9 @@ reset_port(portid_t pid)
 		}
 	}
 
+	printf("Starting ports...\n");
+	start_port(pid);
+
 	printf("Done\n");
 }
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-09-25 17:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06  1:28 [dpdk-dev] [PATCH] app/testpmd: fix Segment fault when start fwd Wang ShougangX
2019-09-12 13:26 ` Iremonger, Bernard
2019-09-13 17:34 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-09-16  6:37   ` Wang, ShougangX
2019-09-16 15:27     ` Ferruh Yigit
2019-09-17  9:22       ` Wang, ShougangX
2019-09-23 11:04         ` Ferruh Yigit
2019-09-23 14:18           ` Iremonger, Bernard
2019-09-24  2:31             ` Wang, ShougangX
2019-09-20  3:13 ` [dpdk-dev] [PATCH v2] " Wang ShougangX
2019-09-23 10:19   ` Iremonger, Bernard
2019-09-24  1:43     ` Wang, ShougangX
2019-09-24  4:49   ` [dpdk-dev] [PATCH v3] " Wang ShougangX
2019-09-24  9:09     ` Iremonger, Bernard
2019-09-25 17:37       ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).