[ovs-discuss] [PATCH 04/20] netdev: Change netdev_get_mtu() to return an error code.

Justin Pettit jpettit at nicira.com
Tue Jul 28 00:43:45 UTC 2009


On Jul 24, 2009, at 2:19 PM, Ben Pfaff wrote:

> -/* Returns the maximum size of transmitted (and received) packets  
> on 'netdev',
> - * in bytes, not including the hardware header; thus, this is  
> typically 1500
> - * bytes for Ethernet devices. */
> +/* Retrieves the MTU of 'netdev'.  The MTU is the maximum size of  
> transmitted
> + * (and received) packets, in bytes, not including the hardware  
> header; thus,
> + * this is typically 1500 bytes for Ethernet devices.
> + *
> + * If successful, returns 0 and stores the MTU size in '*mtup'.  On  
> failure,
> + * returns a positive errno value and stores ETH_PAYLOAD_MAX (1500)  
> in
> + * '*mtup'. */
> int
> -netdev_get_mtu(const struct netdev *netdev)
> +netdev_get_mtu(const struct netdev *netdev, int *mtup)
> {
> -    return netdev->mtu;
> +    *mtup = netdev->mtu;
> +    return 0;
> }

This function also doesn't match its description.

--Justin






More information about the discuss mailing list