[dpdk-stable] [v2] app/testpmd: fix PPPOES flow API
Xiao Zhang
xiao.zhang at intel.com
Tue Mar 31 15:29:40 CEST 2020
The command line to create RTE flow for specific proto_id of PPPOES can
not work.
It was:
testpmd> flow create 0 ingress pattern proto_id
proto_id [TOKEN]: match PPPoE session protocol identifier
testpmd> flow create 0 ingress pattern proto_id proto_id
proto_id [TOKEN]: match PPPoE session protocol identifier
testpmd> flow create 0 ingress pattern proto_id proto_id proto_id
proto_id [TOKEN]: match PPPoE session protocol identifier
The proto_id can not be set with previous implementation.
This patch is to fix this issue, and change the command line to:
testpmd> flow create 0 pattern pppoe_proto_id is xxxx
Fixes: 226c6e60c35b ("ethdev: add PPPoE to flow API")
Cc: stable at dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
---
v2 change the command line according to review comments.
---
app/test-pmd/cmdline_flow.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index a78154502..7ac01562e 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -1035,7 +1035,6 @@ static const enum index item_pppoes[] = {
};
static const enum index item_pppoe_proto_id[] = {
- ITEM_PPPOE_PROTO_ID,
ITEM_NEXT,
ZERO,
};
@@ -2641,11 +2640,14 @@ static const struct token token_list[] = {
session_id)),
},
[ITEM_PPPOE_PROTO_ID] = {
- .name = "proto_id",
+ .name = "pppoe_proto_id",
.help = "match PPPoE session protocol identifier",
.priv = PRIV_ITEM(PPPOE_PROTO_ID,
sizeof(struct rte_flow_item_pppoe_proto_id)),
- .next = NEXT(item_pppoe_proto_id),
+ .next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY_HTON
+ (struct rte_flow_item_pppoe_proto_id, proto_id)),
.call = parse_vc,
},
[ITEM_HIGIG2] = {
--
2.17.1
More information about the stable
mailing list