[v2] app/testpmd: fix PPPOES flow API
Checks
Commit Message
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 <xiao.zhang@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(-)
Comments
Hi Xiao,
> -----Original Message-----
> From: Xiao Zhang <xiao.zhang@intel.com>
> Sent: Tuesday, March 31, 2020 4:30 PM
> To: dev@dpdk.org
> Cc: Ori Kam <orika@mellanox.com>; qi.z.zhang@intel.com;
> wei.zhao1@intel.com; Xiao Zhang <xiao.zhang@intel.com>; stable@dpdk.org
> Subject: [v2] app/testpmd: fix PPPOES flow API
>
> 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 <xiao.zhang@intel.com>
> ---
> v2 change the command line according to review comments.
> ---
Acked-by: Ori Kam <orika@mellanox.com>
Thanks,
Ori
> 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
On 4/5/2020 4:12 PM, Ori Kam wrote:
> Hi Xiao,
>
>
>
>> -----Original Message-----
>> From: Xiao Zhang <xiao.zhang@intel.com>
>> Sent: Tuesday, March 31, 2020 4:30 PM
>> To: dev@dpdk.org
>> Cc: Ori Kam <orika@mellanox.com>; qi.z.zhang@intel.com;
>> wei.zhao1@intel.com; Xiao Zhang <xiao.zhang@intel.com>; stable@dpdk.org
>> Subject: [v2] app/testpmd: fix PPPOES flow API
>>
>> 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 <xiao.zhang@intel.com>
>> ---
>> v2 change the command line according to review comments.
>> ---
>
> Acked-by: Ori Kam <orika@mellanox.com>
Applied to dpdk-next-net/master, thanks.
@@ -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] = {