Page MenuHomeFreeBSD

ifnet: merge ifindex_alloc(), ifnet_setbyindex(), if_grow() and call magic
ClosedPublic

Authored by glebius on Dec 4 2021, 9:16 PM.
Tags
None
Referenced Files
F110735952: D33262.id99450.diff
Sat, Feb 22, 12:06 PM
F110730960: D33262.diff
Sat, Feb 22, 10:44 AM
F110696494: D33262.id.diff
Sat, Feb 22, 12:36 AM
Unknown Object (File)
Fri, Feb 21, 5:58 AM
Unknown Object (File)
Fri, Feb 7, 5:31 PM
Unknown Object (File)
Sun, Jan 26, 8:28 PM
Unknown Object (File)
Sat, Jan 25, 5:48 PM
Unknown Object (File)
Jan 10 2025, 9:10 PM
Subscribers

Details

Summary

Now it is possible to just merge all this complexity into single
linear function. Note that IFNET_WLOCK() is a sleepable lock, so
we can M_WAITOK and epoch_wait_preempt().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Dec 4 2021, 10:44 PM
bz added inline comments.
sys/net/if.c
390–400

Do we still need these to be double pointers? We are not returning any of these values to a caller anymore.

sys/net/if.c
390–400

I think stylistically correct to keep them double pointers, since we allocate/free an array of pointers. And V_ifindex_table is of the same type and we assign V_ifindex_table to new, and assign old to V_ifindex_table.

kp added inline comments.
sys/net/if.c
393

I dislike spelling * 2 as << 1, but won't hold up the review over it.