[ovs-dev] [cfm 1/6] cfm: Move destination address to packets.h

Ben Pfaff blp at nicira.com
Wed Mar 23 17:00:36 UTC 2011


On Tue, Mar 22, 2011 at 06:32:53PM -0700, Ethan Jackson wrote:
> This seems to be more stylistically correct.

Is there any more rationale than this?  It's never been my goal to
have *every* protocol definition in packets.h, although I can see how
you got that idea.  We used to have better counterexamples than we do
now, in the lib/dhcp.h and lib/stp.h libraries.

I can think of a few reasons to put declarations in packets.h instead
of in a protocol-specific header:

	- The declarations are widely used and so there's little
          benefit in making the users include additional headers.

	- There's a clean logical separation in our tree between a
          protocol and implementations of it, but it doesn't seem
          worthwhile (yet) to make a new header file for just this
          protocol.

	- There just isn't another good place in the tree to put the
          declarations.

But I don't know which of these applies to cfm.  It seems that, so far
at least, only cfm.c really needs these definitions, and so cfm.c
seems like an OK place, to me.



More information about the dev mailing list