> On Dec 22, 2016, at 9:58 AM, Ben Pfaff <b...@ovn.org> wrote: > > Until now, ofproto-dpif.c has hidden the definitions of several structures, > such as struct ofproto_dpif and struct rule_dpif. This kind of information > hiding is often beneficial, because it forces code outside the file with > the definition to use the documented interfaces. However, in this case it > was starting to burden ofproto-dpif with an increasing number of trivial > helpers that were not improving or maintaining a useful abstraction and > that were making code harder to maintain and read. > > Information hiding also made it hard to move blocks of code outside > ofproto-dpif.c itself, since any code moved out often needed new helpers if > it used anything that wasn't previously exposed. In the present instance, > upcoming patches will move code for tracing outside ofproto-dpif, and this > would require adding several helpers that would just obscure the function > of the code otherwise needlessly. > > In balance, it seems that there is more harm than good in the information > hiding here, so this commit moves the definitions of several structures > from ofproto-dpif.c into ofproto-dpif.h. It also removes all of the > trivial helpers that had accumulated, instead changing their users to > directly access the members that they needed. It also reorganizes > ofproto-dpif.h, grouping structure definitions and function prototypes in a > sensible way. > > Signed-off-by: Ben Pfaff <b...@ovn.org> > Acked-by: Lance Richardson <lrich...@redhat.com>
Acked-by: Justin Pettit <jpet...@ovn.org> --Justin _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev