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)
Mon, Oct 21, 12:18 PM
Unknown Object (File)
Mon, Oct 21, 11:39 AM
Unknown Object (File)
Sep 24 2024, 5:27 PM
Unknown Object (File)
Sep 24 2024, 5:27 PM
Unknown Object (File)
Sep 24 2024, 5:27 PM
Unknown Object (File)
Sep 24 2024, 5:27 PM
Unknown Object (File)
Sep 9 2024, 5:20 AM
Unknown Object (File)
Sep 9 2024, 5:20 AM

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.