MAC_MAXSDU_UPDATE(9F) | Kernel Functions for Drivers | MAC_MAXSDU_UPDATE(9F) |
mac_maxsdu_update
—
indicate that a device's maximum data size has
changed
#include
<sys/mac_provider.h>
int
mac_maxsdu_update
(mac_handle_t
mh, uint_t sdu);
illumos DDI specific
The
mac_maxsdu_update
()
function is used to inform the MAC layer that the device represented by the
handle 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
mc_setprop(9E) entry point has
been called with the property
MAC_PROP_MTU
or some other device-related event occurring.
The 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.
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.
Upon successful completion, the
mac_maxsdu_update
() function returns
0. Otherwise, a
non-negative error is returned.
For an example of how a device driver should use the
mac_maxsdu_update
() function, see the
EXAMPLES section in
mc_setprop(9E).
The max_maxsdu_update
() function may fail
if:
EINVAL
June 2, 2016 | OmniOS |