On Tue, May 08, 2012 at 12:10:41AM -0700, Justin Pettit wrote: > On May 7, 2012, at 4:59 PM, Ben Pfaff wrote: > > > On Mon, May 07, 2012 at 11:56:50AM -0700, Justin Pettit wrote: > >> Add function to determine whether the max number of ports are contains > >> in a Features Reply. If so, it removes the port list, since it may be > >> incomplete. This function will be used in a later commit. > >> > >> Signed-off-by: Justin Pettit <[email protected]> > > > > Now we have several bits of code that translate an ofp version into a > > struct size. I count three, in ofputil_decode_switch_features(), > > max_ports_in_features(), and ofputil_count_phy_ports(). It'd be > > better to just have a single helper to do that. > > Yeah, the thought had crossed my mind. :-) I've attached a commit to > do that, which would follow this one in the series. (Congratulations > on finally getting referenced in the commit log!) > > > In ofputil_switch_features_ports_trunc() you can just call > > update_openflow_length() instead of inlining it as: > >> + osf->header.length = htons(sizeof(*osf)); >
Thanks, the changes here look good. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
