Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-11] src/sys/net



Module Name:    src
Committed By:   martin
Date:           Thu May  7 18:17:32 UTC 2026

Modified Files:
        src/sys/net [netbsd-11]: if.c if.h

Log Message:
Pull up following revision(s) (requested by roy in ticket #278):

        sys/net/if.c: revision 1.537
        sys/net/if.h: revision 1.310

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.535 -r1.535.2.1 src/sys/net/if.c
cvs rdiff -u -r1.308 -r1.308.2.1 src/sys/net/if.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index