xref: /illumos-gate/usr/src/man/man9f/mac_lso_get.9f (revision b106467fd72e9bfd9e2bd78fbaa00a96a4eead45)
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. If so,
51the 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. In other words, it only
59works on entries where it is the first of many possible entries linked
60together by the
61.Sy b_cont
62member. The first
63.Sy mblk_t
64received from any
65.Xr mac 9E
66API or pointed to by a
67.Sy b_next
68pointer should be used.
69.Pp
70A device driver should first look at the
71.Fa flags
72argument to determine what to do.
73.Fa flags
74may be a bitwise inclusive OR of the following:
75.Bl -tag -width Sy
76.It Sy HW_LSO
77This flag indicates that hardware needs to perform segmentation
78offload. The maximum segment size that the driver should use is
79available through the
80.Fa mss
81argument.
82.El
83.Sh CONTEXT
84The
85.Fn mac_lso_get
86function may be called from
87.Sy user ,
88.Sy kernel ,
89or
90.Sy interrupt
91context.
92.Sh SEE ALSO
93.Xr mac 9E ,
94.Xr mblk 9S
95