On Mon, Mar 02, 2015 at 10:51:27AM -0800, Pravin B Shelar wrote: > Signed-off-by: Pravin B Shelar <[email protected]> > --- > lib/ofpbuf.h | 5 +---- > 1 files changed, 1 insertions(+), 4 deletions(-) > > diff --git a/lib/ofpbuf.h b/lib/ofpbuf.h > index 4e7038d..82588e3 100644 > --- a/lib/ofpbuf.h > +++ b/lib/ofpbuf.h > @@ -336,10 +336,7 @@ static inline void ofpbuf_set_l4(struct ofpbuf *b, void > *l4) > > static inline size_t ofpbuf_l4_size(const struct ofpbuf *b) > { > - return b->l4_ofs != UINT16_MAX > - ? (const char *)ofpbuf_tail(b) - (const char *)ofpbuf_l4(b) > - - ofpbuf_l2_pad_size(b) > - : 0; > + return b->l4_ofs != UINT16_MAX ? ofpbuf_size(b) - b->l4_ofs : 0; > }
I think that this change makes the new assumption that b->frame == b->data. I have a hard time deciding whether that's important. Assuming you've thought about it and it's OK, Acked-by: Ben Pfaff <[email protected]> _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
