[ovs-dev] [PATCH v2 2/6] netdev-linux: Cache error code from mtu ioctl.

Pravin Shelar pshelar at nicira.com
Thu Mar 8 23:25:55 UTC 2012


On Thu, Mar 8, 2012 at 3:02 PM, Ben Pfaff <blp at nicira.com> wrote:
> 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 <pshelar at nicira.com>
>
> 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.
>
ok..



More information about the dev mailing list