.\" Copyright (c) 2008 Pyun YongHyeon .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man4/jme.4,v 1.1 2008/05/27 01:59:17 yongari Exp $ .\" .Dd November 28, 2014 .Dt JME 4 .Os .Sh NAME .Nm jme .Nd JMicron Gigabit/Fast Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device miibus" .Cd "device jme" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_jme_load="YES" .Ed .Sh DESCRIPTION The .Nm device driver provides support for JMicron JMC250 PCI Express Gigabit Ethernet controllers and JMicron JMC260 PCI Express Fast Ethernet controllers. .Pp All LOMs supported by the .Nm driver have TCP/UDP/IP checksum offload for both transmit and receive, TCP segmentation offload (TSO), receive side scaling (RSS), multiple vector MSI-X, hardware VLAN tag stripping/insertion features, .\" Wake On Lan (WOL) an interrupt coalescing/moderation mechanism as well as a 64-bit multicast hash filter. Up to 4 reception queues can be enabled. By default, the .Nm driver will try enabling as many reception queues as allowed by the number of CPUs in the system. .Pp The JMC250 also supports Jumbo Frames (up to 9216 bytes), which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit Jumbo Frames. .Pp The .Nm driver supports the following media types: .Bl -tag -width ".Cm 10baseT/UTP" .It Cm autoselect Enable autoselection of the media type and options. The user can manually override the autoselected mode by adding media options to .Xr rc.conf 5 . .It Cm 10baseT/UTP Set 10Mbps operation. .It Cm 100baseTX Set 100Mbps (Fast Ethernet) operation. .It Cm 1000baseT Set 1000baseT operation over twisted pair. .El .Pp The .Nm driver supports the following media options: .Bl -tag -width ".Cm full-duplex" .It Cm full-duplex Force full duplex operation. .It Cm half-duplex Force half duplex operation. .El .Pp For more information on configuring this device, see .Xr ifconfig 8 . The .Nm driver supports .Xr polling 4 . .Ss Loader Tunables By default, the driver will use MSI-X if it is supported. This behavior can be turned off by setting the following tunable: .Em ( X is the device unit number): .Bd -literal -offset indent hw.jme.msix.enable=0 hw.jmeX.msix.enable=0 .Ed .Pp If MSI-X is used, the transmission queue MSI-X's target CPU can be specified using the following tunable: .Bd -literal -offset indent hw.jmeX.msix.txoff .Ed .Pp The maximum allowed value for this tunable is the power of 2 number of CPUs minus one. .Pp If MSI-X is used, the reception queue MSI-Xs' leading target CPU can be specified using the following tunable: .Bd -literal -offset indent hw.jmeX.msix.rxoff .Ed .Pp The value specificed must be aligned to the number of reception queues enabled and must be less than the power of 2 number of CPUs. .Pp If MSI-X is disabled, the driver will use MSI if it is supported. This behavior can be turned off by setting the following tunable: .Bd -literal -offset indent hw.jme.msi.enable=0 hw.jmeX.msi.enable=0 .Ed .Pp If MSI is used, MSI's target CPU can be changed by the following tunable: .Bd -literal -offset indent hw.jmeX.msi.cpu .Ed .Pp The maximum allowed value for this tunable is the number of CPUs minus one. .Pp Number of reception queues that can be enabled: .Bd -literal -offset indent hw.jme.rx_ring_count hw.jmeX.rx_ring_count .Ed .Pp Maximum allowed value for these tunables is 4 and it must be power of 2 aligned. Setting these tunables to 0 allows driver to enable as many reception queues as allowed by the number of CPUs. .Pp Number of reception descriptors that can be used: .Bd -literal -offset indent hw.jme.rx_desc_count hw.jmeX.rx_desc_count .Ed .Pp Maximum allowed value for these tunables is 1024. .Pp Number of transmission descriptors that can be used: .Bd -literal -offset indent hw.jme.tx_desc_count hw.jmeX.tx_desc_count .Ed .Pp Maximum allowed value for these tunables is 1024. .Pp .Xr polling 4 reception queues' leading target CPU can be specified by the following tunable: .Bd -literal -offset indent hw.jmeX.npoll.rxoff .Ed .Pp The value specificed must be aligned to the number of reception queues enabled and must be less than the power of 2 number of CPUs. .Pp .Xr polling 4 transmission queue's target CPU can be specified by the following tunable: .Bd -literal -offset indent hw.jmeX.npoll.txoff .Ed .Pp The maximum allowed value for this tunable is the power of 2 number of CPUs minus one. .Ss MIB Variables A number of per-interface variables are implemented in the .Va dev.jme. Ns Em X branch of the .Xr sysctl 3 MIB. .Bl -tag -width "rx_ring_count" .It Va tx_coal_to Maximum amount of time to delay for TX completion interrupt in units of 1us. The accepted range is 1 to 65535, the default is 250 (250us). .It Va tx_coal_pkt Maximum number of packets to fire TX completion interrupt. The accepted range is 0 to 255, the default is 128. Packet count based TX interrupt coalescing could be disabled by setting this variable to 0. .It Va rx_coal_to Maximum amount of time to delay for RX completion interrupt in units of 1us. The accepted range is 1 to 65535, the default is 150 (150us). .It Va rx_coal_pkt Maximum number of packets to fire RX completion interrupt. The accepted range is 0 to 255, the default is 64. Packet count based RX interrupt coalescing could be disabled by setting this variable to 0. .It Va rx_desc_count Number of RX descriptors per-ring (read-only). Use the tunable .Va hw.jme.rx_desc_count to configure it. .It Va tx_desc_count Number of TX descriptors (read-only). Use the tunable .Va hw.jme.tx_desc_count to configure it. .It Va rx_ring_count Number of RX rings (read-only). Use the tunable .Va hw.jme.rx_ring_count to configure it. .It Va tx_wreg The number of transmission descriptors should be setup before the hardware register is written. Setting this value too high will have negative effect on transmission timeliness. Setting this value too low will hurt overall transmission due to the frequent hardware register writing. .It Va npoll_rxoff .Xr polling 4 reception queues' leading target CPU. It has the same constraints as the tunable .Va hw.jmeX.npoll.rxoff . The set value will take effect the next time .Xr polling 4 is enabled on the device. .It Va npoll_txoff .Xr polling 4 transmission queue's target CPU. It has the same constraints as the tunable .Va hw.jmeX.npoll.txoff . The set value will take effect the next time .Xr polling 4 is enabled on the device. .El .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , .Xr ifmedia 4 , .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm driver was written by .An Pyun YongHyeon Aq Mt yongari@FreeBSD.org . It first appeared in .Fx 7.1 and was imported into .Dx 2.1 . .An Sepherosa Ziehau added the receive side scaling and multiple vector MSI-X support to .Dx .