On Thu, Mar 08, 2012 at 07:26:23AM -0800, Pravin B Shelar wrote: > Fixed according to comments from Ben. > v1-v2: > - Fixed check for MTU in notifier so that mtu is not set to zero. > - Changed check for VALID_MTU. > > --8<--------------------------cut here-------------------------->8-- > netdev linux devices uses mtu ioctl to get and set MTU for a device. > By caching error code from ioctl we can reduce number of ioctl calls > for device which is unregistered from system. > netdev notification is used to update mtu which saves get-mtu-ioctl. > > Signed-off-by: Pravin B Shelar <[email protected]>
In netdev_linux_set_mtu(), I don't think that it is wise to update the cache in case of an error: if we try to, for example, set an invalid MTU, then the next call to netdev_linux_get_mtu() for the device would report that error instead of the device's actual MTU. Otherwise this looks fine to me. Thank you. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
