created | 2022-07-31T13:57:22Z |
---|---|
begin | 2022-07-29T00:00:00Z |
end | 2022-07-29T08:23:40Z |
path | src/sys |
commits | 1 |
date | 2022-07-29T08:23:40Z | |||
---|---|---|---|---|
author | visa | |||
files | src/sys/net/if.c | log | diff | annotate |
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@ |