xref: /illumos-gate/usr/src/man/man9f/mac_maxsdu_update.9f (revision 48edc7cf07b5dccc3ad84bf2dafe4150bd666d60)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2016 Joyent, Inc.
13.\"
14.Dd June 02, 2016
15.Dt MAC_MAXSDU_UPDATE 9F
16.Os
17.Sh NAME
18.Nm mac_maxsdu_update
19.Nd indicate that a device's maximum data size has changed
20.Sh SYNOPSIS
21.In sys/mac_provider.h
22.Ft int
23.Fo mac_maxsdu_update
24.Fa "mac_handle_t mh"
25.Fa "uint_t sdu"
26.Fc
27.Sh INTERFACE LEVEL
28illumos DDI specific
29.Sh PARAMETERS
30.Bl -tag -width Fa
31.It Fa mh
32The MAC handle obtained from a call to
33.Xr mac_register 9F .
34.It Fa sdu
35An integer representing the maximum size data payload.
36.El
37.Sh DESCRIPTION
38The
39.Fn mac_maxsdu_update
40function is used to inform the MAC layer that the device represented by
41the handle
42.Fa mh
43has changed the largest size frame that it can transmit, also known as
44its Send Data Unit (SDU). This should be called when the device's MTU
45has been requested to be changed when a driver's
46.Xr mac_setprop 9E
47entry point has been called with the property
48.Sy MAC_PROP_MTU
49or some other device-related event occurring.
50.Pp
51The
52.Fa sdu
53represents the size of the largest payload ignoring the size of its own
54headers or any margin. For example, for an Ethernet-based device, this
55size should not include the Ethernet header or any VLAN tags.
56.Pp
57Through VNICs and other virtual data links, many different devices may
58be using a single physical device and have their own MTUs. The system
59takes care of those concerns and will not ask a device driver to update
60the MTU without verifying this.
61.Sh RETURN VALUES
62Upon successful completion, the
63.Fn mac_maxsdu_update
64function returns
65.Sy 0 .
66Otherwise, a non-negative error is returned.
67.Sh EXAMPLES
68For an example of how a device driver should use the
69.Fn mac_maxsdu_update
70function, see the
71.Sx EXAMPLES
72section in
73.Xr mac_setprop 9E .
74.Sh ERRORS
75The
76.Fn max_maxsdu_update
77function may fail if:
78.Bl -tag -width Er
79.It Er EINVAL
80The specified
81.Fa sdu
82is lower than the minimum SDU of the device.
83.El
84.Sh SEE ALSO
85.Xr mac 9E ,
86.Xr mac_setprop 9E ,
87.Xr mac_register 9F
88