[ovs-dev] [PATCH 2/5] netdev-linux: Cache mtu ioctl error code along with mtu.

Ben Pfaff blp at nicira.com
Wed Mar 7 09:56:13 PST 2012

On Tue, Mar 06, 2012 at 02:37:08PM -0800, Pravin B Shelar wrote:
> 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_get_status(), I don't understand why we want to return
vport_stats_error.  We know that we have driver info at that point, so
why not just return 0?  It would save a system call.

I understand why you don't call netdev_linux_get_drvinfo() from
netdev_internal_open(), because you told me, but it's not obvious from
the code.  I think that a comment is warranted.



More information about the dev mailing list