ofpaction: support OF11 pop_vlan
[openvswitch] / tests / ofp-actions.at
index ba8d309d06475659dd8fedd02eee62cd008ca84b..8d95ae904de97ea3104237fbbcfd6c9f5e596e2c 100644 (file)
@@ -73,6 +73,7 @@ ffff 0018 00002320 0009 000000000000 00000000885f3298
 ffff 0020 00002320 000a 0000 0032 0000 0000 0000 0000 0000 0000 001f 00010004
 
 # actions=autopath(2,NXM_NX_REG0[2..30])
+& autopath|WARN|The autopath action is deprecated and may be removed in February 2013.  Please email dev@openvswitch.org with concerns.
 ffff 0018 00002320 000b 009c 00010004 00000002 00000000
 
 # actions=bundle(eth_src,0,hrw,ofport,slaves:4,8)
@@ -108,6 +109,9 @@ ffff 0010 00002320 0013 000a 0014 0000
 # actions=controller(reason=invalid_ttl,max_len=1234,id=5678)
 ffff 0010 00002320 0014 04d2 162e 02 00
 
+# actions=dec_ttl(32768,12345,90,765,1024)
+ffff 0020 00002320 0015 000500000000 80003039005A02fd 0400000000000000
+
 ])
 sed '/^[[#&]]/d' < test-data > input.txt
 sed -n 's/^# //p; /^$/p' < test-data > expout
@@ -156,6 +160,9 @@ AT_DATA([test-data], [dnl
 # actions=mod_tp_dst:443
 000a 0008 01bb 0000
 
+# actions=strip_vlan
+0012 0008 00000000
+
 # actions=resubmit:5
 ffff 0010 00002320 0001 0005 00000000
 
@@ -187,6 +194,7 @@ ffff 0018 00002320 0009 000000000000 00000000885f3298
 ffff 0020 00002320 000a 0000 0032 0000 0000 0000 0000 0000 0000 001f 00010004
 
 # actions=autopath(2,NXM_NX_REG0[2..30])
+& autopath|WARN|The autopath action is deprecated and may be removed in February 2013.  Please email dev@openvswitch.org with concerns.
 ffff 0018 00002320 000b 009c 00010004 00000002 00000000
 
 # actions=bundle(eth_src,0,hrw,ofport,slaves:4,8)
@@ -213,15 +221,23 @@ ffff 0048 00002320 0010 000a 0014 0050 123456789abcdef0 0000 02 00 0002 0004 dnl
 # actions=exit
 ffff 0010 00002320 0011 000000000000
 
+dnl NXAST_DEC_TTL
 # actions=dec_ttl
 ffff 0010 00002320 0012 000000000000
 
+dnl OpenFlow 1.1 OFPAT_DEC_TTL
+# actions=dec_ttl
+0018 0008 00000000
+
 # actions=fin_timeout(idle_timeout=10,hard_timeout=20)
 ffff 0010 00002320 0013 000a 0014 0000
 
 # actions=controller(reason=invalid_ttl,max_len=1234,id=5678)
 ffff 0010 00002320 0014 04d2 162e 02 00
 
+# actions=dec_ttl(32768,12345,90,765,1024)
+ffff 0020 00002320 0015 000500000000 80003039005A02fd 0400000000000000
+
 ])
 sed '/^[[#&]]/d' < test-data > input.txt
 sed -n 's/^# //p; /^$/p' < test-data > expout
@@ -235,12 +251,24 @@ AT_CHECK(
 AT_CLEANUP
 
 AT_SETUP([OpenFlow 1.1 instruction translation])
-AT_KEYWORDS([OF1.1])
+AT_KEYWORDS([OF1.1 instruction])
 AT_DATA([test-data], [dnl
 # actions=LOCAL
 0004 0018 00000000 dnl
 0000 0010 fffffffe 04d2 000000000000
 
+dnl Apply-Actions non-zero padding
+# actions=drop
+#  0: 00 -> (none)
+#  1: 04 -> (none)
+#  2: 00 -> (none)
+#  3: 08 -> (none)
+#  4: 00 -> (none)
+#  5: 00 -> (none)
+#  6: 00 -> (none)
+#  7: 01 -> (none)
+0004 0008 00000001
+
 dnl Check that an empty Apply-Actions instruction gets dropped.
 # actions=drop
 #  0: 00 -> (none)
@@ -253,7 +281,8 @@ dnl Check that an empty Apply-Actions instruction gets dropped.
 #  7: 00 -> (none)
 0004 0008 00000000
 
-# bad OF1.1 instructions: NXBIC_DUP_TYPE
+dnl Duplicate instruction type:
+# bad OF1.1 instructions: OFPIT_BAD_INSTRUCTION
 0004 0008 00000000 0004 0008 00000000
 
 dnl Instructions not multiple of 8 in length.
@@ -265,8 +294,13 @@ dnl Goto-Table instruction too long.
 # bad OF1.1 instructions: OFPBIC_BAD_LEN
 0001 0010 01 000000 0000000000000000
 
-dnl Goto-Table not supported yet.
-# bad OF1.1 instructions: OFPBIC_UNSUP_INST
+dnl Goto-Table 1 instruction non-zero padding
+# actions=goto_table:1
+#  7: 01 -> 00
+0001 0008 01 000001
+
+dnl Goto-Table 1
+# actions=goto_table:1
 0001 0008 01 000000
 
 dnl Write-Metadata not supported yet.
@@ -285,10 +319,24 @@ dnl Write-Actions not supported yet.
 # bad OF1.1 instructions: OFPBIC_UNSUP_INST
 0003 0008 01 000000
 
-dnl Clear-Actions not supported yet.
-# bad OF1.1 instructions: OFPBIC_UNSUP_INST
+dnl Clear-Actions too-long
+# bad OF1.1 instructions: OFPBIC_BAD_LEN
+0005 0010 00000000 0000000000000000
+
+dnl Clear-Actions non-zero padding
+# actions=clear_actions
+#  7: 01 -> 00
+0005 0008 00000001
+
+dnl Clear-Actions non-zero padding
+# actions=clear_actions
+#  4: 01 -> 00
 0005 0008 01 000000
 
+dnl Clear-Actions
+# actions=clear_actions
+0005 0008 00000000
+
 dnl Experimenter actions not supported yet.
 # bad OF1.1 instructions: OFPBIC_BAD_EXPERIMENTER
 ffff 0008 01 000000