On 25 July 2012 18:26, Ben Pfaff <b...@nicira.com> wrote: > On Wed, Jul 25, 2012 at 06:21:22PM +1200, Joe Stringer wrote: >> Regarding the translation of OF1.1+ instructions to vendor extensions >> on OF1.0, do we want to move towards using the above syntax for >> packet-out as well? (in a new patch, presumably) > > I'm not sure that there's any need to worry about instructions for > packet-out, since packet-out takes only actions, not instructions. Do > you see another problem, or maybe you mean something else?
Ah, in particular with the write_metadata instruction (which seems more like an action, the more I look at it..) I was using packet-out to test that the write_metadata vendor extension work was working properly. To guarantee the aforementioned conditions, I need to either handle the metadata action specifically in str_to_ofpacts, or have a check at the end of the function to iterate across the ofpacts[] and verify it's in the correct position, etc. When it comes to parsing a flow_mod with this implementation, we can now have a (vendor action) write_metadata in the [apply,write]_actions instructions, as well as the write_metadata instruction - So a check needs to be added to str_to_inst_ofpacts() to iterate across the ofpacts[] again and make sure we have just one ofpact_metadata. This is quite doable, I just wasn't sure which approach is preferred. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev