Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Devicesge(7D)


NAME

 ge - GEM Gigabit-Ethernet device driver

SYNOPSIS

 
/dev/ge 

DESCRIPTION

 

The ge Gigabit-Ethernet driver is a multi-threaded, loadable, clonable, STREAMS hardware driver supporting the connectionless Data Link Provider Interface, dlpi(7P) over GEM, SBus and PCI Gigabit-Ethernet add-in adapters. Multiple GEM-based adapters installed within the system are supported 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) devices. 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 transceiver. The GEM ASIC provides the appropriate bus interface, MAC functions and physical code sub-layer (PCS) functions. The external SERDES connects to a fiber transceiver and provides the physical connection.

The 1000Base-SX standard specifies an auto-negotiation protocol to automatically select the mode of operation. In addition to duplex operation, the GEM ASIC can auto-negotiate for IEEE 802.3x frame based flow control capabilities. 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 INTERFACE

 

The 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 <sys/dlpi.h>. Refer to dlpi(7P) for more information.

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 attach and de-initialized (stopped) upon last detach.

The values returned by the driver in the DL_INFO_ACK primitive in response to the DL_INFO_REQ are:

  • Maximum SDU is 1500 (ETHERMTU - defined in <sys/ethernet.h> ).
  • Minimum SDU is 0.
  • dlsap address length is 8.
  • MAC type is DL_ETHER.
  • sap length value is -2, meaning the physical address component is followed immediately by a 2 byte sap component within the DLSAP address.
  • Service mode is DL_CLDLS.
  • Quality of service (QOS) is not supported; accordingly, QOS fields are 0.
  • Provider style is DL_STYLE2.
  • Version is DL_VERSION_2.
  • 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) with the 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 a type 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 will be duplicated and routed up multiple streams as DL_UNITDATA_IND messages.

In transmission, the driver checks the sap field of the DL_BIND_REQ to determine if the sap value is 0 and the destination 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 subsequent 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 DLSAP address. Applications should not hard code to this particular 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 the DL_INFO_ACK. The physical address length can be computed by subtracting the sap length from the full DLSAP address length 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 the Ethernet type as DL_UNITDATA_IND messages. Received Ethernet frames are duplicated and routed up multiple open streams if necessary. The DLSAP address contained within the DL_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 iteratively created and modified on a per-stream basis using these primitives. The DL_ENABMULTI_REQ and DL_DISABMULTI_REQ primitives are accepted by the driver in any state following DL_ATTACHED.

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 on the 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 with the DL_PROMISC_MULTI flag set, this enables/disables reception of all multicast group addresses. The effect of each is always 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 Ethernet address currently associated (attached) to the stream in the 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 Ethernet 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 the DL_ERROR_ACK. The DL_SET_PHYS_ADDR_REQ primitive is destructive and affects all other current and future streams attached 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 subsequently opened and attached to the device will obtain the new 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:

  • 1000 Mbps, full-duplex
  • 1000 Mbps, half-duplex
  • Symmetric pause
  • Asymmetric pause

Speeds and modes are described in the 1000Base-TX standard.

The auto-negotation protocol automatically selects:

  • Operation mode (half-duplex or full-duplex)
  • Flow control capability (Symmetric and/or Asymmetric)

The auto-negotiation protocol:

  • Gets all the modes of operation supported by the link partner.
  • Advertises its capabilities to the link partner.
  • 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 operating modes listed above. The PCS also supports forced-mode of operation under which the driver can select the mode of operation and flow control capabilities using the ndd utility.

The GEM device also supports programmable Inter-Packet Gap (IPG) parameters ipg1 and ipg2. By default, the driver sets ipg1 to 8 byte-times and ipg2 to 4 byte-times, (the standard 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 transceiver status, current link status, inter-packet gap, PCS capabilities and link partner capabilities.

The PCS has two set of capabilities. One set reflects the capabilities 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
/kernel/drv/ge.conf
System wide default device driver properties

SEE ALSO

 

ndd(1M), netstat(1M), driver.conf(4), dlpi(7P), le(7D), hme(7D), qfe(7D)


SunOS 5.9Go To TopLast Changed 10 Oct 2000

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.