On Fri, Mar 09, 2012 at 02:57:56PM -0800, Pravin B Shelar wrote: > There is no need to refresh status and stats for existing devices > if the device mtu is zero as it will be done periodically by > vswitchd. > > Signed-off-by: Pravin B Shelar <[email protected]>
The check !iface->cfg->mtu doesn't check for a zero MTU. It checks for a missing MTU, that is, an MTU column that contains no values at all. (A zero MTU would be *iface->cfg->mtu == 0.) I'm not sure that this has the semantics that we want. It populates the stats column when we add the vport to the datapath, but consider the case where the vport is already in the datapath when we start up (e.g. "/etc/init.d/openvswitch restart"). We should probably still refresh the stats on startup in that case, but we won't with this test. The previous test for "!iface->cfg->mtu" had the same problem but it's still probably a good idea to improve on it. I think that a better solution would be for iface_create() to mark an interface as new, then for bridge_add_ofproto_ports() to refresh the stats for interfaces marked new in that way. Then you could drop the existing !iface->cfg->mtu check also. Thanks, Ben. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
