xref: /dragonfly/share/man/man4/jme.4 (revision d4ef6694)
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 24, 2013
28.Dt JME 4
29.Os
30.Sh NAME
31.Nm jme
32.Nd JMicron Gigabit/Fast Ethernet driver
33.Sh SYNOPSIS
34To compile this driver into the kernel,
35place the following lines in your
36kernel configuration file:
37.Bd -ragged -offset indent
38.Cd "device miibus"
39.Cd "device jme"
40.Ed
41.Pp
42Alternatively, to load the driver as a
43module at boot time, place the following line in
44.Xr loader.conf 5 :
45.Bd -literal -offset indent
46if_jme_load="YES"
47.Ed
48.Sh DESCRIPTION
49The
50.Nm
51device driver provides support for JMicron JMC250 PCI Express
52Gigabit Ethernet controllers and JMicron JMC260 PCI Express Fast
53Ethernet controllers.
54.Pp
55All LOMs supported by the
56.Nm
57driver have TCP/UDP/IP checksum offload for both transmit and receive,
58TCP segmentation offload (TSO),
59receive side scaling (RSS),
60multiple vector MSI-X,
61hardware VLAN tag stripping/insertion features,
62.\" Wake On Lan (WOL)
63an interrupt coalescing/moderation mechanism as well as
64a 64-bit multicast hash filter.
65Up to 4 reception queues can be enabled.
66By default, the
67.Nm
68driver will try enabling as many reception queues as allowed by
69the number of CPUs in the system.
70.Pp
71The JMC250 also supports Jumbo Frames (up to 9216 bytes), which can be
72configured via the interface MTU setting.
73Selecting an MTU larger than 1500 bytes with the
74.Xr ifconfig 8
75utility configures the adapter to receive and transmit Jumbo Frames.
76.Pp
77The
78.Nm
79driver supports the following media types:
80.Bl -tag -width ".Cm 10baseT/UTP"
81.It Cm autoselect
82Enable autoselection of the media type and options.
83The user can manually override
84the autoselected mode by adding media options to
85.Xr rc.conf 5 .
86.It Cm 10baseT/UTP
87Set 10Mbps operation.
88.It Cm 100baseTX
89Set 100Mbps (Fast Ethernet) operation.
90.It Cm 1000baseT
91Set 1000baseT operation over twisted pair.
92.El
93.Pp
94The
95.Nm
96driver supports the following media options:
97.Bl -tag -width ".Cm full-duplex"
98.It Cm full-duplex
99Force full duplex operation.
100.It Cm half-duplex
101Force half duplex operation.
102.El
103.Pp
104For more information on configuring this device, see
105.Xr ifconfig 8 .
106The
107.Nm
108driver supports
109.Xr polling 4 .
110.Ss Loader Tunables
111By default, the driver will use MSI-X if it is supported.
112This behavior can be turned off by setting the following tunable:
113.Em ( X
114is the device unit number):
115.Bd -literal -offset indent
116hw.jme.msix.enable=0
117hw.jmeX.msix.enable=0
118.Ed
119.Pp
120If MSI-X is used,
121the transmission queue MSI-X's target CPU
122can be specified using the following tunable:
123.Bd -literal -offset indent
124hw.jmeX.msix.txoff
125.Ed
126.Pp
127The maximum allowed value for this tunable is
128the power of 2 number of CPUs minus one.
129.Pp
130If MSI-X is used,
131the reception queue MSI-Xs' leading target CPU
132can be specified using the following tunable:
133.Bd -literal -offset indent
134hw.jmeX.msix.rxoff
135.Ed
136.Pp
137The value specificed must be aligned to the number of reception queues enabled
138and must be less than the power of 2 number of CPUs.
139.Pp
140If MSI-X is disabled,
141the driver will use MSI if it is supported.
142This behavior can be turned off by setting the following tunable:
143.Bd -literal -offset indent
144hw.jme.msi.enable=0
145hw.jmeX.msi.enable=0
146.Ed
147.Pp
148If MSI is used,
149MSI's target CPU can be changed by the following tunable:
150.Bd -literal -offset indent
151hw.jmeX.msi.cpu
152.Ed
153.Pp
154The maximum allowed value for this tunable is the number of CPUs minus one.
155.Pp
156Number of reception queues that can be enabled:
157.Bd -literal -offset indent
158hw.jme.rx_ring_count
159hw.jmeX.rx_ring_count
160.Ed
161.Pp
162Maximum allowed value for these tunables is 4
163and it must be power of 2 aligned.
164Setting these tunables to 0 allows driver to enable as many reception queues
165as allowed by the number of CPUs.
166.Pp
167Number of reception descriptors that can be used:
168.Bd -literal -offset indent
169hw.jme.rx_desc_count
170hw.jmeX.rx_desc_count
171.Ed
172.Pp
173Maximum allowed value for these tunables is 1024.
174.Pp
175Number of transmission descriptors that can be used:
176.Bd -literal -offset indent
177hw.jme.tx_desc_count
178hw.jmeX.tx_desc_count
179.Ed
180.Pp
181Maximum allowed value for these tunables is 1024.
182.Pp
183.Xr polling 4
184reception queues' leading target CPU can be specified by the following tunable:
185.Bd -literal -offset indent
186hw.jmeX.npoll.rxoff
187.Ed
188.Pp
189The value specificed must be aligned to the number of reception queues enabled
190and must be less than the power of 2 number of CPUs.
191.Pp
192.Xr polling 4
193transmission queue's target CPU can be specified by the following tunable:
194.Bd -literal -offset indent
195hw.jmeX.npoll.txoff
196.Ed
197.Pp
198The maximum allowed value for this tunable is
199the power of 2 number of CPUs minus one.
200.Ss MIB Variables
201A number of per-interface variables are implemented in the
202.Va hw.jme Ns Em X
203branch of the
204.Xr sysctl 3
205MIB.
206.Bl -tag -width "rx_ring_count"
207.It Va tx_coal_to
208Maximum amount of time to delay for TX completion interrupt in
209units of 1us.
210The accepted range is 1 to 65535, the default is 250 (250us).
211.It Va tx_coal_pkt
212Maximum number of packets to fire TX completion interrupt.
213The accepted range is 0 to 255, the default is 128.
214Packet count based TX interrupt coalescing could be disabled
215by setting this variable to 0.
216.It Va rx_coal_to
217Maximum amount of time to delay for RX completion interrupt in
218units of 1us.
219The accepted range is 1 to 65535, the default is 150 (150us).
220.It Va rx_coal_pkt
221Maximum number of packets to fire RX completion interrupt.
222The accepted range is 0 to 255, the default is 64.
223Packet count based RX interrupt coalescing could be disabled
224by setting this variable to 0.
225.It Va rx_desc_count
226Number of RX descriptors per-ring (read-only).
227Use the tunable
228.Va hw.jme.rx_desc_count
229to configure it.
230.It Va tx_desc_count
231Number of TX descriptors (read-only).
232Use the tunable
233.Va hw.jme.tx_desc_count
234to configure it.
235.It Va rx_ring_count
236Number of RX rings (read-only).
237Use the tunable
238.Va hw.jme.rx_ring_count
239to configure it.
240.It Va tx_wreg
241The number of transmission descriptors should be setup
242before the hardware register is written.
243Setting this value too high will have negative effect on
244transmission timeliness.
245Setting this value too low will hurt overall transmission
246due to the frequent hardware register writing.
247.It Va npoll_rxoff
248.Xr polling 4
249reception queues' leading target CPU.
250It has the same constraints as the tunable
251.Va hw.jmeX.npoll.rxoff .
252The set value will take effect the next time
253.Xr polling 4
254is enabled on the device.
255.It Va npoll_txoff
256.Xr polling 4
257transmission queue's target CPU.
258It has the same constraints as the tunable
259.Va hw.jmeX.npoll.txoff .
260The set value will take effect the next time
261.Xr polling 4
262is enabled on the device.
263.El
264.Sh SEE ALSO
265.Xr altq 4 ,
266.Xr arp 4 ,
267.Xr ifmedia 4 ,
268.Xr miibus 4 ,
269.Xr netintro 4 ,
270.Xr ng_ether 4 ,
271.Xr polling 4 ,
272.Xr vlan 4 ,
273.Xr ifconfig 8
274.Sh HISTORY
275The
276.Nm
277driver was written by
278.An Pyun YongHyeon Aq Mt yongari@FreeBSD.org .
279It first appeared in
280.Fx 7.1
281and was imported into
282.Dx 2.1 .
283.An Sepherosa Ziehau
284added the receive side scaling and
285multiple vector MSI-X support to
286.Dx .
287