app/testpmd: fix PPPOES flow API
The command line to create RTE flow for specific proto_id of PPPOES is not correct. This patch is to fix this issue.
--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
app/test-pmd/cmdline_flow.c +3 -10
@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,
@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,ITEM_NEXT ,ZERO ,
@@ -2643,10 +2637,9 @@ static const struct token token_list[] = { [ITEM_PPPOE_PROTO_ID] = { .name = "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), - .call = parse_vc, + .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param), + .args =ARGS (ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)), }, [ITEM_HIGIG2] = { .name = "higig2",
Signature · 1 line
2.17.1
Hi Xiao,
Is the proto_id part of the basic header or not?
From the spec it looks like a different header.
If it is part of the original header then all documentations and rte_structs should be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it was changed.
Also please see inline other comment.
Best,
Ori
Quoted 46 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)app/test-pmd/cmdline_flow.c +0
-6@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,ITEM_NEXT ,ZERO ,@@ -2643,10 +2637,9 @@ static const struct token token_list[] = { [ITEM_PPPOE_PROTO_ID] = {
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2643
Quoted 10 lines
app/test-pmd/cmdline_flow.c +3
-4.name = "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), - .call = parse_vc, + .next =NEXT (item_pppoes,NEXT_ENTRY (UNSIGNED ), item_param), + .args =ARGS (ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)),
Where is the memory for this proto_id is defined?
Quoted 5 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi Ori,
Quoted 11 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_id is part of PPPOE session header,
Quoted 8 lines
From the spec it looks like a different header.
If it is part of the original header then all documentations and
rte_structsshould be changed, to reflect this.It will be very helpful if the patch message would explain the bug and why it was changed.
Okay, will add more message. The next value of the ITEM_PPPOE_PROTO_ID should be unsigned value but not item list.
Quoted 56 lines
Also please see inline other comment.
Best,
OriQuoted 50 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)app/test-pmd/cmdline_flow.c +0
-8@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,ITEM_NEXT ,ZERO ,@@ -2643,10 +2637,9 @@ static const struct token token_list[] = { [ITEM_PPPOE_PROTO_ID] = { .name = "proto_id", .help = "match PPPoE session protocol identifier", - .priv =PRIV_ITEM (PPPOE_PROTO_ID , - sizeof(struct rte_flow_item_pppoe_proto_id)),
Quoted 8 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2642
Quoted 6 lines
app/test-pmd/cmdline_flow.c +3
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param), + .args =ARGS (ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)),Where is the memory for this
proto_idis defined?
Do you mean this?lib/librte_ethdev/rte_flow.h
1360 struct rte_flow_item_pppoe_proto_id {
1361 rte_be16_t proto_id; /**< PPP protocol identifier. */
1362 };
Quoted 6 lines
Quoted 6 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi Xiao,
Quoted 16 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;
Quoted 9 lines
Quoted 5 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,
Where is the porto_id located? Inside the payload?
Quoted 79 lines
Quoted 4 lines
From the spec it looks like a different header.
If it is part of the original header then all documentations and
rte_structsshould
Quoted 3 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDshould be unsigned value but not item list.Quoted 56 lines
Also please see inline other comment.
Best,
OriQuoted 50 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)app/test-pmd/cmdline_flow.c +0
-8@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,ITEM_NEXT ,ZERO ,@@ -2643,10 +2637,9 @@ static const struct token token_list[] = { [ITEM_PPPOE_PROTO_ID] = { .name = "proto_id", .help = "match PPPoE session protocol identifier", - .priv =PRIV_ITEM (PPPOE_PROTO_ID , - sizeof(struct rte_flow_item_pppoe_proto_id)),Quoted 8 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2642
Quoted 6 lines
app/test-pmd/cmdline_flow.c +3
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param), + .args =ARGS (ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)),Where is the memory for this
proto_idis defined?
Quoted 6 lines
Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };
Yes. Why don't you use this one?
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi Ori,
Quoted 30 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 6:19 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 2 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Where is the
porto_idlocated? Inside the payload?
Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to RFC2516.
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VER | TYPE | CODE | SESSION_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | payload ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Quoted 82 lines
Quoted 82 lines
Quoted 6 lines
From the spec it looks like a different header.
If it is part of the original header then all documentations and
rte_structsshould
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDshould be unsigned value but not item list.Quoted 64 lines
Also please see inline other comment.
Best,
OriQuoted 46 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d100644app/test-pmd/cmdline_flow.c +0
-6@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,ITEM_NEXT ,ZERO ,@@ -2643,10 +2637,9 @@ static const struct token token_list[] = { [ITEM_PPPOE_PROTO_ID] = {app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2643
Quoted 10 lines
app/test-pmd/cmdline_flow.c +3
-4.name = "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), - .call = parse_vc, + .next =NEXT (item_pppoes,NEXT_ENTRY (UNSIGNED ), item_param), + .args =ARGS (ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)),Where is the memory for this
proto_idis defined?
Quoted 8 lines
Quoted 6 lines
Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
+ .args = ARGS(ARGS_ENTRY_HTON
+ (struct rte_flow_item_pppoe_proto_id, proto_id)),
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi Xiao,
Quoted 53 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 3:00 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 6:19 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 24 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 2 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to RFC2516.
Quoted 8 lines
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VER | TYPE | CODE | SESSION_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | payload ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Yes this is what I thought, does proto_id must be the first part of the payload?
Quoted 97 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
From the spec it looks like a different header.
If it is part of the original header then all documentations and
rte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 42 lines
Quoted 42 lines
should be unsigned value but not item list.
Quoted 40 lines
Also please see inline other comment.
Best,
OriQuoted 34 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d100644app/test-pmd/cmdline_flow.c +0
-1@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-5static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2647
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-2ITEM_NEXT , ZERO,@@ -2643,10 +2637,9 @@ static const struct token token_list[] = { [ITEM_PPPOE_PROTO_ID] = { .name = "proto_id", .help = "match PPPoE session protocol identifier", - .priv = PRIV_ITEM(PPPOE_PROTO_ID, - sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = {
Quoted 6 lines
app/test-pmd/cmdline_flow.c +3
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 11 lines
Quoted 9 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2642
Quoted 2 lines
app/test-pmd/cmdline_flow.c +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)),
Yes but there is no space to save this data since you deleted the priv. I think you are trying to implement something like RTE_FLOW_ITEM_TYPE_IPV6_EXT.
And I don't understand what was the problem with the previous implementation.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi Ori,
Quoted 73 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 8:46 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Xiao,
Quoted 54 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 3:00 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 6:19 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 24 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 2 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to RFC2516.
Quoted 8 lines
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| VER | TYPE | CODE | SESSION_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | payload ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Quoted 1 line
Yes this is what I thought, does
proto_idmust be the first part of the payload?
It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 107 lines
Quoted 100 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all documentations and
rte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 44 lines
Quoted 44 lines
should be unsigned value but not item list.
Quoted 42 lines
Also please see inline other comment.
Best,
OriQuoted 36 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d100644app/test-pmd/cmdline_flow.c +0
-1@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-5static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2647
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-0ITEM_NEXT,app/test-pmd/cmdline_flow.c +0
-2ZERO,@@ -2643,10 +2637,9 @@ static const struct token token_list[] = { [ITEM_PPPOE_PROTO_ID] = { .name = "proto_id", .help = "match PPPoE session protocol identifier", - .priv = PRIV_ITEM(PPPOE_PROTO_ID, - sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = {
Quoted 6 lines
app/test-pmd/cmdline_flow.c +3
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 11 lines
Quoted 9 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2642
Quoted 2 lines
app/test-pmd/cmdline_flow.c +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)),Yes but there is no space to save this data since you deleted the priv. I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.
Quoted 1 line
And I don't understand what was the problem with the previous implementation.
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes proto_id is 21
The previous implementation would be infinite loop for proto_id command and can not specific the value for proto_id. testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / proto_id
proto_id [TOKEN]: match PPPoE session protocol identifier
/ [TOKEN]: specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / proto_id proto_id
proto_id [TOKEN]: match PPPoE session protocol identifier
/ [TOKEN]: specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / proto_id proto_id proto_id
proto_id [TOKEN]: match PPPoE session protocol identifier
/ [TOKEN]: specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / proto_id proto_id proto_id
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi Xiao
Quoted 196 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Monday, March 30, 2020 5:09 AM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 8:46 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 67 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 54 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 3:00 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 6:19 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 24 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 2 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to RFC2516.
Quoted 8 lines
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| VER | TYPE | CODE | SESSION_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | payload ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Quoted 1 line
Yes this is what I thought, does
proto_idmust be the first part of the payload?It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 107 lines
Quoted 100 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all documentations and
rte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 44 lines
Quoted 44 lines
should be unsigned value but not item list.
Quoted 42 lines
Also please see inline other comment.
Best,
OriQuoted 36 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d100644app/test-pmd/cmdline_flow.c +0
-1@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-5static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2647
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-0ITEM_NEXT,app/test-pmd/cmdline_flow.c +0
-2ZERO,@@ -2643,10 +2637,9 @@ static const struct token token_list[] = { [ITEM_PPPOE_PROTO_ID] = { .name = "proto_id", .help = "match PPPoE session protocol identifier", - .priv = PRIV_ITEM(PPPOE_PROTO_ID, - sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 2643
Quoted 6 lines
app/test-pmd/cmdline_flow.c +3
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 11 lines
Quoted 9 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
Review
Quoted 2 lines
(quoted diff) +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)),Yes but there is no space to save this data since you deleted the priv. I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.
Quoted 8 lines
Quoted 1 line
And I don't understand what was the problem with the previous
implementation.
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoesproto_idis 21
The issue is that the pppoe struct doesn't have definition to the proto_id. If you wish a possible solution will be to add it to the pppoe struct, I'm not sure if this is the correct approach since this field is not a must.
Like I said there are examples on how to work with extended headers, which I think are more correct, buy may be the problem is that the pppoe struct is not aligned and this result in an issue when adding the last bytes.
Quoted 24 lines
The previous implementation would be infinite loop for
proto_idcommand and can not specific the value forproto_id.
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 /proto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
/ [TOKEN]: specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 /proto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
/ [TOKEN]: specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 /proto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
/ [TOKEN]: specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 /proto_idproto_idproto_idQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi, Ori
Quoted 224 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Monday, March 30, 2020 3:43 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Xiao
Quoted 11 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Monday, March 30, 2020 5:09 AM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 66 lines
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 8:46 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 59 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 55 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 3:00 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 6:19 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 24 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 2 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to RFC2516.
12 3
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 78 9
0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| VER | TYPE | CODE |
SESSION_ID|Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH |payload ~
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Yes this is what I thought, does
proto_idmust be the first part of thepayload?
Quoted 65 lines
It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 61 lines
Quoted 61 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all documentations and
rte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 44 lines
Quoted 44 lines
should be unsigned value but not item list.
Quoted 42 lines
Also please see inline other comment.
Best,
OriQuoted 36 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d100644app/test-pmd/cmdline_flow.c +0
-1@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] =
Quoted 11 lines
app/test-pmd/cmdline_flow.c +0
-5static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,ITEM_NEXT ,app/test-pmd/cmdline_flow.c +0
-0ZERO,@@ -2643,10 +2637,9 @@ static const struct token token_list[] ={
Quoted 35 lines
Quoted 35 lines
Quoted 28 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = · line 2647
Quoted 5 lines
app/test-pmd/cmdline_flow.c +0
-2[ITEM_PPPOE_PROTO_ID] = { .name = "proto_id", .help = "match PPPoE session protocol identifier", - .priv = PRIV_ITEM(PPPOE_PROTO_ID, - sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = · line 2643
Quoted 6 lines
app/test-pmd/cmdline_flow.c +3
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 11 lines
Quoted 9 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
Review
Quoted 2 lines
(quoted diff) +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id, proto_id)),Yes but there is no space to save this data since you deleted the priv. I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.Quoted 9 lines
Quoted 1 line
And I don't understand what was the problem with the previous
implementation.
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd> pppoesproto_idis 21
Quoted 7 lines
The issue is that the pppoe struct doesn't have definition to the
proto_id. If you wish a possible solution will be to add it to the pppoe struct, I'm not sure if this is the correct approach since this field is not a must.Like I said there are examples on how to work with extended headers, which I think are more correct, buy may be the problem is that the pppoe struct is not aligned and this result in an issue when adding the last bytes.
There is a defination of RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID, do you mean make use of that? That is the reason for use extended header for this?
But that seems as you say, has some bug.
Quoted 29 lines
Quoted 29 lines
The previous implementation would be infinite loop for
proto_idcommand and can not specific the value forproto_id. testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd>proto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd>proto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd>proto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd>proto_idproto_idproto_idQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi Xiao,
Quoted 244 lines
-----Original Message-----
From: Zhao1, Wei <[email protected]>
Sent: Monday, March 30, 2020 11:50 AM
To: Ori Kam <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi, Ori
Quoted 167 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Monday, March 30, 2020 3:43 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Xiao
Quoted 11 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Monday, March 30, 2020 5:09 AM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 66 lines
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 8:46 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 59 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 55 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 3:00 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 6:19 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 24 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 2 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to RFC2516.
12 3
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 78 9
0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| VER | TYPE | CODE |
SESSION_ID|Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH |payload ~
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Yes this is what I thought, does
proto_idmust be the first part of thepayload?
Quoted 65 lines
It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 61 lines
Quoted 61 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all documentations and
rte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 44 lines
Quoted 44 lines
should be unsigned value but not item list.
Quoted 42 lines
Also please see inline other comment.
Best,
OriQuoted 36 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d100644app/test-pmd/cmdline_flow.c +0
-1@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[]
Quoted 11 lines
app/test-pmd/cmdline_flow.c +0
-5static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO , -}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID ,ITEM_NEXT ,app/test-pmd/cmdline_flow.c +0
-0ZERO,@@ -2643,10 +2637,9 @@ static const struct token token_list[]=
Quoted 24 lines
{
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] · line 2647
Quoted 5 lines
app/test-pmd/cmdline_flow.c +0
-2[ITEM_PPPOE_PROTO_ID] = { .name = "proto_id", .help = "match PPPoE session protocol identifier", - .priv = PRIV_ITEM(PPPOE_PROTO_ID, - sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] · line 2643
Quoted 6 lines
app/test-pmd/cmdline_flow.c +3
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 10 lines
Quoted 9 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
Quoted 1 line
Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
(quoted diff) +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Yes but there is no space to save this data since you deleted the priv. I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.Quoted 9 lines
Quoted 1 line
And I don't understand what was the problem with the previous
implementation.
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd> pppoesproto_idis 21Quoted 2 lines
The issue is that the pppoe struct doesn't have definition to the
proto_id. If you wish a possible solution will be to add it to the pppoe struct, I'm notsure
Quoted 4 lines
if this is the correct approach since this field is not a must.
Like I said there are examples on how to work with extended headers, which I think are more correct, buy may be the problem is that the pppoe struct is
Quoted 9 lines
not
Quoted 1 line
aligned and this result in an issue when adding the last bytes.
There is a defination of
RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID, do you mean make use of that?
That is the reason for use extended header for this? But that seems as you say, has some bug.
I understand there is a bug, the question how to solve it.
I suggested two approaches. Add the proto_id to the pppoe struct, but this means that we will add a new member that is not part of the original definition. Maybe the issue is in the PMD and it needs to understand that the proto_id should be located in a different offset.
In any case it doesn't look like the current fix the right one.
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
The previous implementation would be infinite loop for
proto_idcommand and can not specific the value forproto_id. testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd>proto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd>proto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd>proto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / testpmd>proto_idproto_idproto_idQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-0}, [ITEM_HIGIG2] = {.name = "higig2",
--
2.17.1
Hi Ori,
Quoted 277 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Monday, March 30, 2020 4:57 PM
To: Zhao1, Wei <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Xiao,
Quoted 9 lines
-----Original Message-----
From: Zhao1, Wei <[email protected]>
Sent: Monday, March 30, 2020 11:50 AM
To: Ori Kam <[email protected]>; Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIQuoted 89 lines
Hi, Ori
Quoted 87 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Monday, March 30, 2020 3:43 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Xiao
Quoted 76 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Monday, March 30, 2020 5:09 AM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 8:46 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 58 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 54 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 3:00 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 6:19 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 25 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Hi Xiao,
Quoted 21 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 7 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Sunday, March 29, 2020 2:28 PM
To: Zhang, Xiao <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>;Quoted 2 lines
Subject: RE: app/testpmd: fix PPPOES flow API
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to
RFC2516.
Quoted 85 lines
Quoted 85 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
12 3
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 56 7
8 9
0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| VER | TYPE | CODE |
SESSION_ID|Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH |payload ~
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Yes this is what I thought, does
proto_idmust be the first part of thepayload?
Quoted 67 lines
It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 63 lines
Quoted 63 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all
documentations andrte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 46 lines
Quoted 46 lines
should be unsigned value but not item list.
Quoted 44 lines
Also please see inline other comment.
Best,
OriQuoted 38 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>;
[email protected]; [email protected];
[email protected]; Xiao Zhang
<[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix this issue.Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d
100644app/test-pmd/cmdline_flow.c +0
-1@@ -768,7 +768,6 @@ static const enum index next_item[] = {ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
app/test-pmd/cmdline_flow.c +0
-2static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO ,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-3-}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID , ITEM_NEXT,app/test-pmd/cmdline_flow.c +0
-0ZERO,@@ -2643,10 +2637,9 @@ static const struct tokentoken_list[]
=
Quoted 4 lines
{
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c +0
-0[ITEM_PPPOE_PROTO_ID ] = { .name ="proto_id" , .help = "match PPPoE session protocolidentifier",
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
app/test-pmd/cmdline_flow.c
Quoted 2 lines
app/test-pmd/cmdline_flow.c +0
-2- .priv = PRIV_ITEM(PPPOE_PROTO_ID, - sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c
Quoted 3 lines
app/test-pmd/cmdline_flow.c +1
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes,
NEXT_ENTRY(UNSIGNED),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c
Quoted 3 lines
item_param),app/test-pmd/cmdline_flow.c +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct
rte_flow_item_pppoe_proto_id,Quoted 43 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
proto_id)),Quoted 10 lines
Quoted 9 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
Quoted 1 line
Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
(quoted diff) +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Yes but there is no space to save this data since you deleted the priv. I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.Quoted 9 lines
Quoted 1 line
And I don't understand what was the problem with the previous
implementation.
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 / pppoesproto_idis 21Quoted 3 lines
The issue is that the pppoe struct doesn't have definition to the
proto_id. If you wish a possible solution will be to add it to the pppoe struct, I'm notsure
Quoted 5 lines
if this is the correct approach since this field is not a must.
Like I said there are examples on how to work with extended headers, which I think are more correct, buy may be the problem is that the pppoe struct is
Quoted 9 lines
not
Quoted 1 line
aligned and this result in an issue when adding the last bytes.
There is a defination of
RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID, do you mean make use of that?
That is the reason for use extended header for this? But that seems as you say, has some bug.
Quoted 6 lines
I understand there is a bug, the question how to solve it.
I suggested two approaches. Add theproto_idto the pppoe struct, but this means that we will add a new member that is not part of the original definition. Maybe the issue is in the PMD and it needs to understand that theproto_idshould be located in a different offset.
In any case it doesn't look like the current fix the right one.
From my understanding, you mean there are two approaches. One is adding proto_id to pppoe struct. But you don't prefer this one since proto_id is not a must. I am not clear about the other one.
And also how do you suggest the command line be for proto_id?
"proto_id is 0x0021" or "pppoes proto_id is 0x0021"? If the former just like what it was, I think it maybe a little confused. If the latter (as proto_id is part of pppoes), do we still need to put proto_id in rte_flow_item_pppoe?
Thanks,
Xiao
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
The previous implementation would be infinite loop for
proto_idcommand and can not specific the value forproto_id. testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_idQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-1}, [ITEM_HIGIG2] = { .name = "higig2", --2.17.1
Quoted 241 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 53 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 48 lines
-----Original Message-----
From: Zhao1, Wei <[email protected]>Hi, Ori
Quoted 43 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao
Quoted 38 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 33 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 28 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 23 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 18 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Is the
proto_idpart of the basic header or not?Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Proto_idis part of PPPOE session header,Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to
RFC2516.
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
12 3
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 56 7
8 9
0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
| VER | TYPE | CODE |
SESSION_ID|Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH |payload ~
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Yes this is what I thought, does
proto_idmust be the first part of thepayload?
Quoted 39 lines
It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 35 lines
Quoted 35 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all
documentations andrte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 18 lines
Quoted 18 lines
should be unsigned value but not item list.
Quoted 16 lines
Also please see inline other comment.
Best,
OriQuoted 10 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>;
[email protected]; [email protected];
[email protected]; Xiao Zhang
<[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
The command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is to fix thisissue.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
app/test-pmd/cmdline_flow.c static const enum index next_item[]
Quoted 7 lines
(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d
100644app/test-pmd/cmdline_flow.c +0
-0@@ -768,7 +768,6 @@ static const enum index next_item[]= {
Quoted 92 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
app/test-pmd/cmdline_flow.c +0
-1ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
app/test-pmd/cmdline_flow.c +0
-2static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO ,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-3-}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID , ITEM_NEXT,app/test-pmd/cmdline_flow.c +0
-0ZERO,@@ -2643,10 +2637,9 @@ static const struct tokentoken_list[]
=
Quoted 4 lines
{
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c +0
-0[ITEM_PPPOE_PROTO_ID ] = { .name ="proto_id" , .help = "match PPPoE session protocolidentifier",
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
app/test-pmd/cmdline_flow.c
Quoted 2 lines
app/test-pmd/cmdline_flow.c +0
-2- .priv = PRIV_ITEM(PPPOE_PROTO_ID, - sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c
Quoted 3 lines
app/test-pmd/cmdline_flow.c +1
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes,
NEXT_ENTRY(UNSIGNED),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c
Quoted 3 lines
item_param),app/test-pmd/cmdline_flow.c +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct
rte_flow_item_pppoe_proto_id,Quoted 43 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
proto_id)),Quoted 10 lines
Quoted 9 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
Quoted 1 line
Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
(quoted diff) +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Yes but there is no space to save this data since you deleted the priv. I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.Quoted 9 lines
Quoted 1 line
And I don't understand what was the problem with the previous
implementation.
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 / pppoesproto_idis 21Quoted 3 lines
The issue is that the pppoe struct doesn't have definition to the
proto_id. If you wish a possible solution will be to add it to the pppoe struct, I'm notsure
Quoted 5 lines
if this is the correct approach since this field is not a must.
Like I said there are examples on how to work with extended headers, which I think are more correct, buy may be the problem is that the pppoe struct is
Quoted 9 lines
not
Quoted 1 line
aligned and this result in an issue when adding the last bytes.
There is a defination of
RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID, do you mean make use of that?
That is the reason for use extended header for this? But that seems as you say, has some bug.Quoted 3 lines
I understand there is a bug, the question how to solve it.
I suggested two approaches. Add theproto_idto the pppoe struct, but this means that we will add a new member that is not part of the original
Quoted 9 lines
definition.
Quoted 3 lines
Maybe the issue is in the PMD and it needs to understand that the
proto_idshould be located in a different offset.
In any case it doesn't look like the current fix the right one.From my understanding, you mean there are two approaches. One is adding
proto_idto pppoe struct. But you don't prefer this one sinceproto_idis not a must. I am not clear about the other one.
The solution should be just like the pdu_type which is part of the gtp_psc. You can find also my comments on this, in the ML.
I think it is exactly the same case.
Example line for pdu type: flow create 0 ingress pattern gtp_psc pdu_t is xxx The thread https://patches.dpdk.org/patch/67198/
Quoted 39 lines
And also how do you suggest the command line be for
proto_id?
"proto_idis0x0021" or "pppoesproto_idis0x0021"? If the former just like what it was, I think it maybe a little confused. If the latter (asproto_idis part of pppoes), do we still need to putproto_idinrte_flow_item_pppoe?Thanks,
XiaoQuoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
The previous implementation would be infinite loop for
proto_idcommand and can not specific the value forproto_id. testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_idQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-1}, [ITEM_HIGIG2] = { .name = "higig2", --2.17.1
Quoted 271 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Tuesday, March 31, 2020 2:55 PM
To: Zhang, Xiao <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIQuoted 248 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 56 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 51 lines
-----Original Message-----
From: Zhao1, Wei <[email protected]>Hi, Ori
Quoted 46 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao
Quoted 41 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 36 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 31 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 26 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Quoted 16 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to
RFC2516.
Quoted 10 lines
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
12 3
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 34 5
6 7
8 9
0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
| VER | TYPE | CODE |
SESSION_ID|Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH |payload ~
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Yes this is what I thought, does
proto_idmust be the first part of thepayload?
Quoted 39 lines
It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 35 lines
Quoted 35 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all
documentations andrte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 18 lines
Quoted 18 lines
should be unsigned value but not item list.
Quoted 16 lines
Also please see inline other comment.
Best,
OriQuoted 10 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>;
[email protected]; [email protected];
[email protected]; Xiao Zhang
<[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
The command line to create RTE flow for specific
proto_idof PPPOES is not correct. This patch is
to fix thisissue.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Fixes 226c6e60c35b ("ethdev: add PPPoE to flowAPI")
Cc: [email protected]Signed-off-by Xiao Zhang <[email protected]>--- app/test-pmd/cmdline_flow.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
(quoted diff) +0
-0
b/app/test-pmd/cmdline_flow.cindexa78154502..c25a2598d
100644app/test-pmd/cmdline_flow.c +0
-0@@ -768,7 +768,6 @@ static const enum indexnext_item[]
= {
Quoted 93 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
app/test-pmd/cmdline_flow.c +0
-1ITEM_GTP_PSC ,ITEM_PPPOES ,ITEM_PPPOED , -ITEM_PPPOE_PROTO_ID ,ITEM_HIGIG2 ,ITEM_TAG , ITEM_L2TPV3OIP,@@ -1030,11 +1029,6 @@ static const enum index item_pppoed[] = {Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
app/test-pmd/cmdline_flow.c +0
-2static const enum index item_pppoes[] = {ITEM_PPPOE_SEID , -ITEM_NEXT , -ZERO ,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-3-}; - -static const enum index item_pppoe_proto_id[] = {ITEM_PPPOE_PROTO_ID , ITEM_NEXT,app/test-pmd/cmdline_flow.c +0
-0ZERO,@@ -2643,10 +2637,9 @@ static const struct tokentoken_list[]
=
Quoted 4 lines
{
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c +0
-0[ITEM_PPPOE_PROTO_ID ] = { .name ="proto_id" , .help = "match PPPoE session protocolidentifier",
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
app/test-pmd/cmdline_flow.c
Quoted 2 lines
app/test-pmd/cmdline_flow.c +0
-2- .priv = PRIV_ITEM(PPPOE_PROTO_ID, - sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c
Quoted 3 lines
app/test-pmd/cmdline_flow.c +1
-2- .next = NEXT(item_pppoe_proto_id), - .call = parse_vc, + .next = NEXT(item_pppoes,
NEXT_ENTRY(UNSIGNED),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
app/test-pmd/cmdline_flow.c
Quoted 3 lines
item_param),app/test-pmd/cmdline_flow.c +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct
rte_flow_item_pppoe_proto_id,Quoted 44 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
proto_id)),Quoted 10 lines
Quoted 9 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier. */
1362 };Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
Quoted 1 line
Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
(quoted diff) +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 17 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Yes but there is no space to save this data since you deleted the priv. I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.And I don't understand what was the problem with the previous
Quoted 8 lines
implementation.
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 / pppoesproto_idis 21Quoted 3 lines
The issue is that the pppoe struct doesn't have definition to the
proto_id. If you wish a possible solution will be to add it to the pppoe struct, I'm notsure
Quoted 5 lines
if this is the correct approach since this field is not a must.
Like I said there are examples on how to work with extended headers, which I think are more correct, buy may be the problem is that the pppoe struct is
Quoted 9 lines
not
Quoted 1 line
aligned and this result in an issue when adding the last bytes.
There is a defination of
RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID, do you mean make use of that?
That is the reason for use extended header for this? But that seems as you say, has some bug.Quoted 4 lines
I understand there is a bug, the question how to solve it. I suggested two approaches. Add the
proto_idto the pppoe struct, but this means that we will add a new member that is not part of the originalQuoted 9 lines
definition.
Quoted 3 lines
Maybe the issue is in the PMD and it needs to understand that the
proto_idshould be located in a different offset.
In any case it doesn't look like the current fix the right one.From my understanding, you mean there are two approaches. One is adding
proto_idto pppoe struct. But you don't prefer this one sinceproto_idis not a must. I am not clear about the other one.
Quoted 5 lines
The solution should be just like the
pdu_typewhich is part of thegtp_psc. You can find also my comments on this, in the ML.
I think it is exactly the same case.
Example line for pdu type: flow create 0 ingress patterngtp_pscpdu_tis xxx The thread https://patches.dpdk.org/patch/67198/
Yes, so the line for should be:
flow create 0 ingress pattern pppoes proto_id is xxx .
But since we already have pppoes line for command pppoes seid is xxx, we need use another word instead of pppoes for proto_id, right? If yes, do you have any suggestion?
Quoted 42 lines
Quoted 6 lines
And also how do you suggest the command line be for
proto_id? "proto_idis0x0021" or "pppoesproto_idis0x0021"? If the former just like what it was, I think it maybe a little confused. If the latter (asproto_idis part of pppoes), do we still need to putproto_idin
rte_flow_item_pppoe?Quoted 35 lines
Thanks,
XiaoQuoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
The previous implementation would be infinite loop for
proto_idcommand and can not specific the value forproto_id. testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier / [TOKEN]:
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is
testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_idQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
app/test-pmd/cmdline_flow.c +0
-1}, [ITEM_HIGIG2] = { .name = "higig2", --2.17.1
Quoted 289 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Subject: RE: app/testpmd: fix PPPOES flow APIQuoted 87 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Subject: RE: app/testpmd: fix PPPOES flow APIQuoted 81 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 56 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 51 lines
-----Original Message-----
From: Zhao1, Wei <[email protected]>Hi, Ori
Quoted 46 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao
Quoted 41 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 36 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 31 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 26 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Is the
proto_idpart of the basic header or not?
Proto_idis part of PPPOE session header,Quoted 16 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to
RFC2516.
Quoted 10 lines
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
12 3
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 34 5
6 7
8 9
0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
| VER | TYPE | CODE |
SESSION_ID|Quoted 1 line
Quoted 1 line
Quoted 1 line
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
+
Quoted 109 lines
Quoted 109 lines
Quoted 47 lines
Quoted 47 lines
Quoted 47 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
| LENGTH |
payload ~
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Yes this is what I thought, does
proto_idmust be the first part of thepayload?
Quoted 39 lines
It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 35 lines
Quoted 35 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all
documentations andrte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message would explain the bug and why it
was
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 18 lines
Quoted 18 lines
should be unsigned value but not item list.
Quoted 16 lines
Also please see inline other comment.
Best,
OriQuoted 10 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>;
[email protected]; [email protected];
[email protected]; Xiao Zhang
<[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
The command line to create RTE flow for specific
proto_id of PPPOES is not correct. This patch is
to fix thisissue.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Fixes: 226c6e60c35b ("ethdev: add PPPoE to flow
API")
Cc: [email protected]Signed-off-by: Xiao Zhang <[email protected]>
---
app/test-pmd/cmdline_flow.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
diff --git a/app/test-pmd/cmdline_flow.c
b/app/test-pmd/cmdline_flow.c index
a78154502..c25a2598d
100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -768,7 +768,6 @@ static const enum index
next_item[]= {
Quoted 39 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
ITEM_GTP_PSC,
ITEM_PPPOES,
ITEM_PPPOED,
- ITEM_PPPOE_PROTO_ID,
ITEM_HIGIG2,
ITEM_TAG,
ITEM_L2TPV3OIP,
@@ -1030,11 +1029,6 @@ static const enum index
item_pppoed[] = {Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
static const enum index item_pppoes[] = {
ITEM_PPPOE_SEID,
- ITEM_NEXT,
- ZERO,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
-};
-
-static const enum index item_pppoe_proto_id[] = {
ITEM_PPPOE_PROTO_ID,
ITEM_NEXT,
ZERO,
@@ -2643,10 +2637,9 @@ static const struct token
token_list[]=
Quoted 4 lines
{
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
[ITEM_PPPOE_PROTO_ID] = {
.name = "proto_id",
.help = "match PPPoE session protocolidentifier",
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
- .priv = PRIV_ITEM(PPPOE_PROTO_ID,
- sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
- .next = NEXT(item_pppoe_proto_id),
- .call = parse_vc,
+ .next = NEXT(item_pppoes,
NEXT_ENTRY(UNSIGNED),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
item_param),
+ .args = ARGS(ARGS_ENTRY_HTON
+ (struct
rte_flow_item_pppoe_proto_id,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
proto_id)),Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Where is the memory for this
proto_idis defined?Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier.*/
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
1362 };
Yes. Why don't you use this one?
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Review
Quoted 4 lines
I think I was using this, am I using it incorrectly?
(quoted diff) +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct rte_flow_item_pppoe_proto_id,
proto_id)),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Yes but there is no space to save this data since you deleted the
priv.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.And I don't understand what was the problem with the previous
implementation.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 / pppoesproto_idis 21The issue is that the pppoe struct doesn't have definition to the
proto_id.Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
If you wish a possible solution will be to add it to the pppoe struct, I'm not
sure
Quoted 2 lines
if this is the correct approach since this field is not a must.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Like I said there are examples on how to work with extended headers, which I think are more correct, buy may be the problem is that the pppoe struct is
not
Quoted 1 line
aligned and this result in an issue when adding the last bytes.
There is a defination of
RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID, doyou
Quoted 19 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
mean make use of that?
That is the reason for use extended header for this? But that seems as you say, has some bug.I understand there is a bug, the question how to solve it. I suggested two approaches. Add the
proto_idto the pppoe struct, but this means that we will add a new member that is not part of the originalQuoted 9 lines
definition.
Quoted 3 lines
Maybe the issue is in the PMD and it needs to understand that the
proto_idshould be located in a different offset.
In any case it doesn't look like the current fix the right one.From my understanding, you mean there are two approaches. One is adding
proto_idto pppoe struct. But you don't prefer this one sinceproto_idis not a must. I am not clear about the other one.Quoted 4 lines
The solution should be just like the
pdu_typewhich is part of thegtp_psc. You can find also my comments on this, in the ML.
I think it is exactly the same case.
Example line for pdu type: flow create 0 ingress patterngtp_pscpdu_tis xxxThe
Quoted 1 line
thread
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatches.d
pdk.org%2Fpatch%2F67198%2F&data=02%7C01%7Corika%40mellanox.co m%7Cb393253da4f84b2e909908d7d54b817b%7Ca652971c7d2e4d9ba6a4d149 256f461b%7C0%7C0%7C637212392573440621&sdata=QBGaw8RypOoikbb veKhbgv4PxZbOJ7p7pNESV6D%2FBT0%3D&reserved=0
Quoted 7 lines
Yes, so the line for should be:
flow create 0 ingress pattern pppoesproto_idis xxx .But since we already have pppoes line for command pppoes seid is xxx, we need use another word instead of pppoes for
proto_id, right? If yes, do you have any suggestion?
I think it should be something like this:
Flow create 0 ingress pattern pppoe_proto_id proto_id is xxx
Since the pppoe_proto_id has only one field maybe we can go with the following approach:
Flow create 0 ingress pattern pppoe_proto_id is xxx
Quoted 45 lines
Quoted 19 lines
Quoted 6 lines
And also how do you suggest the command line be for
proto_id? "proto_idis0x0021" or "pppoesproto_idis0x0021"? If the former just like what it was, I think it maybe a little confused. If the latter (asproto_idis part of pppoes), do we still need to putproto_idin
rte_flow_item_pppoe?Quoted 12 lines
Thanks,
XiaoQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
The previous implementation would be infinite loop for
proto_idcommand and can not specific the value forproto_id. testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 /proto_id
proto_id[TOKEN]: match PPPoE session protocol identifier /[TOKEN]:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 /proto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier /[TOKEN]:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier /[TOKEN]:
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_idQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
},
[ITEM_HIGIG2] = {
.name = "higig2",
--
2.17.1
Quoted 324 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Tuesday, March 31, 2020 5:06 PM
To: Zhang, Xiao <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIQuoted 223 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Subject: RE: app/testpmd: fix PPPOES flow APIQuoted 90 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Subject: RE: app/testpmd: fix PPPOES flow APIQuoted 84 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 56 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 51 lines
-----Original Message-----
From: Zhao1, Wei <[email protected]>Hi, Ori
Quoted 46 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao
Quoted 41 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 36 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 31 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>Hi Ori,
Quoted 26 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Quoted 20 lines
-----Original Message-----
From: Zhang, Xiao <[email protected]>
Sent: Sunday, March 29, 2020 12:06 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: Wang, Ying A <[email protected]>; Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: app/testpmd: fix PPPOES flow APIHi Ori,
Quoted 6 lines
-----Original Message-----
From: Ori Kam <[email protected]>Hi Xiao,
Is the proto_id part of the basic header or not?
Proto_idis part of PPPOE session header,Quoted 17 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Where is the
porto_idlocated? Inside the payload?Yes, my previous explanation was not clear. The protocol ID is in the beginning of the payload in PPP Session Stage according to
RFC2516.
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
12 3
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 23
4 5
6 7
8 9
0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
| VER | TYPE | CODE |
SESSION_ID|Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+
Quoted 114 lines
Quoted 114 lines
Quoted 49 lines
Quoted 49 lines
Quoted 49 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
| LENGTH |
payload ~
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+Yes this is what I thought, does
proto_idmust be the first part of thepayload?
Quoted 39 lines
It must be the first part of the payload for PPP Session Stage, not all PPPOE packets.
Quoted 35 lines
Quoted 35 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
From the spec it looks like a different header.
If it is part of the original header then all
documentations and rte_structsshould
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
be changed, to reflect this.
It will be very helpful if the patch message
would explain the bug and why itwas
Quoted 1 line
changed.
Okay, will add more message. The next value of the
ITEM_PPPOE_PROTO_IDQuoted 18 lines
Quoted 18 lines
should be unsigned value but not item list.
Quoted 16 lines
Also please see inline other comment.
Best,
Ori-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Friday, March 27, 2020 11:19 AM
To: [email protected]
Cc: Ori Kam <[email protected]>;
[email protected]; [email protected];
[email protected]; Xiao Zhang
<[email protected]>; [email protected]
Subject: app/testpmd: fix PPPOES flow APIQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
The command line to create RTE flow for
specific proto_id of PPPOES is not correct.
This patch is to fix thisissue.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Fixes: 226c6e60c35b ("ethdev: add PPPoE to
flow
API")
Cc: [email protected]Signed-off-by: Xiao Zhang
<[email protected]>
---
app/test-pmd/cmdline_flow.c | 13
+++----------
1 file changed, 3 insertions(+), 10
deletions(-)Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
diff --git a/app/test-pmd/cmdline_flow.c
b/app/test-pmd/cmdline_flow.c index
a78154502..c25a2598d
100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -768,7 +768,6 @@ static const enum index
next_item[]= {
Quoted 38 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
ITEM_GTP_PSC,
ITEM_PPPOES,
ITEM_PPPOED,
- ITEM_PPPOE_PROTO_ID,
ITEM_HIGIG2,
ITEM_TAG,
ITEM_L2TPV3OIP, @@ -1030,11 +1029,6 @@
static const enum index item_pppoed[] = {Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
static const enum index item_pppoes[] = {
ITEM_PPPOE_SEID,
- ITEM_NEXT,
- ZERO,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
-};
-
-static const enum index item_pppoe_proto_id[] = {
ITEM_PPPOE_PROTO_ID,
ITEM_NEXT,
ZERO,
@@ -2643,10 +2637,9 @@ static const struct
token token_list[]=
Quoted 4 lines
{
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
[ITEM_PPPOE_PROTO_ID] = {
.name = "proto_id",
.help = "match PPPoE session protocolidentifier",
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
- .priv = PRIV_ITEM(PPPOE_PROTO_ID,
- sizeof(struct
rte_flow_item_pppoe_proto_id)),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
- .next = NEXT(item_pppoe_proto_id),
- .call = parse_vc,
+ .next = NEXT(item_pppoes,
NEXT_ENTRY(UNSIGNED),Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
item_param),
+ .args = ARGS(ARGS_ENTRY_HTON
+ (struct
rte_flow_item_pppoe_proto_id,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
proto_id)),Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Where is the memory for this proto_id is defined?
Do you mean this?
lib/librte_ethdev/rte_flow.h
1360 structrte_flow_item_pppoe_proto_id{
1361rte_be16_tproto_id; /**< PPP protocol identifier.*/
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
1362 };
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 6 lines
Quoted 1 line
Yes. Why don't you use this one?
I think I was using this, am I using it incorrectly?
(quoted diff) +2
-0+ .args = ARGS(ARGS_ENTRY_HTON + (struct
rte_flow_item_pppoe_proto_id,Quoted 61 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
proto_id)),Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Yes but there is no space to save this data since you deleted the
priv.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
Quoted 5 lines
I think you are trying to implement something like
RTE_FLOW_ITEM_TYPE_IPV6_EXT.And I don't understand what was the problem with the previous
implementation.
I deleted the priv because it changed to a subcommand in pppoes, the command line will be like this:
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 / pppoesproto_idis 21Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
The issue is that the pppoe struct doesn't have definition to the
proto_id.Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
If you wish a possible solution will be to add it to the pppoe struct, I'm not
sure
Quoted 2 lines
if this is the correct approach since this field is not a must.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Like I said there are examples on how to work with extended headers, which I think are more correct, buy may be the problem is that the pppoe struct is
not
Quoted 1 line
aligned and this result in an issue when adding the last bytes.
There is a defination of
RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID, doyou
Quoted 19 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
mean make use of that?
That is the reason for use extended header for this? But that seems as you say, has some bug.I understand there is a bug, the question how to solve it. I suggested two approaches. Add the
proto_idto the pppoe struct, but this means that we will add a new member that is not part of the originalQuoted 9 lines
definition.
Quoted 3 lines
Maybe the issue is in the PMD and it needs to understand that the
proto_idshould be located in a different offset. In any case it doesn't look like the current fix the right one.From my understanding, you mean there are two approaches. One is adding
proto_idto pppoe struct. But you don't prefer this one sinceproto_idis not a must. I am not clear about the other one.Quoted 5 lines
The solution should be just like the
pdu_typewhich is part of thegtp_psc. You can find also my comments on this, in the ML.
I think it is exactly the same case.
Example line for pdu type: flow create 0 ingress patterngtp_pscpdu_tis xxxQuoted 5 lines
The
Quoted 1 line
thread
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
hes.dpdk.org%2Fpatch%2F67198%2F&data=02%7C01%7Corika%40mellanox.co
Quoted 1 line
m%7Cb393253da4f84b2e909908d7d54b817b%7Ca652971c7d2e4d9ba6a4d149
Quoted 1 line
256f461b%7C0%7C0%7C637212392573440621&sdata=QBGaw8RypOoikbb
Quoted 9 lines
veKhbgv4PxZbOJ7p7pNESV6D%2FBT0%3D&reserved=0
Yes, so the line for should be:
flow create 0 ingress pattern pppoesproto_idis xxx .But since we already have pppoes line for command pppoes seid is xxx, we need use another word instead of pppoes for
proto_id, right? If yes, do you have any suggestion?
Quoted 6 lines
I think it should be something like this:
Flow create 0 ingress patternpppoe_proto_idproto_idis xxxSince the
pppoe_proto_idhas only one field maybe we can go with the following approach:
Flow create 0 ingress patternpppoe_proto_idis xxx
Yes, "flow create 0 ingress pattern pppoe_proto_id is xxx" will be better, will change to it.
Quoted 51 lines
Quoted 51 lines
Quoted 4 lines
Quoted 19 lines
Quoted 5 lines
And also how do you suggest the command line be for
proto_id? "proto_idis0x0021" or "pppoesproto_idis0x0021"? If the former just like what it was, I think it maybe a little confused. If the latter (asproto_idis part of pppoes), do we still need to putproto_idin
rte_flow_item_pppoe?Quoted 13 lines
Thanks,
XiaoQuoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
The previous implementation would be infinite loop for
proto_idcommand and can not specific the value forproto_id. testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 /proto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
/[TOKEN]:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 /proto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
/[TOKEN]:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
/[TOKEN]:
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
specify next pattern item
testpmd> flow create 0 ingress pattern eth dst is testpmd> 00:11:22:33:44:55 /proto_idproto_idproto_idQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
},
[ITEM_HIGIG2] = {
.name = "higig2",
--
2.17.1
PATCH v2 1/1 app/testpmd: fix PPPOES flow API
In reply to Xiao ZhangThe 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
---
v2 change the command line according to review comments.
--- app/test-pmd/cmdline_flow.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
app/test-pmd/cmdline_flow.c +5 -3
@@ -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] = {
Signature · 1 line
2.17.1
Hi Xiao,
Quoted 24 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Tuesday, March 31, 2020 4:30 PM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: [v2] app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES can not work.It was:
testpmd> flow create 0 ingress patternproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
testpmd> flow create 0 ingress patternproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
testpmd> flow create 0 ingress patternproto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifierThe
proto_idcan not be set with previous implementation.This patch is to fix this issue, and change the command line to:
testpmd> flow create 0 patternpppoe_proto_idis xxxx
Quoted 7 lines
Fixes 226c6e60c35b ("ethdev: add PPPoE to flow API")Signed-off-by Xiao Zhang <[email protected]>---
v2 change the command line according to review comments.
---
Thanks,
Ori
Quoted 34 lines
app/test-pmd/cmdline_flow.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)app/test-pmd/cmdline_flow.c +5
-4@@ -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
Ferruh Yigit
AppliedQuoted 31 lines · Ori Kam
Hi Xiao,
Quoted 27 lines
-----Original Message-----
From: Xiao Zhang <[email protected]>
Sent: Tuesday, March 31, 2020 4:30 PM
To: [email protected]
Cc: Ori Kam <[email protected]>; [email protected]; [email protected]; Xiao Zhang <[email protected]>; [email protected]
Subject: [v2] app/testpmd: fix PPPOES flow APIThe command line to create RTE flow for specific
proto_idof PPPOES can not work.It was:
testpmd> flow create 0 ingress patternproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
testpmd> flow create 0 ingress patternproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifier
testpmd> flow create 0 ingress patternproto_idproto_idproto_id
proto_id[TOKEN]: match PPPoE session protocol identifierThe
proto_idcan not be set with previous implementation.This patch is to fix this issue, and change the command line to:
testpmd> flow create 0 patternpppoe_proto_idis xxxxFixes 226c6e60c35b ("ethdev: add PPPoE to flow API")
Quoted 6 lines
Quoted 4 lines
Signed-off-by Xiao Zhang <[email protected]>---
v2 change the command line according to review comments.
---Acked-by Ori Kam <[email protected]>
Applied to dpdk-next-net/master, thanks.