Page MenuHomeFreeBSD

protocols: init with standard SYSINIT(9) or VNET_SYSINIT
AbandonedPublic

Authored by glebius on Dec 17 2021, 6:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 1:09 AM
Unknown Object (File)
Mon, Nov 25, 3:09 PM
Unknown Object (File)
Mon, Nov 18, 8:06 PM
Unknown Object (File)
Oct 29 2024, 11:48 AM
Unknown Object (File)
Oct 21 2024, 10:46 AM
Unknown Object (File)
Oct 18 2024, 12:18 AM
Unknown Object (File)
Oct 3 2024, 7:01 AM
Unknown Object (File)
Oct 1 2024, 6:26 AM

Details

Summary

The historical BSD network stack loop that rolls over domains and
over protocols has no advantages over more modern SYSINIT(9).
While doing the sweep, split global and per-VNET initializers.

Getting rid of pr_init allows to achieve several things:
o Get rid of ifdef's that protect against double foo_init() when

both INET and INET6 are compiled in.

o Isolate initializers statically to the module they init.
o Makes code easier to understand and maintain.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43612
Build 40500: arc lint + arc unit

Event Timeline

Can I still set transport relevant sysctl variables in /etc/sysctl.conf?

Can I still set transport relevant sysctl variables in /etc/sysctl.conf?

I don't see how could this change affect these sysctls!

Can I still set transport relevant sysctl variables in /etc/sysctl.conf?

I don't see how could this change affect these sysctls!

I was wondering if the initialisation happens at the same time...

Really good simplification!

Worth mentioning that de-facto global protocols state will be inited in SI_ORDER_THIRD instead of SI_ORDER_SECOND and per-VNET ip[6]_init moved to SI_ORDER_FOURTH.

Nit: worth updating updating domain(9) to reflect pr_init removal,

sys/netinet/tcp_subr.c
1442

This looks like a non-virtualized variable, why do we want to assign it on per-VNET basis?
Also: maybe it's worth factoring out all hashsize calculation logic to a separate function?

Address Alexander's comments.

Worth mentioning that de-facto global protocols state will be inited in SI_ORDER_THIRD instead of SI_ORDER_SECOND and per-VNET ip[6]_init moved to SI_ORDER_FOURTH.

Can't find a good place to document that.

Manual page change LGTM and is consistent with commit summary.