Signed-off-by: Simon Horman <[email protected]>
---
v8
* Manual rebase
* Add ofp-print test
v7
* Manual rebase
v6
* No change
v5
* Manual rebase
v4
* No change
v3
* No change
v2
* No change
Conflicts:
lib/ofp-util.c
flow mod test
---
lib/ofp-util.c | 3 ++-
tests/ofp-print.at | 42 ++++++++++++++++++++++++++++++++++++++++--
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index 24faa92..7218d9a 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -1170,7 +1170,8 @@ ofputil_decode_flow_mod(struct ofputil_flow_mod *fm,
ofm = ofpbuf_pull(&b, sizeof *ofm);
- error = ofputil_pull_ofp11_match(&b, ntohs(ofm->priority), &fm->cr);
+ error = ofputil_pull_ofp11_match__(&b, ntohs(ofm->priority),
+ &fm->cr, NULL, oh->version);
if (error) {
return error;
}
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index 79516e0..05e6cac 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -407,7 +407,7 @@ OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3
buffer=0x00000114
AT_CLEANUP
# The flow is formatted with cls_rule_format() for the low-verbosity case.
-AT_SETUP([OFPT_FLOW_MOD - low verbosity])
+AT_SETUP([OFPT_FLOW_MOD - OF1.0 - low verbosity])
AT_KEYWORDS([ofp-print])
AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
@@ -424,9 +424,28 @@ ofp_util|INFO|post:
priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00
])
AT_CLEANUP
+# The flow is formatted with cls_rule_format() for the low-verbosity case.
+AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
+AT_KEYWORDS([ofp-print])
+AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
+03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
+00 00 00 00 00 00 00 00 ff 00 00 00 00 00 ff ff \
+ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
+00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
+50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
+80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
+00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
+00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
+00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
+" 2], [0], [dnl
+OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:255
priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2
actions=output:3
+], [dnl
+])
+AT_CLEANUP
+
# The flow is formatted with ofp10_match_to_string() for the
# high-verbosity case.
-AT_SETUP([OFPT_FLOW_MOD - high verbosity])
+AT_SETUP([OFPT_FLOW_MOD - OF1.0 - high verbosity])
AT_KEYWORDS([ofp-print])
AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
@@ -443,6 +462,25 @@ ofp_util|INFO|post:
priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00
])
AT_CLEANUP
+# The flow is formatted with cls_rule_format() for the low-verbosity case.
+AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
+AT_KEYWORDS([ofp-print])
+AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
+03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
+00 00 00 00 00 00 00 00 ff 00 00 00 00 00 ff ff \
+ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
+00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
+50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
+80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
+00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
+00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
+00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
+" 2], [0], [dnl
+OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:255
priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2
actions=output:3
+], [dnl
+])
+AT_CLEANUP
+
AT_SETUP([OFPT_PORT_MOD - OF1.0])
AT_KEYWORDS([ofp-print])
AT_CHECK([ovs-ofctl ofp-print "\
--
1.7.10.2.484.gcd07cc5
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev