Page MenuHomeFreeBSD

divert: Use a better source identifier for netisr_queue_src() calls
ClosedPublic

Authored by markj on Feb 26 2026, 6:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 16, 1:39 PM
Unknown Object (File)
Sun, Apr 12, 4:40 PM
Unknown Object (File)
Sat, Apr 11, 4:11 PM
Unknown Object (File)
Sat, Apr 11, 1:30 PM
Unknown Object (File)
Wed, Apr 8, 7:02 AM
Unknown Object (File)
Wed, Apr 1, 1:07 PM
Unknown Object (File)
Sat, Mar 28, 6:28 AM
Unknown Object (File)
Sat, Mar 21, 5:10 AM
Subscribers

Details

Summary

These opaque IDs are used by netisr to distribute work among threads.
The mapping function is simply SourceID % numthreads, so using socket
addresses as source IDs isn't going to distribute packets well due to
alignment.

Use the divert socket's generation number instead, as that suits this
purpose much better.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71034
Build 67917: arc lint + arc unit