Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / mac_lso_get.9f
blob4fd21cf26b965d277fcbd4baa13206480472be60
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_LSO_GET 9F
16 .Os
17 .Sh NAME
18 .Nm mac_lso_get
19 .Nd get LSO information on message blocks
20 .Sh SYNOPSIS
21 .In sys/mac_provider.h
22 .Ft void
23 .Fo mac_lso_get
24 .Fa "mblk_t *mp"
25 .Fa "uint32_t *mss"
26 .Fa "uint32_t *flags"
27 .Fc
28 .Sh INTERFACE LEVEL
29 illumos DDI specific
30 .Sh PARAMETERS
31 .Bl -tag -width Fa
32 .It Fa mp
33 A pointer to a
34 .Xr mblk 9S
35 structure that contains an outgoing frame.
36 .It Fa mss
37 A pointer to a value that will be filled in with the maximum segment
38 size (MSS).
39 .It Fa flags
40 A pointer to a value that will be filled in with various flags that
41 indicate the behavior to perform.
42 .El
43 .Sh DESCRIPTION
44 The
45 .Fn mac_lso_get
46 function is used by device drivers that have indicated that they support
47 the
48 .Sy MAC_CAPAB_LSO
49 capability to determine whether large send offload (also known as large
50 segmentation offload or LSO) is required for this frame or not.
51 If so, the driver should take the appropriate actions to program the hardware
52 to perform LSO.
53 .Pp
54 The
55 .Fn mac_lso_get
56 function should only be called on the first
57 .Sy mblk_t
58 that begins a given individual frame in a chain.
59 In other words, it only works on entries where it is the first of many possible
60 entries linked together by the
61 .Sy b_cont
62 member.
63 The first
64 .Sy mblk_t
65 received from any
66 .Xr mac 9E
67 API or pointed to by a
68 .Sy b_next
69 pointer should be used.
70 .Pp
71 A device driver should first look at the
72 .Fa flags
73 argument to determine what to do.
74 .Fa flags
75 may be a bitwise inclusive OR of the following:
76 .Bl -tag -width Sy
77 .It Sy HW_LSO
78 This flag indicates that hardware needs to perform segmentation
79 offload.
80 The maximum segment size that the driver should use is available through the
81 .Fa mss
82 argument.
83 .El
84 .Sh CONTEXT
85 The
86 .Fn mac_lso_get
87 function may be called from
88 .Sy user ,
89 .Sy kernel ,
91 .Sy interrupt
92 context.
93 .Sh SEE ALSO
94 .Xr mac 9E ,
95 .Xr mblk 9S