brcompat: Don't re-read configuration file from inside bridge code.
authorBen Pfaff <blp@nicira.com>
Fri, 16 Jan 2009 00:08:00 +0000 (16:08 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 16 Jan 2009 00:08:00 +0000 (16:08 -0800)
commit2b34f542b1015b69c589bc4fa324d236cd35dd5f
treeb6f7ea91c0107fc2e8ed018bd579f409fdde03bf
parent41cc3dda684a7654048923c2ff8fea54c68aff1c
brcompat: Don't re-read configuration file from inside bridge code.

brc_modify_config() re-reads the configuration files by calling cfg_read(),
but we don't want to do that when we're deep inside the bridge code, in
the call to brc_modify_config() from phy_port_changed().  So only call
cfg_read() from the callers of brc_modify_config() that are in brcompat.c.

Also, each cfg_read() call was followed by a call to bridge_reconfigure(),
which is what reconfigure() in vswitchd.c does, so just use that function
instead of open-coding the pair of calls.

This should not have caused a real problem, because no pointers into
configuration data are retained by bridge code, but it still seems like
the "correct" way to do things.
vswitchd/brcompat.c
vswitchd/vswitchd.c
vswitchd/vswitchd.h [new file with mode: 0644]