Devices nge(7D)
NAME
nge - Gigabit Ethernet driver for Nvidia Gigabit family of
network interface controllersSYNOPSIS
/dev/nge
DESCRIPTION
The nge Gigabit Ethernet driver is a multi-threaded, load-
able, clonable, GLD v3-based STREAMS driver supporting
the Data Link Provider Interface dlpi(7P), on Nvidia ck8-
04/mcp55/mcp51 Gigabit Ethernet controllers. The controller is a Mac chipset that works with PHY functions and providesthree-speed (copper) Ethernet operation on the RJ-45 connec-
tors.The nge driver functions include controller initialization,
frame transmit and receive, promiscuous and multicast sup-
port, and error recovery and reporting.The nge driver and hardware support auto-negotiation, a pro-
tocol specified by the 1000 Base-T standard. Auto-
negotiation allows each device to advertise its capabilities and discover those of its peer (link partner). The highest common denominator supported by both link partners is automatically selected, yielding the greatest availablethroughput while requiring no manual configuration. The nge
driver also allows you to configure the advertised capabili-
ties to less than the maximum (where the full speed of the interface is not required), or to force a specific mode of operation, irrespective of the link partner's advertised capabilities. APPLICATION PROGRAMMING INTERFACEThe cloning, character-special device /dev/nge is used to
access all nge devices.
The nge driver is dependent on /kernel/misc/mac, a loadable
kernel module that provides the DLPI and STREAMS functional-
ity required of a LAN driver. See gld(7D) for more details on supported primitives.You must send an explicit DL_ATTACH_REQ message to associate
the opened stream with a particular device (PPA). The PPA IDis interpreted as an unsigned integer data type and indi-
cates the corresponding device instance (unit) number. Thedriver returns an error (DL_ERROR_ACK) if the PPA field
SunOS 5.11 Last change: 10 Mar 2010 1
Devices nge(7D)
value does not correspond to a valid device instance number for the system. The device is initialized on first attachand de-initialized (stopped) at last detach.
The values returned by the driver in the DL_INFO_ACK primi-
tive in response to the DL_INFO_REQ are as follows:
o Maximum SDU (with jumbo frame) is 9000. (ETHERMTU -
defined in. o Minimum SDU is 68. o DSLAP address length is 8 bytes. o MAC type is DL_ETHER.
o SAP length value is -2 meaning the physical
address component is followed immediately by a 2-
byte sap component within the DLSAP address.o Broadcast address value is Ethernet/IEEE broadcast address (FF:FF:FF:FF:FF:FF).
Once in the DL_ATTACHED state, you must send a DL_BIND_REQ
to associate a particular Service Access Point (SAP) with the stream. CONFIGURATIONBy default, the nge driver performs auto-negotiation to
select the link speed and mode. Link speed and mode can be any one of the following, (as described in the IEEE803.2 standard):1000 Mbps, full-duplex.
1000 Mbps, half-duplex.
100 Mbps, full-duplex.
100 Mbps, half-duplex.
10 Mbps, full-duplex.
SunOS 5.11 Last change: 10 Mar 2010 2
Devices nge(7D)
10 Mbps, half-duplex.
The auto-negotiation protocol automatically selects speed
(1000 Mbps, 100 Mbps, or 10 Mbps) and operation mode (full-
duplex or half-duplex) as the highest common denominator
supported by both link partners. Because the nge device sup-
ports all modes, the effect is to select the highest throughput mode supported by the other device. Alternatively, you can set the capabilities advertised bythe nge device using dladm(1M). The driver supports a number
of parameters whose names begin with enable (see below). Each of these parameters contains a boolean value thatdetermines whether the device advertises that mode of opera-
tion. If en_autoneg_cap is set to 0, the driver forces the
mode of operation selected by the first non-zero parameter
in priority order as listed below: (highest priority/greatest throughput)en_1000fdx_cap 1000Mbps full duplex
en_1000hdx_cap 1000Mpbs half duplex
en_100fdx_cap 100Mpbs full duplex
en_100hdx_cap 100Mpbs half duplex
en_10fdx_cap 10Mpbs full duplex
en_10hdx_cap 10Mpbs half duplex
(lowest priority/least throughput)For example, to prevent the device 'nge2' from advertising
gigabit capabilities, enter (as super-user):
# dladm set-linkprop -p en_1000fdx_cap=0 nge2
All capabilities default to enabled. Note that changing any capability parameter causes the link to go down while the link partners renegotiate the link speed/duplex using thenewly changed capabilities.
You can obtain the current parameters settings using dladmshow-linkprop. In addition, the driver exports the current
state, speed, duplex setting and working mode of the link via kstat parameters (which are read only and can not bechanged). For example, to check link state of device nge0:
# dladm show-linkprop -p state nge1
LINK PROPERTY VALUE DEFAULT POSSIBLESunOS 5.11 Last change: 10 Mar 2010 3
Devices nge(7D)
nge1 state up up up,down
# dladm show-linkprop -p speed nge0
LINK PROPERTY VALUE DEFAULT POSSIBLEnge1 speed 100 -- 10,100,1000
# dladm show-linkprop -p duplex nge1
LINK PROPERTY VALUE DEFAULT POSSIBLEnge1 duplex full full half,full
# dladm show-linkprop -p flowctrl nge1
LINK PROPERTY VALUE DEFAULT POSSIBLEnge1 flowctrl no bi no,tx,rx,bi
The output above indicates that the link is up and runningat 100Mbps full-duplex with its rx/tx direction pause capa-
bility. In addition, the driver exports its working mode byloop_mode. If it is set to 0, the loopback mode is disabled.
Only MCP55/CK804 chipsets accept the Maximum MTU upper to
9000 bytes. Use default_mtu to set in /kernel/drv/nge.conf
file, then reboot to make it available. The default MTUvalue is 1500. For MCP55/CK804 chipsets, nge provides one
option of minimal memory usage. Use minimal-memory-usage = 1
in the /kernel/drv/nge.conf file, then reboot to make it
available. With this option, the nge driver can reduce
memory usage by two thirds. Note that setting minimal-
memory-usage = 1 does not take effect if MTU is increased
above the default value. To avoid problems, do not set theminimal-memory-usage and default_mtu options together in the
nge.conf file.
FILES/dev/nge nge special character device.
/kernel/drv/nge 32-bit ELF Kernel module (x86).
/kernel/drv/amd64/nge 64-bit ELF Kernel module (x86).
/kernel/drv/nge.conf Driver configuration file.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:SunOS 5.11 Last change: 10 Mar 2010 4
Devices nge(7D)
____________________________________________________________
| ATTRIBUTE TYPE ATTRIBUTE VALUE |
| Architecture x86 ||___________________________________________________________|
SEE ALSO
dladm(1M), ndd(1M), attributes(5), gld(7D), streamio(7I), dlpi(7P) Writing Device Drivers STREAMS Programming Guide Network Interfaces Programmer's GuideSunOS 5.11 Last change: 10 Mar 2010 5