Page MenuHomeFreeBSD

kernel linkers: Eliminate unneeded vnet propagation
ClosedPublic

Authored by zlei on Apr 27 2023, 3:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 4, 12:31 PM
Unknown Object (File)
Tue, Apr 2, 8:41 AM
Unknown Object (File)
Sun, Mar 31, 2:41 AM
Unknown Object (File)
Mar 24 2024, 3:16 PM
Unknown Object (File)
Mar 20 2024, 9:31 PM
Unknown Object (File)
Mar 18 2024, 7:24 PM
Unknown Object (File)
Mar 18 2024, 4:26 AM
Unknown Object (File)
Mar 16 2024, 7:23 PM

Details

Summary
  1. The module preload happens before vnet0 creating, thus vnet_data_copy() will say empty vnet list.
  2. For modules loaded by kldload, vnet propagation will be done after registering sysctls, then previous propagation is not needed.

MFC after: 3 weeks

Test Plan

Load modules that have sysctl knobs flagged with both CTLFLAG_TUN and CTLFLAG_VNET.

# echo "net.link.bridge.log_stp=1" >> /boot/loader.conf
# echo 'if_bridge_load="YES"' >> /boot/loader.conf
# reboot
# sysctl net.link.bridge.log_stp
net.link.bridge.log_stp: 1
# kldunload if_bridge
# kldload if_bridge
# sysctl net.link.bridge.log_stp
net.link.bridge.log_stp: 1

Diff Detail

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

Event Timeline

You need to run this through the group of people maintaining VNET.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 9 2023, 8:21 AM
This revision was automatically updated to reflect the committed changes.