Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / mac_maxsdu_update.9f
blob92aa4b95bdff83b3116471c6131073f661467150
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
28 illumos DDI specific
29 .Sh PARAMETERS
30 .Bl -tag -width Fa
31 .It Fa mh
32 The MAC handle obtained from a call to
33 .Xr mac_register 9F .
34 .It Fa sdu
35 An integer representing the maximum size data payload.
36 .El
37 .Sh DESCRIPTION
38 The
39 .Fn mac_maxsdu_update
40 function is used to inform the MAC layer that the device represented by
41 the handle
42 .Fa mh
43 has changed the largest size frame that it can transmit, also known as
44 its Send Data Unit (SDU).
45 This should be called when the device's MTU has been requested to be changed
46 when a driver's
47 .Xr mc_setprop 9E
48 entry point has been called with the property
49 .Sy MAC_PROP_MTU
50 or some other device-related event occurring.
51 .Pp
52 The
53 .Fa sdu
54 represents the size of the largest payload ignoring the size of its own
55 headers or any margin.
56 For example, for an Ethernet-based device, this size should not include the
57 Ethernet header or any VLAN tags.
58 .Pp
59 Through VNICs and other virtual data links, many different devices may
60 be using a single physical device and have their own MTUs.
61 The system takes care of those concerns and will not ask a device driver to
62 update the MTU without verifying this.
63 .Sh RETURN VALUES
64 Upon successful completion, the
65 .Fn mac_maxsdu_update
66 function returns
67 .Sy 0 .
68 Otherwise, a non-negative error is returned.
69 .Sh EXAMPLES
70 For an example of how a device driver should use the
71 .Fn mac_maxsdu_update
72 function, see the
73 .Sx EXAMPLES
74 section in
75 .Xr mc_setprop 9E .
76 .Sh ERRORS
77 The
78 .Fn max_maxsdu_update
79 function may fail if:
80 .Bl -tag -width Er
81 .It Er EINVAL
82 The specified
83 .Fa sdu
84 is lower than the minimum SDU of the device.
85 .El
86 .Sh SEE ALSO
87 .Xr mac 9E ,
88 .Xr mc_setprop 9E ,
89 .Xr mac_register 9F