CVS commit: src/sys/net
"Roy Marples" <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module Name: src Committed By: roy Date: Tue May 5 10:23:34 UTC 2026 Modified Files: src/sys/net: if.c if.h Log Message: if: replace link state change queue with state transition if_link_queue is now a normal bitmask rather than holding a queue. It holds three bits to mirror the link state - UNKNOWN, DOWN and UP. There are also some bits to indicate that the link state has been scheduled for change and if it has been locked for changes (ie the interface being destroyed). The logic is simple - transitioning to DOWN will remove UNKNOWN and UP, transitioning to UNKNOWN will remove UP (no driver should do this). This means that even in the event of transitions happening faster than the kernel can spit them out, the correct state of the link will be preserved which is more important than the exact chain of events. This also fixes an issue where the workqueue for the link state change was incorrectly scheduled. if_link_scheduled is now unused and will be removed in a future patch. Fixes PR kern/60056. To generate a diff of this commit: cvs rdiff -u -r1.536 -r1.537 src/sys/net/if.c cvs rdiff -u -r1.309 -r1.310 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.