bridge: Optimize trunk port common case.
authorBen Pfaff <blp@nicira.com>
Mon, 3 May 2010 18:47:56 +0000 (11:47 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 5 May 2010 21:00:50 +0000 (14:00 -0700)
commit3e9c481c70473b5faa29c72a1e609a31ddb6b990
tree4c85bac94ce3b139c12acf91396315a6812107ae
parent36c501fe7888bce761b5527dbd2ac7234543aef1
bridge: Optimize trunk port common case.

Profiling with qprof showed that bitmap_set_multiple() and bitmap_equal()
were eating up quite a bit of CPU time during bridge reconfiguration (up
to about 10% of total runtime).  This is completely avoidable in the common
case where a port trunks all VLANs, where we don't really need a bitmap at
all.  This commit implements that optimization.
vswitchd/bridge.c