Devices ge(7D)
NAME
ge - GEM Gigabit-Ethernet device driver
SYNOPSIS
/dev/ge
DESCRIPTION
The ge Gigabit-Ethernet driver is a multi-threaded, load-
able, clonable, STREAMS hardware driver supporting the con-
nectionless Data Link Provider Interface, dlpi(7P) overGEM, SBus and PCI Gigabit-Ethernet add-in adapters. Multi-
ple GEM-based adapters installed within the system are sup-
ported by the driver. The ge driver provides basic support
for the GEM-based Ethernet hardware and handles the
SUNW,sbus-gem (SBus GEM) and pci108e,2bad (PCI GEM) dev-
ices. Functions include chip initialization, frame transmit and receive, multicast and promiscuous support, and error recovery and reporting.The GEM device provides 1000BASE-SX networking interfaces
using the GEM ASIC external SERDES and fiber optical tran-
sceiver. The GEM ASIC provides the appropriate bus inter-
face, MAC functions and physical code sub-layer (PCS) func-
tions. The external SERDES connects to a fiber transceiver and provides the physical connection.The 1000Base-SX standard specifies an auto-negotiation pro-
tocol to automatically select the mode of operation. Inaddition to duplex operation, the GEM ASIC can auto-
negotiate for IEEE 802.3x frame based flow control capabili-
ties. The GEM PCS is capable of performing auto-negotiation
using the remote (or link partner) link end and receives the capabilities of the remote end. It selects the highest common demoninator mode of operation based on priorities.The ge driver also supports forced-mode operation under
which the driver selects the mode of operation. APPLICATION PROGRAMMING INTERFACEThe cloning character-special device /dev/ge is used to
access all ge controllers installed within the system.
ge and DLPI
The ge driver is a Style 2 data link service provider. All
M_PROTO and M_PCPROTO type messages are interpreted as DLPI
primitives. Valid DLPI primitives are defined in. Refer to dlpi(7P) for more information. SunOS 5.11 Last change: 10 Oct 2000 1
Devices ge(7D)
You must send an explicit DL_ATTACH_REQ message to associate
the opened stream with a particular device (ppa). The ppa ID is interpreted as an unsigned long data type and indicates the corresponding device instance (unit) number. An error(DL_ERROR_ACK) is returned by the driver if the ppa field
value does not correspond to a valid device instance number for the system. The device is initialized on first attachand de-initialized (stopped) upon last detach.
The values returned by the driver in the DL_INFO_ACK primi-
tive in response to the DL_INFO_REQ are:
o Maximum SDU is 1500 (ETHERMTU - defined in
). o Minimum SDU is 0. o dlsap address length is 8. 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 Service mode is DL_CLDLS.
o Quality of service (QOS) is not supported; accord-
ingly, QOS fields are 0.o Provider style is DL_STYLE2.
o Version is DL_VERSION_2.
o Broadcast address value is Ethernet/IEEE broadcast address (0xFFFFFF).
Once in the DL_ATTACHED state, you must send a DL_BIND_REQ
to associate a particular Service Access Pointer (SAP) withthe stream. The ge driver interprets the sap field within
the DL_BIND_REQ as an Ethernet type; accordingly, valid
values for the sap field are in the [0-0xFFFF] range. Only
one Ethernet type can be bound to the stream at any time. If you select a sap with a value of 0, the receiver will be in 802.3 mode. All frames received from the media with atype field in the range [0-1500] are assumed to be 802.3
frames and are routed up all open streams bound to sap value 0. If more than one stream is in 802.3 mode, the frame willSunOS 5.11 Last change: 10 Oct 2000 2
Devices ge(7D)
be duplicated and routed up multiple streams asDL_UNITDATA_IND messages.
In transmission, the driver checks the sap field of theDL_BIND_REQ to determine if the sap value is 0 and the des-
tination type field is in the range [0-1500]. If either is
true, the driver computes the length of the message, not
including initial M_PROTO mblk (message block), of all sub-
sequent DL_UNITDATA_REQ messages and transmits 802.3 frames
of that value in the MAC frame header length field.The ge driver DLSAP address format consists of the 6 byte
physical (Ethernet) address component followed immediately by the 2 byte sap (type) component producing an 8 byte DLSAPaddress. Applications should not hard code to this particu-
lar implementation-specific DLSAP address format, but use
information returned in the DL_INFO_ACK primitive to compose
and decompose DLSAP addresses. The sap length, full DLSAP length and sap physical ordering are included within theDL_INFO_ACK. The physical address length can be computed by
subtracting the sap length from the full DLSAP addresslength or by issuing the DL_PHYS_ADDR_REQ to obtain the
current physical address associated with the stream.Once in the DL_BOUND state, you may transmit frames on the
Ethernet by sending DL_UNITDATA_REQ messages to the ge
driver. The ge driver will route received Ethernet frames up
all open and bound streams having a sap which matches theEthernet type as DL_UNITDATA_IND messages. Received Ether-
net frames are duplicated and routed up multiple open streams if necessary. The DLSAP address contained within theDL_UNITDATA_REQ and DL_UNITDATA_IND messages consists of
both the sap (type) and physical (Ethernet) components.In addition to the mandatory connectionless DLPI message
set, the driver additionally supports ge primitives.
ge Primitives
The DL_ENABMULTI_REQ and DL_DISABMULTI_REQ primitives
enable/disable reception of individual multicast group addresses. A set of multicast addresses may be iterativelycreated and modified on a per-stream basis using these prim-
itives. The DL_ENABMULTI_REQ and DL_DISABMULTI_REQ primi-
tives are accepted by the driver in any state followingDL_ATTACHED.
SunOS 5.11 Last change: 10 Oct 2000 3
Devices ge(7D)
With the DL_PROMISC_PHYS flag set in the dl_level field, the
DL_PROMISCON_REQ and DL_PROMISCOFF_REQ primitives
enable/disable reception of all promiscuous mode frames onthe media including frames generated by the local host. When
used with the DL_PROMISC_SAP flag set, this enables/disables
reception of all sap (Ethernet type) values. When used withthe DL_PROMISC_MULTI flag set, this enables/disables recep-
tion of all multicast group addresses. The effect of each isalways on a per-stream basis and independent of the other
sap and physical level configurations on the stream or other streams.The DL_PHYS_ADDR_REQ primitive returns the six octet Ether-
net address currently associated (attached) to the stream inthe DL_PHYS_ADDR_ACK primitive. This primitive is valid
only in states following a successful DL_ATTACH_REQ.
The DL_SET_PHYS_ADDR_REQ primitive changes the 6 octet Eth-
ernet address currently associated (attached) to the stream. The credentials of the process which originally opened the stream must be superuser or EPERM is returned in theDL_ERROR_ACK. The DL_SET_PHYS_ADDR_REQ primitive is destruc-
tive and affects all other current and future streamsattached to this device. A M_ERROR is sent up all other
streams attached to the device when DL_SET_PHYS_ADDR_REQ is
successful on the stream. Once changed, all streams subse-
quently opened and attached to the device will obtain thenew physical address. Once changed, the physical address
will remain until DL_SET_PHYS_ADDR_REQ is used to change the
physical address again or the system is rebooted, whichever comes first.ge DRIVER
By default, the ge driver performs auto-negotiation to
select the mode and flow control capabilities of the link. The link can be in one of the following modes:o 1000 Mbps, full-duplex
o 1000 Mbps, half-duplex
o Symmetric pause o Asymmetric pauseSpeeds and modes are described in the 1000Base-TX standard.
SunOS 5.11 Last change: 10 Oct 2000 4
Devices ge(7D)
The auto-negotation protocol automatically selects:
o Operation mode (half-duplex or full-duplex)
o Flow control capability (Symmetric and/or Asym-
metric)The auto-negotiation protocol:
o Gets all the modes of operation supported by the link partner. o Advertises its capabilities to the link partner. o Selects the highest common denominator mode of operation based on the priorities.When by default, auto-negotiation is used to bring up the
link and select the common mode of operation with the link partner, the GEM hardware is capable of all of the operatingmodes listed above. The PCS also supports forced-mode of
operation under which the driver can select the mode ofoperation and flow control capabilities using the ndd util-
ity.The GEM device also supports programmable Inter-Packet Gap
(IPG) parameters ipg1 and ipg2. By default, the driver setsipg1 to 8 byte-times and ipg2 to 4 byte-times, (the stan-
dard values.) You may want to alter these values from the standard 1000 Mpbs IPG set to 0.096 microseconds.ge Parameter List
You can use the ge driver to set and get parameters for the
GEM device. The parameter list includes current transceiverstatus, current link status, inter-packet gap, PCS capabili-
ties and link partner capabilities. The PCS has two set of capabilities. One set reflects thecapabilities of the hardware and are read-only. The second
set are read/write and are used in speed selection and reflect the values you choose. At boot time, both sets will be the same. The link partner capabilities are read only and cannot be modified. FILES/dev/ge ge special character device
SunOS 5.11 Last change: 10 Oct 2000 5
Devices ge(7D)
/kernel/drv/ge.conf System wide default device driver
propertiesSEE ALSO
ndd(1M), netstat(1M), driver.conf(4), dlpi(7P), hme(7D), qfe(7d)SunOS 5.11 Last change: 10 Oct 2000 6