CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2022/07/29 02:23:40
Modified files:
sys/net : if.c
Log message:
Allocate if_index before queue init
Allocate the index of a new network interface early so that the index
is available when the interface's queues are set up. This avoids
unintended concentration on net_tq(0).
Replace the kernel lock with an rwlock to serialize index map updates.
The kernel lock is not reliable here because the memory allocation
can sleep.
Also, correct the "too many interfaces" condition because the valid
index range is from 1 to USHRT_MAX.
OK bluhm@