Skip to contentSkip to conversation

ethdev: add IPv6 DSCP option for modify field action

PATCH Superseded Alexander Kozyrev 4 participants 8 messages Jan 26, 2021 – Jan 27, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethdev: add IPv6 DSCP option for modify field action

IPv6 DSCP field ID is missing from the original list of Field IDs for MODIFY_FIELD action. Add it to support IPv6 header fully.

Fixes 73b68f4c54a ("ethdev: introduce generic modify flow action")
---
 lib/librte_ethdev/rte_flow.h | 1 +
 1 file changed, 1 insertion(+)
lib/librte_ethdev/rte_flow.h +1 -0
index 46e8ee70ab..68c68cdd6c 100644
@@ -2842,6 +2842,7 @@ enum rte_flow_field_id {
 	RTE_FLOW_FIELD_IPV4_TTL,
 	RTE_FLOW_FIELD_IPV4_SRC,
 	RTE_FLOW_FIELD_IPV4_DST,
+	RTE_FLOW_FIELD_IPV6_DSCP,
 	RTE_FLOW_FIELD_IPV6_HOPLIMIT,
 	RTE_FLOW_FIELD_IPV6_SRC,
 	RTE_FLOW_FIELD_IPV6_DST,
Signature · 1 line
2.24.1
#1 lore raw
Quoted 15 lines · On Tue, 26 Jan 2021 03:38:24 +0000 Alexander Kozyrev <[email protected]>…

IPv6 DSCP field ID is missing from the original list of Field IDs for MODIFY_FIELD action. Add it to support IPv6 header fully.

Fixes 73b68f4c54a ("ethdev: introduce generic modify flow action")
---
 lib/librte_ethdev/rte_flow.h | 1 +
 1 file changed, 1 insertion(+)
lib/librte_ethdev/rte_flow.h +0 -0
index 46e8ee70ab..68c68cdd6c 100644

lib/librte_ethdev/rte_flow.h enum rte_flow_field_id { · line 2848

Quoted 7 lines
lib/librte_ethdev/rte_flow.h +1 -0
@@ -2842,6 +2842,7 @@ enum rte_flow_field_id {
 	RTE_FLOW_FIELD_IPV4_TTL,
 	RTE_FLOW_FIELD_IPV4_SRC,
 	RTE_FLOW_FIELD_IPV4_DST,
+	RTE_FLOW_FIELD_IPV6_DSCP,
 	RTE_FLOW_FIELD_IPV6_HOPLIMIT,
 	RTE_FLOW_FIELD_IPV6_SRC,
 	RTE_FLOW_FIELD_IPV6_DST,

Adding field in middle of enum will break ABI.

#2 lore raw
Quoted 15 lines

From: Stephen Hemminger <[email protected]> on Monday, January 25, 2021 22:44

Quoted 10 lines · On Tue, 26 Jan 2021 03:38:24 +0000 Alexander Kozyrev <[email protected]>…

IPv6 DSCP field ID is missing from the original list of Field IDs for MODIFY_FIELD action. Add it to support IPv6 header fully.

Fixes 73b68f4c54a ("ethdev: introduce generic modify flow action")
---
 lib/librte_ethdev/rte_flow.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

lib/librte_ethdev/rte_flow.h enum rte_flow_field_id { · line 2848

Quoted 12 lines
lib/librte_ethdev/rte_flow.h +1 -0
index 46e8ee70ab..68c68cdd6c 100644
@@ -2842,6 +2842,7 @@ enum rte_flow_field_id {
 	RTE_FLOW_FIELD_IPV4_TTL,
 	RTE_FLOW_FIELD_IPV4_SRC,
 	RTE_FLOW_FIELD_IPV4_DST,
+	RTE_FLOW_FIELD_IPV6_DSCP,
 	RTE_FLOW_FIELD_IPV6_HOPLIMIT,
 	RTE_FLOW_FIELD_IPV6_SRC,
 	RTE_FLOW_FIELD_IPV6_DST,

Adding field in middle of enum will break ABI.

I added the rte_flow_field_id enum a week ago into 20.11-rc1.
I believe it is not too late to make it right without breaking ABI, don't you think so?

#3 lore raw
Quoted 31 lines · Alexander Kozyrev
Quoted 16 lines

From: Stephen Hemminger <[email protected]> on Monday, January 25, 2021 22:44

Quoted 10 lines · On Tue, 26 Jan 2021 03:38:24 +0000 Alexander Kozyrev <[email protected]>…

IPv6 DSCP field ID is missing from the original list of Field IDs for MODIFY_FIELD action. Add it to support IPv6 header fully.

Fixes 73b68f4c54a ("ethdev: introduce generic modify flow action")
---
 lib/librte_ethdev/rte_flow.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

lib/librte_ethdev/rte_flow.h enum rte_flow_field_id { · line 2848

Quoted 12 lines
lib/librte_ethdev/rte_flow.h +1 -0
index 46e8ee70ab..68c68cdd6c 100644
@@ -2842,6 +2842,7 @@ enum rte_flow_field_id {
    RTE_FLOW_FIELD_IPV4_TTL,
    RTE_FLOW_FIELD_IPV4_SRC,
    RTE_FLOW_FIELD_IPV4_DST,
+   RTE_FLOW_FIELD_IPV6_DSCP,
    RTE_FLOW_FIELD_IPV6_HOPLIMIT,
    RTE_FLOW_FIELD_IPV6_SRC,
    RTE_FLOW_FIELD_IPV6_DST,

Adding field in middle of enum will break ABI.

Quoted 1 line

I added the rte_flow_field_id enum a week ago into 20.11-rc1.

21.02-rc1

Quoted 1 line

I believe it is not too late to make it right without breaking ABI, don't you think so?

#4 lore raw
In reply to Alexander Kozyrev
Quoted 30 lines · On Tue, 26 Jan 2021 05:21:23 +0000 Alexander Kozyrev <[email protected]>…
Quoted 15 lines

From: Stephen Hemminger <[email protected]> on Monday, January 25, 2021 22:44

Quoted 10 lines · On Tue, 26 Jan 2021 03:38:24 +0000 Alexander Kozyrev <[email protected]>…

IPv6 DSCP field ID is missing from the original list of Field IDs for MODIFY_FIELD action. Add it to support IPv6 header fully.

Fixes 73b68f4c54a ("ethdev: introduce generic modify flow action")
---
 lib/librte_ethdev/rte_flow.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

lib/librte_ethdev/rte_flow.h enum rte_flow_field_id { · line 2848

Quoted 12 lines
lib/librte_ethdev/rte_flow.h +1 -0
index 46e8ee70ab..68c68cdd6c 100644
@@ -2842,6 +2842,7 @@ enum rte_flow_field_id {
 	RTE_FLOW_FIELD_IPV4_TTL,
 	RTE_FLOW_FIELD_IPV4_SRC,
 	RTE_FLOW_FIELD_IPV4_DST,
+	RTE_FLOW_FIELD_IPV6_DSCP,
 	RTE_FLOW_FIELD_IPV6_HOPLIMIT,
 	RTE_FLOW_FIELD_IPV6_SRC,
 	RTE_FLOW_FIELD_IPV6_DST,  

Adding field in middle of enum will break ABI.

Quoted 2 lines

I added the rte_flow_field_id enum a week ago into 20.11-rc1.
I believe it is not too late to make it right without breaking ABI, don't you think so?

Ok if not in release yet

Acked-by on v1 1/1
#5 lore raw
In reply to Alexander Kozyrev
Quoted 7 lines · Alexander Kozyrev

IPv6 DSCP field ID is missing from the original list of Field IDs for MODIFY_FIELD action. Add it to support IPv6 header fully.

Fixes 73b68f4c54a ("ethdev: introduce generic modify flow action")
Quoted 19 lines
---
 lib/librte_ethdev/rte_flow.h | 1 +
 1 file changed, 1 insertion(+)
lib/librte_ethdev/rte_flow.h +1 -1
index 46e8ee70ab..68c68cdd6c 100644
@@ -2842,6 +2842,7 @@ enum rte_flow_field_id {
        RTE_FLOW_FIELD_IPV4_TTL,
        RTE_FLOW_FIELD_IPV4_SRC,
        RTE_FLOW_FIELD_IPV4_DST,
+       RTE_FLOW_FIELD_IPV6_DSCP,
        RTE_FLOW_FIELD_IPV6_HOPLIMIT,
        RTE_FLOW_FIELD_IPV6_SRC,
        RTE_FLOW_FIELD_IPV6_DST,
--

2.24.1

#6 lore raw

PATCH v2 1/1 ethdev: add IPv6 DSCP option for modify field action

In reply to Alexander Kozyrev

IPv6 DSCP field ID is missing from the original list of Field IDs for MODIFY_FIELD action. Add it to support IPv6 header fully. Add ipv6_dscp option for the corresponding header field in testpmd.

Fixes 73b68f4c54a ("ethdev: introduce generic modify flow action")

---
v1: https://patchwork.dpdk.org/patch/87271/
v2: Squashed with testpmd patch:
https://patchwork.dpdk.org/patch/87273/

---
 app/test-pmd/cmdline_flow.c  | 2 +-
 lib/librte_ethdev/rte_flow.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +1 -1
index 0618611ab1..fb1cba932b 100644
@@ -592,7 +592,7 @@ static const char *const modify_field_ids[] = {
 	"start", "mac_dst", "mac_src",
 	"vlan_type", "vlan_id", "mac_type",
 	"ipv4_dscp", "ipv4_ttl", "ipv4_src", "ipv4_dst",
-	"ipv6_hoplimit", "ipv6_src", "ipv6_dst",
+	"ipv6_dscp", "ipv6_hoplimit", "ipv6_src", "ipv6_dst",
 	"tcp_port_src", "tcp_port_dst",
 	"tcp_seq_num", "tcp_ack_num", "tcp_flags",
 	"udp_port_src", "udp_port_dst",
lib/librte_ethdev/rte_flow.h +1 -0
index 46e8ee70ab..68c68cdd6c 100644
@@ -2842,6 +2842,7 @@ enum rte_flow_field_id {
 	RTE_FLOW_FIELD_IPV4_TTL,
 	RTE_FLOW_FIELD_IPV4_SRC,
 	RTE_FLOW_FIELD_IPV4_DST,
+	RTE_FLOW_FIELD_IPV6_DSCP,
 	RTE_FLOW_FIELD_IPV6_HOPLIMIT,
 	RTE_FLOW_FIELD_IPV6_SRC,
 	RTE_FLOW_FIELD_IPV6_DST,
Signature · 1 line
2.24.1
Acked-by on v2 1/1 Applied
#7 lore raw
Quoted 9 lines · Alexander Kozyrev

IPv6 DSCP field ID is missing from the original list of Field IDs for MODIFY_FIELD action. Add it to support IPv6 header fully. Add ipv6_dscp option for the corresponding header field in testpmd.

Fixes 73b68f4c54a ("ethdev: introduce generic modify flow action")

Applied to dpdk-next-net/main, thanks.