Page MenuHomeFreeBSD

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

Authored by glebius on Dec 17 2021, 6:56 PM.

Details

Reviewers
melifaro
glebius
Group Reviewers
network
transport
manpages
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 OK
Unit
No Unit 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
1441

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.