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)
Mar 11 2024, 3:43 AM
Unknown Object (File)
Mar 11 2024, 3:43 AM
Unknown Object (File)
Mar 11 2024, 3:42 AM
Unknown Object (File)
Mar 10 2024, 10:12 PM
Unknown Object (File)
Feb 20 2024, 7:25 PM
Unknown Object (File)
Dec 21 2023, 6:08 AM
Unknown Object (File)
Dec 12 2023, 4:34 AM
Unknown Object (File)
Nov 18 2023, 10:58 PM

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.