app/testpmd: fix MAC address parser for flow rule
MAC address parsing was causing failure [1], this patch partially reverts the commit commit b5ddce8959b2 ("app/testpmd: use new ethernet address parser") [1] testpmd> flow validate 0 priority 2 ingress group 0 pattern eth dst is 98:03:9B:5C:D9:00 / end actions queue index 0 / end Bad arguments Fixes: b5ddce8959b2 ("app/testpmd: use new ethernet address parser") Reported-by: Raslan Darawsheh <rasland@mellanox.com> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Tested-by: Raslan Darawsheh <rasland@mellanox.com>
This commit is contained in:
parent
4fe1af80dd
commit
baa4f61a35
@ -18,6 +18,7 @@
|
||||
#include <rte_ethdev.h>
|
||||
#include <rte_byteorder.h>
|
||||
#include <cmdline_parse.h>
|
||||
#include <cmdline_parse_etheraddr.h>
|
||||
#include <rte_flow.h>
|
||||
|
||||
#include "testpmd.h"
|
||||
@ -4978,8 +4979,8 @@ parse_mac_addr(struct context *ctx, const struct token *token,
|
||||
/* Only network endian is supported. */
|
||||
if (!arg->hton)
|
||||
goto error;
|
||||
ret = rte_ether_unformat_addr(str, &tmp);
|
||||
if (ret < 0)
|
||||
ret = cmdline_parse_etheraddr(NULL, str, &tmp, size);
|
||||
if (ret < 0 || (unsigned int)ret != len)
|
||||
goto error;
|
||||
if (!ctx->object)
|
||||
return len;
|
||||
|
Loading…
x
Reference in New Issue
Block a user