From: Xiao Zhang Date: Tue, 31 Mar 2020 13:29:40 +0000 (+0800) Subject: app/testpmd: fix PPPoE flow command X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c3ea098ae3a99fcf654432154ebc5b7a33866d89;p=dpdk.git app/testpmd: fix PPPoE flow command 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@dpdk.org Signed-off-by: Xiao Zhang Acked-by: Ori Kam --- diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 4877ac6c8a..e6ab8ff2f7 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -1037,7 +1037,6 @@ static const enum index item_pppoes[] = { }; static const enum index item_pppoe_proto_id[] = { - ITEM_PPPOE_PROTO_ID, ITEM_NEXT, ZERO, }; @@ -2649,11 +2648,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] = {