Merge branch 'vendor/OPENRESOLV' with the following changes:
[dragonfly.git] / share / man / man4 / jme.4
1 .\" Copyright (c) 2008 Pyun YongHyeon
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/share/man/man4/jme.4,v 1.1 2008/05/27 01:59:17 yongari Exp $
26 .\"
27 .Dd May 29, 2017
28 .Dt JME 4
29 .Os
30 .Sh NAME
31 .Nm jme
32 .Nd JMicron Gigabit/Fast Ethernet driver
33 .Sh SYNOPSIS
34 To compile this driver into the kernel,
35 place the following lines in your
36 kernel configuration file:
37 .Bd -ragged -offset indent
38 .Cd "device miibus"
39 .Cd "device jme"
40 .Ed
41 .Pp
42 Alternatively, to load the driver as a
43 module at boot time, place the following line in
44 .Xr loader.conf 5 :
45 .Bd -literal -offset indent
46 if_jme_load="YES"
47 .Ed
48 .Sh DESCRIPTION
49 The
50 .Nm
51 device driver provides support for JMicron JMC250 PCI Express
52 Gigabit Ethernet controllers and JMicron JMC260 PCI Express Fast
53 Ethernet controllers.
54 .Pp
55 All LOMs supported by the
56 .Nm
57 driver have TCP/UDP/IP checksum offload for both transmit and receive,
58 TCP segmentation offload (TSO),
59 receive side scaling (RSS),
60 multiple vector MSI-X,
61 hardware VLAN tag stripping/insertion features,
62 .\" Wake On Lan (WOL)
63 an interrupt coalescing/moderation mechanism as well as
64 a 64-bit multicast hash filter.
65 Up to 4 reception queues can be enabled.
66 By default, the
67 .Nm
68 driver will try enabling as many reception queues as allowed by
69 the number of CPUs in the system.
70 .Pp
71 The JMC250 also supports Jumbo Frames (up to 9216 bytes), which can be
72 configured via the interface MTU setting.
73 Selecting an MTU larger than 1500 bytes with the
74 .Xr ifconfig 8
75 utility configures the adapter to receive and transmit Jumbo Frames.
76 .Pp
77 The
78 .Nm
79 driver supports the following media types:
80 .Bl -tag -width ".Cm 10baseT/UTP"
81 .It Cm autoselect
82 Enable autoselection of the media type and options.
83 The user can manually override
84 the autoselected mode by adding media options to
85 .Xr rc.conf 5 .
86 .It Cm 10baseT/UTP
87 Set 10Mbps operation.
88 .It Cm 100baseTX
89 Set 100Mbps (Fast Ethernet) operation.
90 .It Cm 1000baseT
91 Set 1000baseT operation over twisted pair.
92 .El
93 .Pp
94 The
95 .Nm
96 driver supports the following media options:
97 .Bl -tag -width ".Cm full-duplex"
98 .It Cm full-duplex
99 Force full duplex operation.
100 .It Cm half-duplex
101 Force half duplex operation.
102 .El
103 .Pp
104 For more information on configuring this device, see
105 .Xr ifconfig 8 .
106 The
107 .Nm
108 driver supports
109 .Xr polling 4 .
110 .Ss Loader Tunables
111 By default, the driver will use MSI-X if it is supported.
112 This behavior can be turned off by setting the following tunable:
113 .Em ( X
114 is the device unit number):
115 .Bd -literal -offset indent
116 hw.jme.msix.enable=0
117 hw.jmeX.msix.enable=0
118 .Ed
119 .Pp
120 If MSI-X is disabled,
121 the driver will use MSI if it is supported.
122 This behavior can be turned off by setting the following tunable:
123 .Bd -literal -offset indent
124 hw.jme.msi.enable=0
125 hw.jmeX.msi.enable=0
126 .Ed
127 .Pp
128 If MSI is used,
129 MSI's target CPU can be changed by the following tunable:
130 .Bd -literal -offset indent
131 hw.jmeX.msi.cpu
132 .Ed
133 .Pp
134 The maximum allowed value for this tunable is the number of CPUs minus one.
135 .Pp
136 Number of reception queues that can be enabled:
137 .Bd -literal -offset indent
138 hw.jme.rx_ring_count
139 hw.jmeX.rx_ring_count
140 .Ed
141 .Pp
142 Maximum allowed value for these tunables is 4.
143 Setting these tunables to 0 allows driver to enable as many reception queues
144 as allowed by the number of CPUs.
145 .Pp
146 Number of reception descriptors that can be used:
147 .Bd -literal -offset indent
148 hw.jme.rx_desc_count
149 hw.jmeX.rx_desc_count
150 .Ed
151 .Pp
152 Maximum allowed value for these tunables is 1024.
153 .Pp
154 Number of transmission descriptors that can be used:
155 .Bd -literal -offset indent
156 hw.jme.tx_desc_count
157 hw.jmeX.tx_desc_count
158 .Ed
159 .Pp
160 Maximum allowed value for these tunables is 1024.
161 .Ss MIB Variables
162 A number of per-interface variables are implemented in the
163 .Va dev.jme. Ns Em X
164 branch of the
165 .Xr sysctl 3
166 MIB.
167 .Bl -tag -width "rx_ring_count"
168 .It Va tx_coal_to
169 Maximum amount of time to delay for TX completion interrupt in
170 units of 1us.
171 The accepted range is 1 to 65535, the default is 250 (250us).
172 .It Va tx_coal_pkt
173 Maximum number of packets to fire TX completion interrupt.
174 The accepted range is 0 to 255, the default is 128.
175 Packet count based TX interrupt coalescing could be disabled
176 by setting this variable to 0.
177 .It Va rx_coal_to
178 Maximum amount of time to delay for RX completion interrupt in
179 units of 1us.
180 The accepted range is 1 to 65535, the default is 150 (150us).
181 .It Va rx_coal_pkt
182 Maximum number of packets to fire RX completion interrupt.
183 The accepted range is 0 to 255, the default is 64.
184 Packet count based RX interrupt coalescing could be disabled
185 by setting this variable to 0.
186 .It Va rx_desc_count
187 Number of RX descriptors per-ring (read-only).
188 Use the tunable
189 .Va hw.jme.rx_desc_count
190 to configure it.
191 .It Va tx_desc_count
192 Number of TX descriptors (read-only).
193 Use the tunable
194 .Va hw.jme.tx_desc_count
195 to configure it.
196 .It Va rx_ring_count
197 Number of RX rings (read-only).
198 Use the tunable
199 .Va hw.jme.rx_ring_count
200 to configure it.
201 .It Va tx_wreg
202 The number of transmission descriptors should be setup
203 before the hardware register is written.
204 Setting this value too high will have negative effect on
205 transmission timeliness.
206 Setting this value too low will hurt overall transmission
207 due to the frequent hardware register writing.
208 .El
209 .Sh SEE ALSO
210 .Xr altq 4 ,
211 .Xr arp 4 ,
212 .Xr ifmedia 4 ,
213 .Xr miibus 4 ,
214 .Xr netintro 4 ,
215 .Xr ng_ether 4 ,
216 .Xr polling 4 ,
217 .Xr vlan 4 ,
218 .Xr ifconfig 8
219 .Sh HISTORY
220 The
221 .Nm
222 driver was written by
223 .An Pyun YongHyeon Aq Mt yongari@FreeBSD.org .
224 It first appeared in
225 .Fx 7.1
226 and was imported into
227 .Dx 2.1 .
228 .An Sepherosa Ziehau
229 added the receive side scaling and
230 multiple vector MSI-X support to
231 .Dx .