[ovs-dev] [packet_in 10/13] ofputil: New function ofputil_decode_packet_in().

Ethan Jackson ethan at nicira.com
Tue Jan 3 18:13:33 UTC 2012


> One comment: other ofputil_decode_*() functions call
> ofputil_decode_msg_type() and check the result because they can actually
> decode more than one message format.  But this function only decodes a
> single message format, so I think that it is better for it to simply
> assume that the caller provided the correct message format.  It could
> even take a "struct ofp_packet_in *" as parameter (instead of a generic
> ofp_header).

I wrote it this way because a couple of patches in the future,
ofputil_decode_packet_in() will be able to decode a second message
type. I thought the diff was easier to read this way.  If you like, I
could change it so this style is only used in the patch that
introduces the additional message type.

Ethan



More information about the dev mailing list