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