Page MenuHomeFreeBSD

Make VLAN hash table fixed width
Needs ReviewPublic

Authored by cmiller_netapp.com on Fri, Feb 7, 10:20 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

There is a race that can happen between vlan_gethash and vlan_growhash that can result in vlan_gethash dereferencing a bad pointer.

This change increases the size of the hash table and makes it fixed so that there is no need for vlan_growhash, thus eliminating the race and also simplifying the code.

Performance testing showed that the maximum collision list of 16 resulted in no noticeable performance impact. However, this does increase the minimum number of hash buckets from 16 to 256.

Test Plan

Creation and deletion of VLAN interfaces.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped