[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Kernel Extensions and Device Support Programming Concepts
Ethernet Device Drivers
The following Ethernet device drivers are dynamically
loadable. The device drivers are automatically loaded into the system at device
configuration time as part of the configuration process.
- PCI Ethernet Adapter Device Driver (22100020)
- 10/100Mbps Ethernet PCI Adapter Device Driver (23100020)
- 10/100Mbps Ethernet PCI Adapter II Device Driver (1410ff01)
- Gigabit Ethernet-SX PCI Adapter Device Driver (14100401)
- Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802)
- 10/100/1000 Base-T Ethernet PCI-X Adapter Device Driver (14106902)
The following information is provided about each of the ethernet device
drivers:
For each Ethernet device, the interface to the device driver is achieved
by calling the entry points for opening, closing, transmitting data, and issuing
device control commands.
There are a number of Ethernet device drivers in use. All drivers provide
PCI-based connections to an Ethernet network, and support both Standard and
IEEE 802.3 Ethernet Protocols.
The PCI Ethernet Adapter Device Driver (22100020) supports the PCI Ethernet
BNC/RJ-45 Adapter (feature 2985) and the PCI Ethernet BNC/AUI Adapter (feature
2987), as well as the integrated ethernet port on certain systems.
The 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020) supports
the 10/100 Mbps Ethernet PCI Adapter (feature 2968) and the Four Port 10/100
Mbps Ethernet PCI Adapter (features 4951 and 4961), as well as the integrated
ethernet port on certain systems.
The 10/100 Mpbs Ethernet PCI Adapter II Device Driver (1410ff01) supports
the 10/100 Mbps Ethernet PCI Adapter II (feature 4962), as well as the integrated
ethernet port on certain systems.
The Gigabit Ethernet-SX PCI Adapter Device Driver (14100401) supports the
Gigabit Ethernet-SX PCI Adapter (feature 2969) and the 10/100/1000 Base-T
Ethernet Adapter (feature 2975).
The Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802) supports
the Gigabit Ethernet-SX PCI-X Adapter (feature 5700).
The 10/100/1000 Base-TX Ethernet PCI-X Adapter Device Driver (14106902)
supports the 10/100/1000 Base-TX Ethernet PCI-X Adapter (feature 5701).
Configuration Parameters
The following configuration parameter is supported
by all Ethernet device drivers:
- Alternate Ethernet Addresses
- The device drivers support the device's hardware address as the network
address or an alternate network address configured through software. When
an alternate address is used, any valid Individual Address can be used. The
least significant bit of an Individual Address must be set to zero. A multicast
address can not be defined as a network address. Two configuration parameters
are provided to provide the alternate Ethernet address and enable the alternate
address.
PCI Ethernet Device Driver (22100020)
The PCI Ethernet Device Driver (22100020) supports the following additional
configuration parameters:
- Full Duplex
- Indicates whether the adapter is operating in full-duplex or half-duplex
mode. If this field is set to yes, the device driver programs the adapter
to be in full-duplex mode.
- Hardware Transmit Queue
- Specifies the actual queue size the adapter uses to transmit packets.
Each element corresponds to an Ethernet packet. It is configurable at 16,
32, 64, 1 28, and 256 elements.
- Hardware Receive Queue
- Specifies the actual queue size the adapter uses to receive packets.
Each element corresponds to an Ethernet packet. It is configurable at 16,
32, 64, 128, and 256 elements.
10/100 Mbps Ethernet PCI Adapter Device Driver (23100020)
The 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020) supports
the following additional configuration parameters:
- Software Transmit Queue
- Indicates the number of transmit requests that can be queued for transmission
by the device driver. Valid values range from 16 through 16384.
- Hardware Receive Queue
- The 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020) supports
a user-configurable receive queue for the adapter. This is the actual queue
the adapter uses to receive packets. Each element corresponds to an Ethernet
packet. It is configurable at 16, 32, 64, 128, and 256 elements.
- Receive Buffer Pool
- The 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020) implements
a private pool of receive memory buffers in order to enhance driver performance.
The number of private receive buffers reserved by the driver is configurable
from 16 to 2048 elements.
- Media Speed
- The 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020) supports
a user-configurable media speed for the adapter. The media speed attribute
indicates the speed at which the adapter will attempt to operate. The available
speeds are 10 Mbps half-duplex, 10 Mbps full-duplex, 100 Mbps half-duplex,
100 Mbps full-duplex and auto-negotiation, with a default of auto-negotiation.
Select auto-negotiate when the adapter should use auto-negotiation across
the network to determine the speed. When the network will not support auto-negotiation, select
the specific speed.
Note
If auto-negotiation is selected, the remote
link device must also be set to auto-negotiate or the link might not function
properly.
- Inter Packet Gap
- The 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020) supports
a user-configurable inter packet gap for the adapter. The inter packet gap
attribute controls the aggressiveness of the adapter on the network. A small
number will increase the aggressiveness of the adapter, but a large number
will decrease the aggressiveness (and increase the fairness) of the adapter.
A small number (more aggressive) could cause the adapter to capture the network
by forcing other less aggressive nodes to defer. A larger number (less aggressive) might
cause the adapter to defer more often than normal. If the statistics for
other nodes on the network show a large number of collisions and deferrals,
then try increasing this number. The default is 96, which results in IPG
of 9.6 micro seconds for 10 Mbps and 0.96 microseconds for 100 Mbps media
speed. Each unit of bit rate introduces an IPG of 100 nsec at 10 Mbps, and
10 nsec at 100 Mbps media speed.
- Link Polling Timer
- The 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020) implements
a polling function that periodically queries the adapter to determine whether
the ethernet link is up or down. If this function is enabled, the link polling
timer value indicates how often the driver should poll the adapter for link
status. This value can range from 100 to 1000 milliseconds.
10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01)
The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) supports
the following additional configuration parameters:
- Software Transmit Queue
- Indicates the number of transmit requests that can be queued for transmission
by the device driver. Valid values range from 512 through 16384.
- Hardware Transmit Queue
- The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) supports
a user-configurable transmit queue for the adapter. This is the actual queue
the adapter uses to transmit packets. Each element corresponds to an Ethernet
packet. It is configurable from 100 to 1024 elements.
- Hardware Receive Queue
- The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) supports
a user-configurable receive queue for the adapter. This is the actual queue
the adapter uses to receive packets. Each element corresponds to an Ethernet
packet. It is configurable from 100 to 1024 elements.
- Receive Buffer Pool
- The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) implements
a private pool of receive memory buffers in order to enhance driver performance.
The number of private receive buffers reserved by the driver is configurable
from 512 to 2048 elements.
- Media Speed
- The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) supports
a user-configurable media speed for the adapter. The media speed attribute
indicates the speed at which the adapter will attempt to operate. The available
speeds are 10 Mbps half-duplex, 10 Mbps full-duplex, 100 Mbps half-duplex,
100 Mbps full-duplex and auto-negotiation, with a default of auto-negotiation.
Select auto-negotiate when the adapter should use auto-negotiation across
the network to determine the speed. When the network will not support auto-negotiation, select
the specific speed.
Note
If auto-negotiation is selected, the remote
link device must also be set to auto-negotiate or the link might not function
properly.
- Link Polling Timer
- The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) implements
a polling function which periodically queries the adapter to determine whether
the ethernet link is up or down. If this function is enabled, the link polling
timer value indicates how often the driver should poll the adapter for link
status. This value can range from 100 to 1000 milliseconds.
- RX Checksum Offload
- The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) supports
the capability of the adapter to calculate TCP checksums in hardware. If
this capability is enabled, the TCP checksum calculation will be performed
on the adapter instead of the host, which may increase system performance.
Allowed values are yes and no.
- Transmit TCP Resegmentation Offload
- The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) supports
the capability of the adapter to perform resegmentation of transmitted TCP
segments in hardware. This capability enables the host to use TCP segments
that are larger than the actual MTU size of the ethernet link, which may increase
system performance. Allowed values are yes and no.
- IPsec Offload
- The 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01) supports
the capability of the adapter to perform IPsec cryptographic algorithms for
data encryption and authentication in hardware. This capability enables the
host to offload CPU-intensive cryptographic processing to the adapter, which
may increase system performance. Allowed values are yes and no.
Gigabit Ethernet-SX PCI Adapter Device Driver (14100401)
The Gigabit Ethernet-SX PCI Adapter Device Driver (14100401) supports the
following additional configuration parameters:
- Software Transmit Queue Size
- Indicates the number of transmit requests that can be queued for transmission
by the device driver. Valid values range from 512 through 2048.
- Transmit Jumbo Frames
- Setting this attribute to the yes value
indicates that frames up to 9018 bytes in length may be transmitted on this
adapter. If you specify the no value, the maximum
size of frames transmitted is 1518 bytes. Frames up to 9018 bytes in length
can always be received on this adapter.
- Enable Hardware Checksum Offload
- Setting this attribute to the yes value
indicates that the adapter calculates the checksum for transmitted and received
TCP frames. If you specify the no value, the checksum
will be calculated by the appropriate software.
Note
The mbuf describing a frame to be transmitted contains a flag that says if
the adapter should calculate the checksum for the frame.
- Media Speed
- The Gigabit Ethernet-SX PCI Adapter Device Driver (14100401) supports
a user-configurable media speed only for the IBM 10/100/1000 Base-T Ethernet
PCI adapter (feature 2975). For the Gigabit Ethernet-SX PCI Adapter (feature
2969), the only allowed choice is auto-negotiation. The media speed attribute
indicates the speed at which the adapter will attempt to operate. The available
speeds are 10 Mbps half-duplex, 10 Mbps full-duplex, 100 Mbps half-duplex,
100 Mbps full-duplex and auto-negotiation, with a default of auto-negotiation. Select
auto-negotiate when the adapter should use auto-negotiation across the network
to determine the speed. When the network will not support auto-negotiation,
select the specific speed.
Note
The auto-negotiation setting must
be selected in order for the adapter to run at 1000 Mbit/s.
- Enable Hardware Transmit TCP Resegmentation
- Setting this attribute to yes indicates that the adapter
should perform TCP resegmentation on transmitted TCP segments. This capability
allows TCP/IP to send larger datagrams to the adapter which can increase performance.
If no is specified, TCP resegmentation will not be performed.
Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802)
The Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802) supports
the following additional configuration parameters:
- Transmit descriptor queue size
- Indicates the number of transmit requests that can be queued for transmission
by the adapter. Valid values range from 128 to 1024.
- Receive descriptor queue size
- Indicates the maximum number of received ethernet packets the adapter
can hold in its buffer. Valid values range from 128 to 1024.
- Software Transmit Queue
- Indicates the number of transmit requests that can be queued for transmission
by the device driver. Valid values range from 512 through 16384.
- Media Speed
- The media speed attribute indicates the speed at which the adapter will
attempt to operate. The available speeds are 1000 Mbps full-duplex and auto-negotiation.
The default is auto-negotiation. Select auto-negotiate when the adapter should
use auto-negotiation across the network to determine the duplexity. When the
network will not support auto-negotiation, select 1000 Mbps full-duplex.
- Transmit TCP Resegmentation Offload
- Supports the capability of the adapter to perform resegmentation of
transmitted TCP segments in hardware. This capability enables the host to
use TCP segments that are larger than the actual MTU size of the ethernet
link, which may increase system performance. Allowed values are yes and no.
- Enable Hardware Checksum Offload
- Setting this attribute to the yes value indicates that the
adapter calculates the checksum for transmitted and received TCP frames. If
you specify the no value, the checksum will be calculated by the
appropriate software.
Note
The mbuf structure
that describes a transmitted frame contains a flag that indicates whether
the adapter should calculate the checksum for the frame.
10/100/1000 Base-T Ethernet PCI-X Adapter Device Driver (14106902)
The 10/100/1000 Base-T Ethernet PCI-X Adapter Device Driver (14106902)
supports the following additional configuration parameters:
- Transmit descriptor queue size
- Indicates the number of transmit requests that can be queued for transmission
by the adapter. Valid values range from 128 to 1024.
- Receive descriptor queue size
- Indicates the maximum number of received ethernet packets the adapter
can buffer. Valid values range from 128 to 1024.
- Software Transmit Queue
- Indicates the number of transmit requests that can be queued for transmission
by the device driver. Valid values range from 512 through 16384.
- Media Speed
- The media speed attribute indicates the speed at which the adapter
will attempt to operate. The available speeds are 10 Mbps half-duplex, 10
Mbps full-duplex, 100 Mbps half-duplex, 100 Mbps full-duplex and auto-negotiation,
with a default of auto-negotiation. Select auto-negotiate when the adapter
should use auto-negotiation across the network to determine the speed. When
the network will not support auto-negotiation, select the specific speed.
Note
1000 MBps half and full duplex are not valid values. As per the
IEEE 802.3z specification, gigabit speeds of any duplexity must be auto-negotiated
for copper (TX) based adapters. Please select auto-negotiation if these
speeds are desired.
- Transmit TCP Resegmentation Offload
- Supports the capability of the adapter to perform resegmentation
of transmitted TCP segments in hardware. This capability enables the host
to use TCP segments that are larger than the actual MTU size of the ethernet
link, which may increase system performance. Allowed values are yes and no.
- Enable Hardware Checksum Offload
- Setting this attribute to the yes value indicates that the adapter
calculates the checksum for transmitted and received TCP frames. If you specify
the no value, the checksum will be calculated by the appropriate software.
Note
The mbuf describing a frame to be transmitted contains a flag that
says if the adapter should calculate the checksum for the frame.
- Gigabit Backward Compatibility
- Older gigabit TX equipment may not be able to communicate to this adapter.
Some manufacturers produced hardware implementing the IEEE 802.3z auto-negotiation
algorithm incorrectly. As such, this option should be enabled if the adapter
is unable to communicate with your older gigabit equipment.
Note
Enabling this option forces the adapter to implement the IEEE 802.3z incorrectly.
As such, if it is enabled, it will not be able to communicate to newer equipment.
Only enable this if you are having trouble obtaining a link with auto-negotiation,
but can force a link at a slower speed (i.e. 100 full-duplex).
Interface Entry Points
Device Driver Configuration and Unconfiguration
The configuration entry points of the device drivers conform
to the guidelines for kernel object file entry points. These configuration
entry points are as follows:
- kent_config for the PCI Ethernet Device Driver (22100020)
- phxent_config for the 10/100 Mbps Ethernet PCI Adapter
Device Driver (23100020)
- scent_config for the 10/100 Mbps Ethernet PCI Adapter
II Device Driver (1410ff01)
- gxent_config for the Gigabit Ethernet-SX PCI Adapter
Device Driver (14100401)
- goent_config for the Gigabit Ethernet-SX PCI-X Adapter
Device Driver (14106802) and the 10/100/1000 Base-T Ethernet PCI-X Adapter
Device Driver (14106902)
Device Driver Open
The open entry point for the device drivers perform a synchronous open
of the specified network device.
The device driver issues commands to start the initialization of the device.
The state of the device now is OPEN_PENDING. The device driver invokes the
open process for the device. The open process involves a sequence of events
that are necessary to initialize and configure the device. The device driver
will do the sequence of events in an orderly fashion to make sure that one
step is finished executing on the adapter before the next step is continued.
Any error during these sequence of events will make the open fail. The device driver
requires about 2 seconds to open the device. When the whole sequence of events
is done, the device driver verifies the open status and then returns to the
caller of the open with a return code to indicate open success or open failure.
After the device has been successfully configured and connected to the
network, the device driver sets the device state to OPENED, the NDD_RUNNING flag in the NDD flags field is turned on. In the case of unsuccessful open, both
the NDD_UP and NDD_RUNNING flags
in the NDD flags field will be off and a non-zero error
code will be returned to the caller.
The open entry points are as follows:
- kent_open for the PCI Ethernet Device Driver (22100020)
- phxent_open for the 10/100 Mbps Ethernet PCI Adapter
Device Driver (23100020)
- scent_open for the 10/100 Mbps Ethernet PCI Adapter
II Device Driver (1410ff01)
- gxent_open for the Gigabit Ethernet-SX PCI Adapter
Device Driver (14100401)
- goent_open for the Gigabit Ethernet-SX PCI-X Adapter
Device Driver (14106802) and the 10/100/1000 Base-T Ethernet PCI-X Adapter
Device Driver (14106902).
Device Driver Close
The close entry point for the device drivers is called to close the specified
network device. This function resets the device to a known state and frees
system resources associated with the device.
The device will not be detached from the network until the device's transmit
queue is allowed to drain. That is, the close entry point will not return
until all packets have been transmitted or timed out. If the device is inoperable
at the time of the close, the device's transmit queue does not have to be
allowed to drain.
At the beginning of the close entry point, the device state will be set
to be CLOSE_PENDING. The NDD_RUNNING flag in the ndd_flags will be turned off. After
the outstanding transmit queue is all done, the device driver will start a
sequence of operations to deactivate the adapter and to free up resources.
Before the close entry point returns to the caller, the device state is set
to CLOSED.
The close entry points are as follows:
- kent_close for the PCI Ethernet Device Driver (22100020)
- phxent_close for the 10/100 Mbps Ethernet PCI Adapter
Device Driver (23100020)
- scent_close for the 10/100 Mbps Ethernet PCI Adapter
II Device Driver (1410ff01)
- gxent_close for the Gigabit Ethernet-SX PCI Adapter
Device Driver (14100401)
- goent_close for the Gigabit Ethernet-SX PCI-X Adapter
Device Driver (14106802) and the 10/100/1000 Base-T Ethernet PCI-X Adapter
Device Driver (14106902).
Data Transmission
The output entry point transmits data using the specified network device.
The data to be transmitted is passed into the device driver by way of mbuf structures. The first mbuf structure
in the chain must be of M_PKTHDR format. Multiple mbuf structures may be used to hold the frame. Link the mbuf structures using the m_next field
of the mbuf structure.
Multiple packet transmits are allowed with the mbufs being chained using
the m_nextpkt field of the mbuf structure.
The m_pkthdr.len field must be set to the total length
of the packet. The device driver does not support
mbufs from user memory (which have the M_EXT flag set).
On successful transmit requests, the device driver is responsible for freeing
all the mbufs associated with the transmit request. If the device driver
returns an error, the caller is responsible for the mbufs. If any of the
chained packets can be transmitted, the transmit is considered successful
and the device driver is responsible for all of the mbufs in the chain.
If the destination address in the packet is a broadcast address the M_BCAST flag in the m_flags field
should be set prior to entering this routine. A broadcast address is defined
as 0xFFFF FFFF FFFF. If the destination address in the packet is a multicast
address the M_MCAST flag in the m_flags field should be set prior to entering this routine. A multicast address
is defined as a non-individual address other than a broadcast address. The
device driver will keep statistics based upon the M_BCAST and M_MCAST flags.
For packets that are shorter than the Ethernet minimum MTU size (60 bytes),
the device driver will pad them by adjusting the transmit length to the adapter
so they can be transmitted as valid Ethernet packets.
Users will not be notified by the device driver about the status of the
transmission. Various statistics about data transmission are kept by the
driver in the ndd structure. These statistics will be
part of the data returned by the NDD_GET_STATS control
operation.
The output entry points are as follows:
- kent_output for the PCI Ethernet Device Driver (22100020)
- phxent_output for the 10/100 Mbps Ethernet PCI
Adapter Device Driver (23100020)
- scent_output for the 10/100 Mbps Ethernet PCI Adapter
II Device Driver (1410ff01)
- gxent_output for the Gigabit Ethernet-SX PCI Adapter
Device Driver (14100401)
- goent_output for the Gigabit Ethernet-SX PCI-X Adapter
Device Driver (14106802) and the 10/100/1000 Base-T Ethernet PCI-X Adapter
Device Driver (14106902).
Data Reception
When the Ethernet device drivers receive a valid packet from the network
device, the device drivers call the nd_receive function
that is specified in the ndd_t structure of the network
device. The nd_receive function is part of a CDLI network
demultiplexer. The packet is passed to the nd_receive function
in the form of a mbuf.
The Ethernet device drivers can pass multiple packets to the nd_receive function by chaining the packets together using the m_nextpkt field of the mbuf structure. The m_pkthdr.len field must be set to the total length of the
packet. If the source address in the packet is a broadcast address the M_BCAST flag in the m_flags field
should be set. If the source address in the packet is a multicast address
the M_MCAST flag in the m_flags field
should be set.
When the device driver initially configures the device to discard all invalid
frames. A frame is considered to be invalid for the following reasons:
- The packet is too short.
- The packet is too long.
- The packet contains a CRC error.
- The packet contains an alignment error.
If the asynchronous status for receiving invalid frames has been issued
to the device driver, the device driver will configure the device to receive
bad packets as well as good packets. Whenever a bad packet is received by
the driver, an asynchronous status block NDD_BAD_PKTS is
created and delivered to the appropriate user. The user must copy the contents
of the mbuf to another memory area. The user must not modify the contents
of the mbuf or free the mbuf. The device driver has the responsibility of
releasing the mbuf upon returning from nd_status.
Various statistics about data reception on the device will be kept by the
driver in the ndd structure. These statistics will be
part of the data returned by the NDD_GET_STATS and NDD_GET_ALL_STATS control operations.
There is no specified entry point for this function. The device informs
the device driver of a received packet via an interrupt. Upon determining
that the interrupt was the result of a packet reception, the device driver's
interrupt handler invoke the rx_handler completion routine
to perform the tasks mentioned above.
Asynchronous Status
When a status event occurs on the device, the Ethernet device drivers build
the appropriate status block and call the nd_status function
that is specified in the ndd_t structure of the network
device. The nd_status function is part of a CDLI network
demuxer.
The following status blocks are defined for the Ethernet device drivers.
Note
The PCI Ethernet Device Driver (22100020) only supports the
Bad Packets status block. The following device driver do not support asynchronous
status:
- 10/100 Mbit Ethernet PCI Adapter Device Driver (23100020)
- 10/100 Mbit Ethernet PCI Adapter II Device Driver (1410ff01)
- Gigabit Ethernet-SX PCI Adapter Device Driver(14100401)
- Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802)
- 10/100/1000 Base-T Ethernet PCI-X Adapter Device Driver (14106902)
- Hard Failure
- When a hard failure has occurred on the Ethernet device, the following
status blocks can be returned by the Ethernet device driver. These status
blocks indicates that a fatal error occurred.
- code
- Set to NDD_HARD_FAIL.
- option[0]
- Set to one of the reason codes defined in <sys/ndd.h> and <sys/cdli_entuser.h>.
- Enter Network Recovery Mode
- When the device driver has detected an error that requires initiating
recovery logic that will make the device temporarily unavailable, the following
status block is returned by the device driver.
- code
- Set to NDD_LIMBO_ENTER.
- option[0]
- Set to one of the reason codes defined in <sys/ndd.h> and <sys/cdli_entuser.h>.
Note
While the device driver is in this recovery logic, the
device might not be fully functional. The device driver will notify users
when the device is fully functional by way of an NDD_LIMBO_EXIT asynchronous status block.
- Exit Network Recovery Mode
- When the device driver has successfully completed recovery logic from
the error that made the device temporarily unavailable, the following status
block is returned by the device driver.
- code
- Set to NDD_LIMBO_EXIT.
- option[]
- The option fields are not used.
Note
The device is now fully functional.
-
-
- Network Device Driver Status
- When the device driver has status or event information to report, the
following status block is returned by the device driver.
- code
- Set to NDD_STATUS.
- option[0]
- Might be any of the common or interface type specific reason codes.
- option[]
- The remainder of the status block can be used to return additional status
information by the device driver.
- Bad Packets
- When the a bad packet has been received by a device driver (and a user
has requested bad packets), the following status block is returned by the
device driver.
- code
- Set to NDD_BAD_PKTS.
- option[0]
- Specifies the error status of the packet. These error numbers are defined
in <sys/cdli_entuser.h>.
- option[1]
- Pointer to the mbuf containing the bad packet.
- option[]
- The remainder of the status block can be used to return additional status
information by the device driver.
Note
The user will not own the mbuf
containing the bad packet. The user must copy the mbuf (and the status block
information if desired). The device driver will free the mbuf upon return
from the nd_status function.
- Device Connected
- When the device is successfully connected to the network the following
status block is returned by the device driver.
- code
- Set to NDD_CONNECTED.
- option[]
- The option fields are not used.
Note
Integrated Ethernet only.
Device Control Operations
The ndd_ctl entry point
is used to provide device control functions.
NDD_GET_STATS Device Control Operation
The NDD_GET_STATS command returns statistics concerning
the network device. General statistics are maintained by the device driver
in the ndd_genstats field in the ndd_t structure. The ndd_specstats field in the ndd_t structure is a pointer to media-specific and device-specific
statistics maintained by the device driver. Both sets of statistics are directly
readable at any time by those users of the device that can access them. This
command provides a way for any of the users of the device to access the general
and media-specific statistics.
The arg and length parameters
specify the address and length in bytes of the area where the statistics are
to be written. The length specified must be the exact
length of the general and media-specific statistics.
Note
The ndd_speclen field in the ndd_t structure plus the length of the ndd_genstats_t structure is the required length. The device-specific statistics might
change with each new release of the operating system, but the general and
media-specific statistics are not expected to change.
The user should pass in the ent_ndd_stats_t structure
as defined in sys/cdli_entuser.h. The driver fails a
call with a buffer smaller than the structure.
The statistics that are returned contain statistics obtained from the device.
If the device is inoperable, the statistics that are returned will not contain
the current device statistics. The copy of the ndd_flags field can be checked to determine the state of the device.
NDD_MIB_QUERY Device Control Operation
The NDD_MIB_QUERY operation is used to determine
which device-specific MIBs are supported on the network device. The arg and length parameters specify the address
and length in bytes of a device-specific MIB structure.
The device driver will fill every member of that structure with a flag indicating
the level of support for that member. The individual MIB variables that are not supported on the network device will be set to MIB_NOT_SUPPORTED. The individual MIB variables
that can only be read on the network device will be set to MIB_READ_ONLY. The individual MIB variables that
can be read and set on the network device will be set to MIB_READ_WRITE. The individual MIB variables that
can only be set (not read) on the network device will be set to MIB_WRITE_ONLY. These flags are defined in the /usr/include/sys/ndd.h file.
The arg parameter specifies the address of the ethernet_all_mib structure. This structure is defined in
the /usr/include/sys/ethernet_mibs.h file.
NDD_MIB_GET Device Control Operation
The NDD_MIB_GET operation is used to get all MIBs
on the specified network device. The arg and length parameters specify the address and length in bytes of the device
specific MIB structure. The device driver will set any unsupported variables
to zero (nulls for strings).
If the device supports the RFC 1229 receive address object, the corresponding
variable is set to the number of receive addresses currently active.
The arg parameter specifies the address of the ethernet_all_mib structure. This structure is defined in
the /usr/include/sys/ethernet_mibs.h file.
NDD_ENABLE_ADDRESS Device Control Operation
The NDD_ENABLE_ADDRESS command enables the receipt
of packets with an alternate (for example, multicast) address. The arg and length parameters specify the address
and length in bytes of the alternate address to be enabled. The NDD_ALTADDRS flag in the ndd_flags field is set.
The device driver verifies that if the address is a valid multicast address.
If the address is not a valid multicast address, the operation will fail with
an EINVAL error. If the address is valid, the driver
will add it to its multicast table and enable the multicast filter on the
adapter. The driver will keep a reference count for each individual address.
Whenever a duplicate address is registered, the driver simply increments the
reference count of that address in its multicast table, no update of the adapter's
filter is needed. There is a hardware limitation on the number of multicast
addresses in the filter.
NDD_DISABLE_ADDRESS Device Control Operation
The NDD_DISABLE_ADDRESS command disables the receiving
packets with a specified alternate (for example, multicast) address. The arg and length parameters specify
the address and length in bytes of the alternate address to be disabled.
The NDD_ALTADDRS flag in the ndd_flags field is reset if this is the last alternate address.
The device driver verifies that if the address is a valid multicast address.
If the address is not a valid multicast address, the operation will fail with
an EINVAL error. The device driver makes sure that the
multicast address can be found in its multicast table. Whenever a match is
found, the driver will decrement the reference count of that individual address
in its multicast table. If the reference count becomes 0, the driver will
delete the address from the table and update the multicast filter on the adapter.
NDD_MIB_ADDR Device Control Operation
The NDD_MIB_ADDR operation is used to get all the
addresses for which the specified device will accept packets or frames. The arg parameter specifies the address of the ndd_mib_addr_t structure. The length parameter specifies the length of
the structure with the appropriate number of ndd_mib_addr_t.mib_addr elements. This structure is defined in the /usr/include/sys/ndd.h file. If the length is less than the length of the ndd_mib_addr_t structure, the device driver returns EINVAL. If the structure is not large enough to hold all the addresses,
the addresses that fit will still be placed in the structure. The ndd_mib_addr_t.count field is set to the number of addresses returned
and E2BIG is returned.
One of the following address types is returned:
- Device physical address (or alternate address specified by user)
- Broadcast addresses
- Multicast addresses
NDD_CLEAR_STATS Device Control Operation
The counters kept by the device will be zeroed.
NDD_GET_ALL_STATS Device Control Operation
The NDD_GET_ALL_STATS operation is used to gather
all the statistics for the specified device. The arg parameter
specifies the address of the statistics structure for the particular device
type. The following structures are available:
- The kent_all_stats_t structure is available for
the PCI Ethernet Adapter Device Driver (22100020), and is defined in the cdli_entuser.h include file.
- The phxent_all_stats_t structure is available for
the 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020), and is defined
in the device-specific cdli_entuser.phxent.h include
file.
- The scent_all_stats_t structure is available for
the 10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01), and is defined
in the device-specific cdli_entuser.scent.h include
file.
- The gxent_all_stats_t structure is available for
the Gigabit Ethernet-SX PCI Adapter Device Driver (14100401), and is defined
in the device-specific cdli_entuser.gxent.h include
file.
- The goent_all_stats_t structure is available for
the Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802) and the 10/100/1000
Base-T Ethernet PCI-X Adapter Device Driver (14106902), and is defined in
the device-specific cdli_entuser.goent.h include file.
The statistics that are returned contain statistics obtained from the device.
If the device is inoperable, the statistics that are returned will not contain
the current device statistics. The copy of the ndd_flags field can be checked to determine the state of the device.
NDD_ENABLE_MULTICAST Device Control Operation
The NDD_ENABLE_MULTICAST command enables the receipt
of packets with any multicast (or group) address. The arg and length parameters are not used. The NDD_MULTICAST flag in the ndd_flags field
is set.
NDD_DISABLE_MULTICAST Device Control Operation
The NDD_DISABLE_MULTICAST command disables the receipt
of all packets with multicast addresses and only receives
those packets whose multicast addresses were specified using the NDD_ENABLE_ADDRESS command. The arg and length parameters are not used. The NDD_MULTICAST flag
in the ndd_flags field is reset only after the reference
count for multicast addresses has reached zero.
NDD_PROMISCUOUS_ON Device Control Operation
The NDD_PROMISCUOUS_ON command turns on promiscuous
mode. The arg and length parameters
are not used.
When the device driver is running in promiscuous mode, all network traffic
is passed to the network demultiplexer. When the Ethernet device driver receives
a valid packet from the network device, the Ethernet device driver calls the nd_receive function that is specified in the ndd_t structure of the network device. The NDD_PROMISC flag in the ndd_flags field is set. Promiscuous
mode is considered to be valid packets only. See the NDD_ADD_STATUS command for information about how to request support for bad packets.
The device driver will maintain a reference count on this operation. The
device driver increments the reference count for each operation. When this
reference count is equal to one, the device driver issues commands to enable
the promiscuous mode. If the reference count is greater than one, the device
driver does not issue any commands to enable the promiscuous mode.
NDD_PROMISCUOUS_OFF Device Control Operation
The NDD_PROMISCUOUS_OFF command terminates promiscuous
mode. The arg and length parameters
are not used. The NDD_PROMISC flag in the ndd_flags field is reset.
The device driver will maintain a reference count on this operation. The
device driver decrements the reference count for each operation. When the
reference count is not equal to zero, the device driver does not issue commands
to disable the promiscuous mode. Once the reference count for this operation
is equal to zero, the device driver issues commands to disable the promiscuous
mode.
NDD_DUMP_ADDR Device Control Operation
The NDD_DUMP_ADDR command returns the address of
the device driver's remote dump routine. The arg parameter
specifies the address where the dump routine's address is to be written.
The length parameter is not used.
Trace
For LAN device drivers, trace points enable error monitoring as well as
tracking packets as they move through the driver. The drivers issue trace
points for some or all of the following conditions:
- Beginning and ending of main functions in the main path
- Error conditions
- Beginning and ending of each function that is tracking buffers outside
of the main path
- Debugging purposes (These trace points are only enabled when the driver
is compiled with -DDEBUG turned on, and therefore the
driver can contain as many of these trace points as desired.)
The existing Ethernet device drivers each have either three or four trace
points. The Trace Hook IDs the PCI Ethernet Adapter Device Driver (22100020)
is defined in the sys/cdli_entuser.h file. Other drivers
have defined local cdli_entuser.driver.h files with the Trace Hook definitions. For more information,
see Debug and Performance Tracing.
Following is a list of trace hooks (and location of definition file) for
the existing Ethernet device drivers.
PCI Ethernet Adapter Device Driver (22100020)
Definition file: cdli_entuser.h
Trace Hook IDs:
Transmit |
-2A4 |
Receive |
-2A5 |
Other |
-2A6 |
10/100 Mbps Ethernet PCI Adpater Device Driver (23100020)
Definition file: cdli_entuser.phxent.h
Trace Hook IDs:
Transmit |
-2E6 |
Receive |
-2E7 |
Other |
-2E8 |
10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01)
Definition file: cdli_entuser.scent.h
Trace Hook IDs:
Transmit |
-470 |
Receive |
-471 |
Other |
-472 |
Gigabit Ethernet-SX PCI Adapter Device Driver (14100401)
Definition file: cdli_entuser.gxent.h
Trace Hook IDs:
Transmit |
-2EA |
Receive |
-2EB |
Other |
-2EC |
Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802) and 10/100/1000
Base-T Ethernet PCI-X Adapter Device Driver (14106902)
Definition file: cdli_entuser.goent.h
Trace Hook IDs:
Transmit |
-473 |
Receive |
-474 |
Other |
-475 |
The device driver also has the following trace points to support the netpmon program:
WQUE |
An output packet has been queued for transmission. |
WEND |
The output of a packet is complete. |
RDAT |
An input packet has been received by the device driver. |
RNOT |
An input packet has been given to the demuxer. |
REND |
The demultiplexer has returned. |
Error Logging
For error logging information, see Error Logging.
PCI Ethernet Adapter Device Driver (22100020)
The Error IDs for the PCI Ethernet Adapter Device Driver (22100020) are
as follows:
- ERRID_KENT_ADAP_ERR
- Indicates that the adapter is not responding to initialization commands.
User intervention is necessary to fix the problem.
- ERRID_KENT_RCVRY
- Indicates that the device driver detected a temporary adapter error
requiring that it enter network recovery mode. It has reset the adapter in
an attempt to fix the problem.
- ERRID_KENT_TX_ERR
- Indicates the the device driver has detected a transmission error. User
intervention is not required unless the problem persists.
- ERRID_KENT_PIO
- Indicates that the device driver has detected a program IO error. The
device driver was unable to fix the problem. User intervention is necessary
to fix the problem.
- ERRID_KENT_DOWN
- Indicates that the device driver has shut down the adapter due to an
unrecoverable error. The adapter is no longer functional due to the error.
The error that caused the device to shut down is error logged immediately
before this error log entry. User intervention is necessary to fix the problem.
10/100 Mbps Ethernet PCI Adapter Device Driver (23100020)
The Error IDs for the 10/100 Mbps Ethernet PCI Adapter Device Driver (23100020)
are as follows:
- ERRID_PHXENT_ADAP_ERR
- Indicates that the adapter is not responding to initialization commands.
User-intervention is necessary to fix the problem.
- ERRID_PHXENT_ERR_RCVRY
- Indicates that the device driver detected a temporary adapter error
requiring that it enter network recovery mode. It has reset the adapter in
an attempt to fix the problem.
- ERRID_PHXENT_TX_ERR
- Indicates that the device driver has detected a transmission error.
User-intervention is not required unless the problem persists.
- ERRID_PHXENT_PIO
- Indicates that the device driver has detected a program IO error. The
device driver was unable to fix the problem. User intervention is necessary
to fix the problem.
- ERRID_PHXENT_DOWN
- Indicates that the device driver has shutdown the adapter due to an
unrecoverable error. The adapter is no longer functional due to the error.
The error that caused the device shutdown is error logged immediately before
this error log entry. User intervention is necessary to fix the problem.
- ERRID_PHXENT_EEPROM_ERR
- Indicates that the device driver is in a defined state due to an invalid
or bad EEPROM. The device driver will not become available. Hardware support
should be contacted.
- ERRID_PHXENT_EEPROM2_ERR
- Indicates that the device driver is in a defined state due to an invalid
or bad EEPROM. The device driver will not become available. Hardware support
should be contacted.
- ERRID_PHXENT_CLOSE_ERR
- Indicates that an application is holding a private receive mbuf owned
by the device driver during a close operation. User intervention is not required.
- ERRID_PHXENT_LINK_ERR
- Indicates that the link between the adapter and the network switch is
down. The device driver will attempt to reestablish the connection once the
physical link is reestablished. When the link is again established, the device
driver will log ERRID_PHXENT_ERR_RCVRY. User intervention
is necessary to fix the problem.
Gigabit Ethernet-SX PCI Adapter Device Driver (14100401)
The Error IDs for the Gigabit Ethernet-SX PCI Adapter Device Driver (14100401)
are as follows:
- ERRID_GXENT_ADAP_ERR
- Indicates that the adapter failed initialization commands. User intervention
is necessary to fix the problem.
- ERRID_GXENT_CMD_ERR
- Indicates that the device driver has detected an error while issuing
commands to the adapter. The device driver will enter an adapter recovery
mode where it will attempt to recover from the error. If the device driver
is successful, it will log ERRID_GXENT_RCVRY_EXIT.
User intervention is not necessary for this error unless the problem persists.
- ERRID_GXENT_DOWNLOAD_ERR
- Indicates that an error occurred while downloading firmware to the adapter.
User intervention is necessary to fix the problem.
- ERRID_GXENT_EEPROM_ERR
- Indicates that an error occurred while reading the adapter EEPROM.
User intervention is necessary to fix the problem.
- ERRID_GXENT_LINK_DOWN
- Indicates that the link between the adapter and the network switch is
down. The device driver will attempt to reestablish the connection once the
physical link is reestablished. When the link is again established, the device
driver will log ERRID_GXENT_RCVRY_EXIT. User intervention
is necessary to fix the problem.
- ERRID_GXENT_RCVRY_EXIT
- Indicates that a temporary error (link down, command error, or transmission
error) has been corrected.
- ERRID_GXENT_TX_ERR
- Indicates that the device driver has detected a transmission error.
The device driver will enter an adapter recovery mode in an attempt to recover
from the error. If the device driver is successful, it will log ERRID_GXENT_RCVRY_EXIT. User intervention is not necessary for this error
unless the problem persists.
- ERRID_GXENT_EEH_SERVICE_ERR
- Indicates that the device driver has detected a error during an attempt
to recover from a PCI bus error. User intervention is necessary to fix the
problem.
10/100 Mbps Ethernet PCI Adapter II Device Driver (1410ff01)
The Error IDs for the 10/100 Mbps Ethernet PCI Adapter II Device Driver
(1410ff01) are as follows:
- ERRID_SCENT_ADAP_ERR
- Indicates that the adapter failed initialization commands. User intervention
is necessary to fix the problem.
- ERRID_SCENT_PIO_ERR
- Indicates that the device driver has detected a program IO error. The
device driver was unable to fix the problem. User intervention is necessary
to fix the problem.
- ERRID_SCENT_EEPROM_ERR
- Indicates that an error occurred while reading the adapter EEPROM. User
intervention is necessary to fix the problem.
- ERRID_SCENT_LINK_DOWN
- Indicates that the link between the adapter and the network switch is
down. The device driver will attempt to reestablish the connection once the
physical link is reestablished. When the link is again established, the device
driver will log ERRID_SCENT_RCVRY_EXIT. User intervention
is necessary to fix the problem.
- ERRID_SCENT_RCVRY_EXIT
- Indicates that a temporary error (link down, command error, or transmission
error) has been corrected.
- ERRID_SCENT_TX_ERR
- Indicates that the device driver has detected a transmission error.
The device driver will enter an adapter recovery mode in an attempt to recover
from the error. If the device driver is successful, it will log ERRID_SCENT_RCVRY_EXIT. User intervention is not necessary for this error
unless the problem persists.
- ERRID_SCENT_EEH_SERVICE_ERR
- Indicates that the device driver has detected a error during an attempt
to recover from a PCI bus error. User intervention is necessary to fix the
problem.
Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802) and the
10/100/1000 Base-T Ethernet PCI-X Adapter Device Driver (14106902)
The Error IDs for the Gigabit Ethernet-SX PCI-X Adapter Device Driver (14106802)
and the 10/100/1000 Base-T Ethernet PCI-X Adapter Device Driver (14106902)
are as follows:
- ERRID_GOENT_ADAP_ERR
- Indicates that the adapter failed initialization commands. User intervention
is necessary to fix the problem.
- ERRID_GOENT_PIO_ERR
- Indicates that the device driver has detected a program I/O error. The
device driver was unable to fix the problem. User intervention is necessary
to fix the problem.
- ERRID_GOENT_EEPROM_ERR
- Indicates that an error occurred while reading the adapter EEPROM. User
intervention is necessary to fix the problem.
- ERRID_GOENT_LINK_DOWN
- Indicates that the link between the adapter and the network switch is
down. The device driver will attempt to reestablish the connection once the
physical link is reestablished. When the link is again established, the device
driver will log ERRID_GOENT_RCVRY_EXIT. User intervention
is necessary to fix the problem.
- ERRID_GOENT_RCVRY_EXIT
- Indicates that a temporary error (link down, command error, or transmission
error) has been corrected.
- ERRID_GOENT_TX_ERR
- Indicates that the device driver has detected a transmission error.
The device driver will enter an adapter recovery mode in an attempt to recover
from the error. If the device driver is successful, it will log ERRID_GOENT_RCVRY_EXIT. User intervention is not necessary for this error
unless the problem persists.
- ERRID_GOENT_EEH_SERVICE_ERR
- Indicates that the device driver has detected a error during an attempt
to recover from a PCI bus error. User intervention is necessary to fix the
problem.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]