])
AT_CLEANUP
-AT_SETUP([ovs-ofctl parse-oxm])
+AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.5)])
AT_KEYWORDS([oxm])
AT_DATA([oxm.txt], [dnl
<any>
OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3b) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(88) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
+# Registers 0, 1, and 2.
+NXM_NX_REG0(acebdf56)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG0(a0e0d050)
+NXM_NX_REG1(acebdf56)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
+NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
+
+# Extended registers 0, 1, and 2.
+# (For OpenFlow 1.2, OVS transforms these into its extension registers.)
+OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
+OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
+OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
+OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
+OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
+OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
+OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
+OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
+
# Invalid field number.
01020304(1111/2222)
])
nx_pull_match() returned error OFPBMC_BAD_PREREQ
nx_pull_match() returned error OFPBMC_BAD_PREREQ
+# Registers 0, 1, and 2.
+NXM_NX_REG0(acebdf56)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG0(a0e0d050)
+NXM_NX_REG1(acebdf56)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
+NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
+
+# Extended registers 0, 1, and 2.
+# (For OpenFlow 1.2, OVS transforms these into its extension registers.)
+NXM_NX_REG0(acebdf56)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG0(a0e0d050)
+NXM_NX_REG1(acebdf56)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
+NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
+
# Invalid field number.
nx_pull_match() returned error OFPBMC_BAD_FIELD
], [stderr])
AT_CHECK([grep -v 'has 1-bits in value' stderr], [1])
AT_CLEANUP
+AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.5)])
+AT_KEYWORDS([oxm])
+AT_DATA([oxm.txt], [dnl
+# Extended registers 0 and 1.
+OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
+OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
+OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
+OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
+OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
+OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
+OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
+OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
+
+# Registers 0, 1, and 2.
+# (OpenFlow 1.5 transforms these into the standard "xregs".)
+NXM_NX_REG0(acebdf56)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG0(a0e0d050)
+NXM_NX_REG1(acebdf56)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
+NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
+NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
+])
+AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow15 < oxm.txt],
+ [0], [dnl
+# Extended registers 0 and 1.
+OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
+OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
+OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
+OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
+OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
+OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
+OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
+OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
+
+# Registers 0, 1, and 2.
+# (OpenFlow 1.5 transforms these into the standard "xregs".)
+OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
+OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
+OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
+OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
+OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
+OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
+OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
+OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
+], [])
+AT_CLEANUP
+
AT_SETUP([ovs-ofctl parse-oxm loose])
AT_KEYWORDS([oxm])
AT_DATA([oxm.txt], [dnl