[ovs-dev] [PATCH] ipv6: Add support for setting ipv6 flow label.
Pritesh Kothari
pritesh.kothari at cisco.com
Tue Jan 13 01:46:49 UTC 2015
IPv6 Flow Label is currently read only. This patch adds support
to allow actions like actions=set_field:0x12345->ipv6_label.
Signed-off-by: Pritesh Kothari <pritesh.kothari at cisco.com>
---
lib/meta-flow.c | 2 +-
lib/meta-flow.h | 2 +-
tests/ofproto.at | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/meta-flow.c b/lib/meta-flow.c
index 67115b2..9ce4cfe 100644
--- a/lib/meta-flow.c
+++ b/lib/meta-flow.c
@@ -1017,7 +1017,7 @@ mf_set_flow_value(const struct mf_field *mf,
break;
case MFF_IPV6_LABEL:
- flow->ipv6_label = value->be32 & ~htonl(IPV6_LABEL_MASK);
+ flow->ipv6_label = value->be32 & htonl(IPV6_LABEL_MASK);
break;
case MFF_IP_PROTO:
diff --git a/lib/meta-flow.h b/lib/meta-flow.h
index 1ee5c75..d07072e 100644
--- a/lib/meta-flow.h
+++ b/lib/meta-flow.h
@@ -904,7 +904,7 @@ enum OVS_PACKED_ENUM mf_field_id {
* Maskable: bitwise.
* Formatting: hexadecimal.
* Prerequisites: IPv6.
- * Access: read-only.
+ * Access: read/write.
* NXM: NXM_NX_IPV6_LABEL(27) since v1.4.
* OXM: OXM_OF_IPV6_FLABEL(28) since OF1.2 and v1.7.
*/
diff --git a/tests/ofproto.at b/tests/ofproto.at
index 386cb67..b33e0dc 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -1380,7 +1380,7 @@ OVS_VSWITCHD_START
instructions: apply_actions,clear_actions,write_actions,write_metadata$goto
Write-Actions and Apply-Actions features:
actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
- supported on Set-Field: metadata in_port_oxm eth_src eth_dst vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst ip_dscp nw_ecn arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst
+ supported on Set-Field: metadata in_port_oxm eth_src eth_dst vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst ipv6_label ip_dscp nw_ecn arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst
matching:
metadata: exact match or wildcard
in_port_oxm: exact match or wildcard
@@ -1465,7 +1465,7 @@ OVS_VSWITCHD_START
instructions: meter,apply_actions,clear_actions,write_actions,write_metadata$goto
Write-Actions and Apply-Actions features:
actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
- supported on Set-Field: tun_id tun_src tun_dst metadata in_port in_port_oxm pkt_mark reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 xreg0 xreg1 xreg2 xreg3 eth_src eth_dst vlan_tci vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst nw_tos ip_dscp nw_ecn nw_ttl arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst
+ supported on Set-Field: tun_id tun_src tun_dst metadata in_port in_port_oxm pkt_mark reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 xreg0 xreg1 xreg2 xreg3 eth_src eth_dst vlan_tci vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst ipv6_label nw_tos ip_dscp nw_ecn nw_ttl arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst
matching:
dp_hash: arbitrary mask
recirc_id: exact match or wildcard
--
1.9.1
More information about the dev
mailing list