On Tue, Mar 3, 2015 at 12:30 PM, Pravin Shelar <pshe...@nicira.com> wrote:
> On Tue, Mar 3, 2015 at 10:36 AM, Ben Pfaff <b...@nicira.com> wrote:
>> On Tue, Mar 03, 2015 at 10:33:43AM -0800, Jarno Rajahalme wrote:
>>>
>>> > On Mar 3, 2015, at 8:29 AM, Ben Pfaff <b...@nicira.com> wrote:
>>> >
>>> > On Mon, Mar 02, 2015 at 10:51:27AM -0800, Pravin B Shelar wrote:
>>> >> 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.
>>>
>>> A lot of our packet handling code already makes that assumption. Maybe we 
>>> should document this?
>>
>> It's sort of documented in ofpbuf.h, but it's too wishy-washy for me to
>> comfortably assume it's always true:
>>
>>  *    Additionally, we assume in many places that the 'frame' and 'data' are
>>  *    the same for packets.
>
> OK, I will drop this patch.

I guess that's OK.  I was hoping that you'd look through for exceptions
and strengthen the comment, but it's also OK with me to just drop it.

-- 
"I don't normally do acked-by's.  I think it's my way of avoiding
getting blamed when it all blows up."               Andrew Morton
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to