On Thu, Jun 11, 2015 at 12:41:42AM -0300, Flavio Leitner wrote: > > > > + > > > > + offset = p->l4_ofs; > > > > > > The above could be like this: > > > offset = dp_packet_l4(p) - dp_packet_data(p) > > > to avoid accessing internals of dp_packet. > > > > > > > That's how it originally was written, but I thought that using it like > > this would protect the code against l4_ofs being UINT16_MAX, and > > dp_packet_l4 returning NULL. > > > > Any thoughs on that? Should I just check for dp_packet_l4 returning NULL? > > The UINT16_MAX is reserved and means not set. > see dp_packet_reset_offsets() > > [...]
I know, but may I just assume that it must have been set since in order to get to this point, a flow has already been extracted from the packet? Cascardo. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev