app/testpmd: fix token matching in flow command
While matching user input against a token name or any other fixed string,
comparison stops at the end of user input if shorter (e.g. "foo" matches
token name "foobar").
Although the unintended consequence of this behavior allows users to
abbreviate command names and various parameters yet generate valid
commands, the parser was not designed to support this and does not prevent
ambiguous tokens.
For instance, entering "i" for a pattern item matches "ipv4", "ipv6" and
"icmp" then defaults to one of them in an unspecified manner.
Prevent this behavior by taking the length of fixed strings into account.
Fixes:
19c90af6285c ("app/testpmd: add flow command")
Fixes:
5ac3502ed1be ("app/testpmd: add flow query command")
Fixes:
abc3d81aca1b ("app/testpmd: add item raw to flow command")
Fixes:
05d34c6e9d2c ("app/testpmd: add queue actions to flow command")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>