On 20 July 2012 15:53, Ben Pfaff <b...@nicira.com> wrote: ... > For the string representations, as I told Joe Stringer, I'm leaning > toward requiring them to be in the correct order for instructions listed > above. Otherwise it seems risky that one could confuse the user. > Similarly for the OF1.0 extension representation of OF1.1 instructions.
To this end, I've just been considering the way that instructions are parsed. My understanding is that internally, we work towards having no distinction between actions and instructions. The internal format should be correct (instructions follow actions), if we are parsing inputs correctly. As I understand, this means there is no motivation to have a delimiter as in patch #2. So when we parse, we enforce the ordering -- I would expect in str_to_ofpacts(), the logic would go more or less as follows:- while (ofputil_parse_key_value(...)) { /* if current key is an instruction, break; */ /* parse as an action/same logic as currently. */ } foreach (instruction_type t) { /* if current key is not an instruction, error() */ if (current_key == t) { /* parse */ } else if (key < type) { /* i.e., if the user specifies an instruction in the wrong order. */ /* bad ordering or duplicate instruction: error() */ } ofputil_parse_key_value(...) } if (left) error(); The above logic would force the user to put instructions/actions in the correct ordering, rather than the solution of patch #6 which allows any ordering, but may be executed differently than the user expects. Is this more in line with the direction you're expecting, Ben? Thoughts? Comments? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev