Page MenuHomeFreeBSD

if_vlan locking fixes
AbandonedPublic

Authored by mjoras on Apr 4 2016, 3:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 27, 8:12 PM
Unknown Object (File)
Sat, Sep 27, 3:56 PM
Unknown Object (File)
Fri, Sep 26, 4:14 AM
Unknown Object (File)
Wed, Sep 24, 3:17 AM
Unknown Object (File)
Wed, Sep 17, 9:16 AM
Unknown Object (File)
Sep 12 2025, 11:23 AM
Unknown Object (File)
Sep 3 2025, 2:54 AM
Unknown Object (File)
Aug 19 2025, 3:52 PM

Details

Reviewers
hselasky
rstone
Group Reviewers
network
Summary

Previously the locking in if_vlan was not very comprehensive. Particularly
there was very little protection against the destruction of active vlan(4)
interfaces or concurrent modification of a vlan(4) interface. The former
readily produced several different panics.

These changes broaden the scope of the global if_vlan rmlock(9) to avoid these
races. if_vlan should now be much more resilient to the destruction of active
vlan(4) interfaces and other racy situations in the configuration path.

Test Plan

These changes were tested internally (Isilon) by testing the vlan ioctl paths
with WITNESS on, and running a stress test which creates/destroys vlans while
those vlans are active (i.e. have active TCP iperf flows).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3125
Build 3158: arc lint + arc unit

Event Timeline

mjoras retitled this revision from to if_vlan locking fixes.
mjoras updated this object.
mjoras edited the test plan for this revision. (Show Details)
hselasky edited edge metadata.

Could you add a comment with a few words about the locking strategy and order?

mjoras edited edge metadata.
  • Fixup comments to be more explicit about the locking strategy.

Could you add a comment with a few words about the locking strategy and order?

I redid the top comment to be more explicit about the locking. Does that look decent to you?

The change looks reasonable to me. Did you measure what penalty added an rmlock on transmit path?