xref: /illumos-gate/usr/src/man/man9f/mac_tx_update.9f (revision d48be21240dfd051b689384ce2b23479d757f2d8)
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 (c) 2017, Joyent, Inc.
13.\" Copyright 2022 Oxide Computer Company
14.\"
15.Dd July 2, 2022
16.Dt MAC_TX_UPDATE 9F
17.Os
18.Sh NAME
19.Nm mac_tx_update ,
20.Nm mac_tx_ring_update
21.Nd indicate that a device can transmit again
22.Sh SYNOPSIS
23.In sys/mac_provider.h
24.Ft void
25.Fo mac_tx_update
26.Fa "mac_handle_t mh"
27.Fc
28.Ft void
29.Fo mac_tx_ring_update
30.Fa "mac_handle_t mh"
31.Fa "mac_ring_handle_t mrh"
32.Fc
33.Sh INTERFACE LEVEL
34illumos DDI specific
35.Pp
36The
37.Fn mac_tx_ring_update
38function point is
39.Sy Uncommitted -
40API and ABI stability is not guaranteed.
41.Sh PARAMETERS
42.Bl -tag -width Fa
43.It Fa mh
44The MAC handle obtained from a call to
45.Xr mac_register 9F .
46.It Fa mrh
47The MAC ring handle obtained when the driver's ring entry point
48.Xr mr_rget 9E
49was called.
50.El
51.Sh DESCRIPTION
52The
53.Fn mac_tx_update
54function is used by device drivers to indicate that the device
55represented by the handle
56.Fa mh
57can transmit data again.
58It should only be called after the device driver has returned data from its
59.Xr mc_tx 9E
60endpoint.
61For more information on when this should be called, see both
62.Xr mc_tx 9E
63and the
64.Sx Transmitting Data and Back Pressure
65section of
66.Xr mac 9E .
67.Pp
68Device drivers should not hold any of their own locks when calling into
69this function.
70See the
71.Sx MAC Callbacks
72section of
73.Xr mac 9E
74for more information.
75.Pp
76When a driver has negotiated the
77.Dv MAC_CAPAB_RINGS
78capability and indicated that it supports transmit groups, it must not
79use the
80.Fn mac_tx_update
81function and should instead call the
82.Fn mac_tx_ring_update
83function targeting a specific ring instead.
84The ring that is being updated is specified by the ring handle passed in
85the
86.Fa mrh
87argument.
88The ring should have previously returned frames from its
89.Xr mri_tx 9E
90entry point to indicate that it was blocked.
91.Pp
92In all other respects, the
93.Fn mac_tx_ring_update
94function is similar to the
95.Fn mac_tx_update
96function.
97.Sh CONTEXT
98The
99.Fn mac_tx_update
100function may be called from
101.Sy user ,
102.Sy kernel ,
103or
104.Sy interrupt
105context.
106.Sh SEE ALSO
107.Xr mac 9E ,
108.Xr mac_capab_rings 9E ,
109.Xr mc_tx 9E ,
110.Xr mr_rget 9E ,
111.Xr mri_tx 9E ,
112.Xr mac_register 9F
113