app/testpmd: fix identifier size for port attach
authorWisam Jaddo <wisamm@mellanox.com>
Wed, 19 Feb 2020 16:47:30 +0000 (18:47 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Feb 2020 10:41:20 +0000 (11:41 +0100)
Identifier for new port may contain white list options,
and white list options will not fit into 128 from STR_TOKEN_SIZE,
instead having 4096 char from STR_MULTI_TOKEN_SIZE will provide
better and more options

Fixes: edab33b1c01d ("app/testpmd: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
app/test-pmd/cmdline.c

index 38b6d80..a037a55 100644 (file)
@@ -1446,7 +1446,7 @@ cmdline_parse_inst_t cmd_set_port_setup_on = {
 struct cmd_operate_attach_port_result {
        cmdline_fixed_string_t port;
        cmdline_fixed_string_t keyword;
-       cmdline_fixed_string_t identifier;
+       cmdline_multi_string_t identifier;
 };
 
 static void cmd_operate_attach_port_parsed(void *parsed_result,
@@ -1469,7 +1469,7 @@ cmdline_parse_token_string_t cmd_operate_attach_port_keyword =
                        keyword, "attach");
 cmdline_parse_token_string_t cmd_operate_attach_port_identifier =
        TOKEN_STRING_INITIALIZER(struct cmd_operate_attach_port_result,
-                       identifier, NULL);
+                       identifier, TOKEN_STRING_MULTI);
 
 cmdline_parse_inst_t cmd_operate_attach_port = {
        .f = cmd_operate_attach_port_parsed,