This file and its contents are supplied under the terms of the
Common Development and Distribution License ("CDDL"), version 1.0.
You may only use this file in accordance with the terms of version
1.0 of the CDDL.

A full copy of the text of the CDDL should have accompanied this
source. A copy of the CDDL is also available via the Internet at
http://www.illumos.org/license/CDDL.


Copyright 2016 Joyent, Inc.

.Dd June 02, 2016 .Dt MAC_MAXSDU_UPDATE 9F .Os .Sh NAME .Nm mac_maxsdu_update .Nd indicate that a device's maximum data size has changed .Sh SYNOPSIS n sys/mac_provider.h .Ft int .Fo mac_maxsdu_update .Fa "mac_handle_t mh" .Fa "uint_t sdu" .Fc .Sh INTERFACE LEVEL illumos DDI specific .Sh PARAMETERS l -tag -width Fa t Fa mh The MAC handle obtained from a call to .Xr mac_register 9F . t Fa sdu An integer representing the maximum size data payload. .El .Sh DESCRIPTION The .Fn mac_maxsdu_update function is used to inform the MAC layer that the device represented by the handle .Fa mh has changed the largest size frame that it can transmit, also known as its Send Data Unit (SDU). This should be called when the device's MTU has been requested to be changed when a driver's .Xr mac_setprop 9E entry point has been called with the property .Sy MAC_PROP_MTU or some other device-related event occurring.

p The .Fa sdu represents the size of the largest payload ignoring the size of its own headers or any margin. For example, for an Ethernet-based device, this size should not include the Ethernet header or any VLAN tags.

p Through VNICs and other virtual data links, many different devices may be using a single physical device and have their own MTUs. The system takes care of those concerns and will not ask a device driver to update the MTU without verifying this. .Sh RETURN VALUES Upon successful completion, the .Fn mac_maxsdu_update function returns .Sy 0 . Otherwise, a non-negative error is returned. .Sh EXAMPLES For an example of how a device driver should use the .Fn mac_maxsdu_update function, see the .Sx EXAMPLES section in .Xr mac_setprop 9E . .Sh ERRORS The .Fn max_maxsdu_update function may fail if: l -tag -width Er t Er EINVAL The specified .Fa sdu is lower than the minimum SDU of the device. .El .Sh SEE ALSO .Xr mac 9E , .Xr mac_setprop 9E , .Xr mac_register 9F