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)
Oct 23 2024, 7:29 AM
Unknown Object (File)
Oct 23 2024, 7:29 AM
Unknown Object (File)
Oct 23 2024, 7:17 AM
Unknown Object (File)
Sep 30 2024, 8:10 AM
Unknown Object (File)
Sep 19 2024, 11:51 AM
Unknown Object (File)
Sep 17 2024, 1:21 PM
Unknown Object (File)
Sep 8 2024, 1:49 PM
Unknown Object (File)
Sep 8 2024, 7:11 AM
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