HomeFreeBSD

sctp: Various fixes for loader tunables

Description

sctp: Various fixes for loader tunables

The following sysctl variables are actually loader tunables. Add sysctl
flag CTLFLAG_TUN to them so that sysctl -T will report them correctly.

  1. net.inet.sctp.tcbhashsize
  2. net.inet.sctp.pcbhashsize
  3. net.inet.sctp.chunkscale

The loader tunable 'net.inet.sctp.tcbhashsize' and 'net.inet.sctp.chunkscale'
are only used during vnet initializing, thus it make no senses to make them
writable tunable.

Validate the values of loader tunables on vnet initialize, reset them to
theirs defaults if invalid to prevent potential kernel panics.

Reviewed by: tuexen, transport, network
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42007

(cherry picked from commit dac91eb7660324677d8a2f71bd6f192422355ba1)
(cherry picked from commit fd9de12a71109d1e3bb4b20e7d040fc9a1784dc2)
(cherry picked from commit 69e05e06c60d1f068fafcc4a26ef5efdb8771c71)

Details

Provenance
zleiAuthored on Oct 9 2023, 4:36 AM
Reviewer
transport
Differential Revision
D42007: sctp: Some fixes for loader tunables
Parents
rG0a31dbecd43d: tcp: Simplify the initialization of loader tunable 'net.inet.tcp.tcbhashsize'
Branches
Unknown
Tags
Unknown