summaryrefslogtreecommitdiff
path: root/tests/ofp-actions.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2014-09-16 22:13:44 -0700
committerBen Pfaff <blp@nicira.com>2014-10-07 15:34:38 -0700
commit178742f941354475c3f242c676b3e772ad5d7d9e (patch)
tree8d8b863577293c6e45ce13b9880129268bc99376 /tests/ofp-actions.at
parentba5cc068c8e295453e8ccb9cf223045d5a9e0976 (diff)
downloadopenvswitch-178742f941354475c3f242c676b3e772ad5d7d9e.tar.gz
nx-match: Move all knowledge of OXM/NXM here.
This improves the general abstraction of OXM/NXM by eliminating direct knowledge of it from the meta-flow code and other places. Some function renaming might be called for; for example, mf_oxm_header() may not be the best name now that the function is implemented within nx-match. However, these renamings would make this commit larger and harder to review, so I'm postponing them. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Diffstat (limited to 'tests/ofp-actions.at')
-rw-r--r--tests/ofp-actions.at33
1 files changed, 29 insertions, 4 deletions
diff --git a/tests/ofp-actions.at b/tests/ofp-actions.at
index 9fbae5e3d..5b5a500c7 100644
--- a/tests/ofp-actions.at
+++ b/tests/ofp-actions.at
@@ -502,6 +502,32 @@ AT_CHECK(
[0], [expout], [experr])
AT_CLEANUP
+dnl Our primary goal here is to verify OpenFlow 1.2-specific changes,
+dnl so the list of tests is short.
+AT_SETUP([OpenFlow 1.2 action translation])
+AT_KEYWORDS([ofp-actions OF1.2])
+AT_DATA([test-data], [dnl
+# actions=LOCAL
+0000 0010 fffffffe 04d2 000000000000
+
+# bad OpenFlow12 actions: OFPBAC_BAD_SET_MASK
+& ofp_actions|WARN|bad action at offset 0 (OFPBAC_BAD_SET_MASK):
+& 00000000 00 19 00 18 80 00 09 0c-00 00 00 00 12 34 00 00
+& 00000010 00 00 ff ff 00 00 00 00-
+0019 0018 8000090c 000000001234 00000000ffff 00000000
+
+])
+sed '/^[[#&]]/d' < test-data > input.txt
+sed -n 's/^# //p; /^$/p' < test-data > expout
+sed -n 's/^& //p' < test-data > experr
+AT_CAPTURE_FILE([input.txt])
+AT_CAPTURE_FILE([expout])
+AT_CAPTURE_FILE([experr])
+AT_CHECK(
+ [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-actions OpenFlow12 < input.txt],
+ [0], [expout], [experr])
+AT_CLEANUP
+
dnl Our primary goal here is to verify that OpenFlow 1.5-specific changes,
dnl so the list of tests is short.
AT_SETUP([OpenFlow 1.5 action translation])
@@ -513,12 +539,11 @@ AT_DATA([test-data], [dnl
# actions=move:NXM_OF_IN_PORT[]->NXM_OF_VLAN_TCI[]
001c 0018 0010 0000 0000 0008 00000002 00000802 00000000
-dnl This action has a lot more wrong with it than the hasmask bit, but
-dnl the current OVS implementation checks for that first.
# bad OpenFlow15 actions: OFPBAC_BAD_SET_MASK
& ofp_actions|WARN|bad action at offset 0 (OFPBAC_BAD_SET_MASK):
-& 00000000 00 19 00 08 00 00 01 00-
-0019 0008 0000 0100
+& 00000000 00 19 00 18 80 00 09 0c-00 00 00 00 12 34 00 00
+& 00000010 00 00 ff ff 00 00 00 00-
+0019 0018 8000090c 000000001234 00000000ffff 00000000
])
sed '/^[[#&]]/d' < test-data > input.txt