xref: /freebsd/share/man/man4/vge.4 (revision d8a0fe102c0cfdfcd5b818f850eff09d8536c9bc)
1.\" Copyright (c) 2004
2.\"	Bill Paul <wpaul@windriver.com>. 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.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by Bill Paul.
15.\" 4. Neither the name of the author nor the names of any co-contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"   without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
23.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29.\" THE POSSIBILITY OF SUCH DAMAGE.
30.\"
31.\" $FreeBSD$
32.\"
33.Dd May 29, 2011
34.Dt VGE 4
35.Os
36.Sh NAME
37.Nm vge
38.Nd "VIA Networking Technologies Velocity Gigabit Ethernet adapter driver"
39.Sh SYNOPSIS
40To compile this driver into the kernel,
41place the following lines in your
42kernel configuration file:
43.Bd -ragged -offset indent
44.Cd "device miibus"
45.Cd "device vge"
46.Ed
47.Pp
48Alternatively, to load the driver as a
49module at boot time, place the following line in
50.Xr loader.conf 5 :
51.Bd -literal -offset indent
52if_vge_load="YES"
53.Ed
54.Sh DESCRIPTION
55The
56.Nm
57driver provides support for various NICs and embedded Ethernet interfaces
58based on the VIA Technologies VT6120, VT6122, VT6130 and VT6132 Velocity
59Family Gigabit Ethernet controller chips.
60.Pp
61The VT6120/VT6122 is a 33/66MHz 64-bit PCI device which combines a tri-speed
62MAC with an integrated 10/100/1000 copper PHY.
63(Some older cards use an external PHY.)
64The VT6130/VT6132 is the PCI express version of Velocity family.
65The MAC supports TCP/IP hardware
66checksums (IPv4 only), TCP large send, VLAN tag insertion and stripping,
67as well as VLAN filtering, a 64-entry CAM filter and a 64-entry VLAN filter,
6864-bit multicast hash filter, 4 separate transmit DMA queues, flow control
69and jumbo frames (not on VT6130/VT6132) up to 16K in size.
70The Velocity family controllers have a 16K receive FIFO and 48K transmit FIFO.
71.Pp
72The
73.Nm
74driver takes advantage of the controller's checksum offload and VLAN
75tagging features, as well as the jumbo frame (except VT6130/VT6132) and CAM
76filter support.
77The CAM filter is used for multicast address filtering to provide
7864 perfect multicast address filter support.
79If it is necessary for the interface to join more than 64 multicast
80groups, the driver will switch over to using the hash filter.
81.Pp
82The jumbo frame support can be enabled by setting the interface MTU
83to any value larger than the default of 1500 bytes, up to a maximum
84of 9000 bytes.
85Jumbo frames are disabled on the VT6130/VT6132 controllers because the TX
86MAC will hang when trying to send a frame that is larger than 4K.
87The receive and transmit checksum offload support
88can be toggled on and off using the
89.Xr ifconfig 8
90utility.
91.Pp
92The
93.Nm
94driver supports the following media types:
95.Bl -tag -width ".Cm 10baseT/UTP"
96.It Cm autoselect
97Enable autoselection of the media type and options.
98The user can manually override
99the autoselected mode by adding media options to
100.Xr rc.conf 5 .
101.It Cm 10baseT/UTP
102Set 10Mbps operation.
103The
104.Xr ifconfig 8
105.Cm mediaopt
106option can also be used to select either
107.Cm full-duplex
108or
109.Cm half-duplex
110modes.
111.It Cm 100baseTX
112Set 100Mbps (Fast Ethernet) operation.
113The
114.Xr ifconfig 8
115.Cm mediaopt
116option can also be used to select either
117.Cm full-duplex
118or
119.Cm half-duplex
120modes.
121.It Cm 1000baseTX
122Set 1000baseTX operation over twisted pair.
123The
124.Xr ifconfig 8
125.Cm mediaopt
126option can also be used to select either
127.Cm full-duplex
128or
129.Cm half-duplex
130modes.
131.El
132.Pp
133The
134.Nm
135driver supports the following media options:
136.Bl -tag -width ".Cm full-duplex"
137.It Cm full-duplex
138Force full duplex operation.
139.It Cm half-duplex
140Force half duplex operation.
141.El
142.Pp
143For more information on configuring this device, see
144.Xr ifconfig 8 .
145.Sh HARDWARE
146The
147.Nm
148driver supports VIA Networking VT6120, VT6122, VT6130 and VT6132 based
149Gigabit Ethernet adapters including:
150.Pp
151.Bl -bullet -compact
152.It
153VIA Networking LAN-on-motherboard Gigabit Ethernet
154.It
155ZyXEL GN650-T 64-bit PCI Gigabit Ethernet NIC (ZX1701)
156.It
157ZyXEL GN670-T 32-bit PCI Gigabit Ethernet NIC (ZX1702)
158.El
159.Sh LOADER TUNABLES
160Tunables can be set at the
161.Xr loader 8
162prompt before booting the kernel or stored in
163.Xr loader.conf 5 .
164.Bl -tag -width "xxxxxx"
165.It Va hw.vge.msi_disable
166This tunable disables MSI support on the Ethernet hardware.
167The default value is 0.
168.El
169.Sh SYSCTL VARIABLES
170The following variables are available as both
171.Xr sysctl 8
172variables and
173.Xr loader 8
174tunables:
175.Bl -tag -width "xxxxxx"
176.It Va dev.vge.%d.int_holdoff
177Maximum number of time to delay interrupts.
178The valid range is 0 to 5100 in units of 1us, the default is
179150 (150us).
180The resolution of timer is about 20us so finer tuning than
18120us wouldn't be available.
182The interface should be brought down and up again before a change
183takes effect.
184.It Va dev.vge.%d.rx_coal_pkt
185Maximum number of packets to fire Rx completion interrupt.
186The valid range is 1 to 255, the default is 64.
187.It Va dev.vge.%d.tx_coal_pkt
188Maximum number of packets to fire Tx completion interrupt.
189The valid range is 1 to 255, the default is 128.
190.El
191.Sh DIAGNOSTICS
192.Bl -diag
193.It "vge%d: couldn't map memory"
194A fatal initialization error has occurred.
195.It "vge%d: couldn't map ports"
196A fatal initialization error has occurred.
197.It "vge%d: couldn't map interrupt"
198A fatal initialization error has occurred.
199.It "vge%d: failed to enable memory mapping!"
200The driver failed to initialize PCI shared memory mapping.
201This might
202happen if the card is not in a bus-master slot.
203.It "vge%d: watchdog timeout"
204The device has stopped responding to the network, or there is a problem with
205the network connection (cable).
206.El
207.Sh SEE ALSO
208.Xr altq 4 ,
209.Xr arp 4 ,
210.Xr miibus 4 ,
211.Xr netintro 4 ,
212.Xr ng_ether 4 ,
213.Xr polling 4 ,
214.Xr vlan 4 ,
215.Xr ifconfig 8
216.Sh HISTORY
217The
218.Nm
219device driver first appeared in
220.Fx 5.3 .
221.Sh AUTHORS
222The
223.Nm
224driver was written by
225.An Bill Paul Aq Mt wpaul@windriver.com .
226