X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fcmdline.c;h=6d28c1baff89cf52ee0bda1707b7cdfa18d8ed5e;hb=d3a274ce9dee28118b8647e0db72ef0f4b6a6323;hp=7187cd85b3ee236968f01e4e8ca1e60e540e90cb;hpb=79bec05b32b75ce38a916f0d7605f6cd448ea72b;p=dpdk.git diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 7187cd85b3..6d28c1baff 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -90,6 +90,8 @@ #include "testpmd.h" +static struct cmdline *testpmd_cl; + static void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue); #ifdef RTE_NIC_BYPASS @@ -199,6 +201,9 @@ static void cmd_help_long_parsed(void *parsed_result, "clear port (info|stats|xstats|fdir|stat_qmap) (port_id|all)\n" " Clear information for port_id, or all.\n\n" + "show (rxq|txq) info (port_id) (queue_id)\n" + " Display information for configured RX/TX queue.\n\n" + "show config (rxtx|cores|fwd|txpkts)\n" " Display the given configuration.\n\n" @@ -9775,17 +9780,21 @@ cmdline_parse_ctx_t main_ctx[] = { void prompt(void) { - struct cmdline *cl; - /* initialize non-constant commands */ cmd_set_fwd_mode_init(); - cl = cmdline_stdin_new(main_ctx, "testpmd> "); - if (cl == NULL) { + testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> "); + if (testpmd_cl == NULL) return; - } - cmdline_interact(cl); - cmdline_stdin_exit(cl); + cmdline_interact(testpmd_cl); + cmdline_stdin_exit(testpmd_cl); +} + +void +prompt_exit(void) +{ + if (testpmd_cl != NULL) + cmdline_quit(testpmd_cl); } static void