On Nov 1, 2013, at 4:04 PM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Oct 24, 2013 at 01:19:30PM -0700, Jarno Rajahalme wrote: >> Output set field actions as standard OF1.0/1.1 set actions or to >> reg_load instructions, when a compatible set action(s) do not exist. >> >> Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com> > > Thanks. > > I broke set_field_to_openflow() into a couple of helpers, so that > set_field_to_openflow() is now just: > > static void > set_field_to_openflow(const struct ofpact_set_field *sf, > struct ofpbuf *openflow) > { > struct ofp_header *oh = (struct ofp_header *)openflow->l2; > > if (oh->version >= OFP12_VERSION) { > set_field_to_openflow12(sf, openflow); > } else if (oh->version == OFP11_VERSION) { > set_field_to_openflow11(sf, openflow); > } else if (oh->version == OFP10_VERSION) { > set_field_to_openflow10(sf, openflow); > } else { > NOT_REACHED(); > } > } > > I felt that this made the code more readable. > > Applied, with that change.
Thanks Ben! I’m all for clarity here, Jarno _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev