- Improved OpenFlow version compatibility for actions:
* New OpenFlow extension to support the "group" action in OpenFlow 1.0.
* OpenFlow 1.0 "enqueue" action now properly translated to OpenFlow 1.1+.
- * OpenFlow 1.1 "mod_nw_ecn" action now properly translated to
- OpenFlow 1.0.
+ * OpenFlow 1.1 "mod_nw_ecn" and OpenFlow 1.1+ "mod_nw_ttl" actions now
+ properly translated to OpenFlow 1.0.
- ovs-ofctl:
* queue-get-config command now allows a queue ID to be specified.
* '--bundle' option can now be used with OpenFlow 1.3.
if (ofp_version >= OFP11_VERSION) {
put_OFPAT11_SET_NW_TTL(out, ttl->ttl);
} else {
- /* XXX */
+ struct mf_subfield dst = { .field = mf_from_id(MFF_IP_TTL),
+ .ofs = 0, .n_bits = 8 };
+ put_reg_load(out, &dst, ttl->ttl);
}
}
OVS_VSWITCHD_STOP
AT_CLEANUP
+AT_SETUP([mod_nw_ttl action for OF1.0])
+AT_KEYWORDS([ofp-actions])
+OVS_VSWITCHD_START
+dnl OpenFlow 1.1+ have a mod_nw_ttl action. For OpenFlow 1.0, we translate
+dnl it to an Open vSwitch extension.
+AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'ip,actions=mod_nw_ttl:123'])
+AT_CHECK([ovs-ofctl -O OpenFlow10 dump-flows br0 | ofctl_strip], [0], [dnl
+NXST_FLOW reply:
+ ip actions=load:0x7b->NXM_NX_IP_TTL[[]]
+])
+AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip], [0], [dnl
+OFPST_FLOW reply (OF1.1):
+ ip actions=mod_nw_ttl:123
+])
+OVS_VSWITCHD_STOP
+AT_CLEANUP
+
AT_SETUP([mod_nw_ecn action translation])
AT_KEYWORDS([ofp-actions])
OVS_VSWITCHD_START
])
OVS_VSWITCHD_STOP
AT_CLEANUP
+