On Wed, Oct 19, 2011 at 1:57 PM, Pravin B Shelar <[email protected]> wrote: > From 3.1 kernel, struct dst_entry no longer has direct ref to hh_cache. > Following patch handles this case. > > Signed-off-by: Pravin Shelar <[email protected]>
I don't think there is an actual problem here but the fact that we repeatedly fetch the neighbor (which is protected by RCU) and assume that it is the same scares me. This is especially true because we use the hard header length for allocations and copies, so theoretically if the neighbor were to change out from under us bad things could happen. For complete safety, I would change things to be more similar to the upstream code: * Get a pointer to the neighbor/hh_cache once at the beginning of the cache build function. * Allocate space for the cache using LL_RESERVED_SPACE(dev). * Get the hh_len only inside of the seqlock. * Store hh_len inside the cache so we can use later for packet processing. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
