First of all, I would like to describe the general structure.
gld is generic lan driver and gld, in turn, uses the services of the specific lower level device driver such as elxl or iprb.
SEND
gld ----> elxl (or iprb) --> send out on wire
RECEIVE
data on wire --> elxl (or iprb) --> gld
Ipkts and Opkts are kept track of by the gld (High level driver).
Whereas, Ierrs and Oerrs are maintained by respective lower level (elxl, iprb etc.) drivers.
Ipkts and Opkts
=================
Opkts is the packets sent out and since it is counted at gld level,Opkts includes the error packets as well.
Whereas in case of Ipkts, if errors occur at lower level then control does not go as far as gld, and hence, Ipkts does not include the error packets.
Ierrs and Oerrs
=================
The exact details of what consists of Ierrs and Oerrs are different for different boards. These are determined by the board specifications and generally maintained on board itself - in registers provided specially for
that purpose. The driver routines just read the data off the registers and update appropriate kernel statistics (kstat) variables.
We will look into 2 cases for elxl and iprb.
Ierrs
======
a) elxl
For elxl, Ierrs is composed of stat_errrcv + tat_mac_rcv_error + stat_overflow;
stat_errrcv: In the receive routine the packet is checked for any error flags (UP_ERROR). This error flag is set by the board.
If the flag is set, the count is incremented.
stat_mac_rcv_error & stat_overflow: These are obtained from the statistics on board in special registers.
b) iprb
Ierrs is composed of crc + frame + missed + mac_rcv_error + overflow + short
All these statistics are maintained by the board and driver just reads them off the board by using ddi_xxx() routines.
More details on the exact meaning of these should be available from board manufacturer.
Oerrs
=======
a) elxl
Oerrs is incremented in the elxl_send() routine.
In send, we check for status of previous packets. The board sets up a flag (status register) if an error has occured while transmitting last packet. If flag is set, Oerrs is incremented.
b) iprb
Oerrs is composed of excoll + xmtlatecoll + underflow + nocarrier
All of the above are maintained by the board and obtained
using the ddi_xxx() routines.
Again, for exact details of what we mean by excoll etc, should be documented by the board manufacturer.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.