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, Sep 17, 6:39 AM
Unknown Object (File)
Fri, Sep 11, 10:54 AM
Unknown Object (File)
Tue, Sep 8, 8:02 AM
Unknown Object (File)
Sat, Sep 5, 7:42 PM
Unknown Object (File)
Fri, Sep 4, 2:31 AM
Unknown Object (File)
Thu, Sep 3, 9:08 AM
Unknown Object (File)
Tue, Sep 1, 9:03 PM
Unknown Object (File)
Mon, Aug 31, 1:58 PM
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 Not Applicable
Unit
Tests Not Applicable