Page MenuHomeFreeBSD

Improve the UDP tunneling callback
ClosedPublic

Authored by bryanv on Jul 9 2014, 6:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 17 2024, 6:14 AM
Unknown Object (File)
Dec 1 2023, 3:14 AM
Unknown Object (File)
Oct 4 2023, 3:32 AM
Unknown Object (File)
Aug 23 2023, 3:43 AM
Unknown Object (File)
Aug 13 2023, 7:27 PM
Unknown Object (File)
Aug 8 2023, 12:40 AM
Unknown Object (File)
Aug 8 2023, 12:39 AM
Unknown Object (File)
Aug 4 2023, 10:18 PM
Subscribers
None

Details

Reviewers
gnn
Summary

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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bryanv retitled this revision from to Improve the UDP tunneling callback.
bryanv updated this object.
bryanv edited the test plan for this revision. (Show Details)
bryanv added a reviewer: gnn.

Have you run this code with WITNESS to make sure that holding the lock when running through the tunnel does not lead to LOR?

In D383#3, @gnn wrote:

Have you run this code with WITNESS to make sure that holding the lock when running through the tunnel does not lead to LOR?

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.

For now leave it as is, but leave a comment in. Better to be safe than fast on the first go round.

gnn edited edge metadata.
This revision is now accepted and ready to land.Jul 14 2014, 4:30 PM