For vxlan, the UDP tunneling callback needs to provide an opaque context and the source address.
Reduce some duplicated code in IPv6 UDP by moving it into udp6_append(). This makes the IPv6 code look more like the existing IPv4 code.
Differential D383
Improve the UDP tunneling callback bryanv on Jul 9 2014, 6:48 AM. Authored by Tags None Referenced Files
Subscribers None
Details
For vxlan, the UDP tunneling callback needs to provide an opaque context and the source address. Reduce some duplicated code in IPv6 UDP by moving it into udp6_append(). This makes the IPv6 code look more like the existing IPv4 code.
Diff Detail
Event TimelineComment Actions Have you run this code with WITNESS to make sure that holding the lock when running through the tunnel does not lead to LOR? Comment Actions Yes. It is a bit annoying that we hold both the INP_INFO_RUNLOCK() and INP_RUNLOCK() when calling the callback. The code could probably be restructured to drop the INP_RUNLOCK() lock before (vxlan doesn't need the lock, and I don't think SCTP does either). I use netisr_queue_src() so we don't recurse into the stack to process the inner Ethernet frame. Comment Actions For now leave it as is, but leave a comment in. Better to be safe than fast on the first go round. |