Platform Notes: The hme Fast Ethernet Device Driver Sun Microsystems Computer Company 2550 Garcia Avenue Mountain View, CA 94043 USA 415 960-1300 fax 415 969-9131 Part No: 802-5333-10 Revision A, May 1996
Copyright 1996 Sun Microsystems, Inc., 2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Portions of this product may be derived from the UNIX® system, licensed from Novell, Inc.
Copyright 1996 Sun Microsystems Inc., 2550 Garcia Avenue, Mountain View, Californie 94043-1100, U.S.A.Tous droits réservés. Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la distribution, et la décompilation.
Contents 1. Introduction to the hme Fast Ethernet Device Driver . . . . . . . 1 Related Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Typographic Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Ordering Sun Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. The hme Device Driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Hardware Overview . . . . . . . . . . . . . . . . . . . . . . . . .
vi Operational Mode Parameters . . . . . . . . . . . . . . . . . . . . . . . . 13 Defining the Number of Back-to-Back Packets To Transmit 15 Reporting Transceiver Capabilities . . . . . . . . . . . . . . . . . . . . 15 Reporting the Link Partner Capabilities . . . . . . . . . . . . . . . . 16 4. Setting Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Parameter Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting Parameters in the /etc/system File . . . . . . . . . . . . . . 25 ▼ To set the ipg1 to 10 and ipg2 to 5 when you reboot . 26 Setting Parameters Using the hme.conf File. . . . . . . . . . . . . . . 27 ▼ To set ipg1 to 20 and ipg2 to 10 for the SUNW,hme device in SBus slot 0xe . . . . . . . . . . . . . . . . . . . . . . . . . . .
viii Platform Notes: The hme Fast Ethernet Device Driver—May 1996
Introduction to the hme Fast Ethernet Device Driver 1 This book describes how to configure the hme driver for the Sun Ultra 1 Series systems, the Sun Ultra 2 Series system, the Ultra Enterprise 3000, 4000, 5000, and 6000 systems, the SunSwift SBus Adapter, and the SunFastEthernet Adapter 2.0. To configure the hme driver you can use the ndd utility to set the parameters. If you use the ndd utility, the parameter values are effective until you reboot the system.
1 • Solaris Reference Manual for SMCC-Specific Software: Explains the following man pages: • ndd (1M) man page summarizes information on how to use the ndd utility • prtconf (1M), system (4), and driver.conf (4) man pages describe information about entering parameter values into the /etc/system file and the hme.conf file Typographic Conventions Table 1-1 describes the typographic conventions used in this book.
1 Shell Prompts in Command Examples Table 1-2 shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell. Table 1-2 Shell Prompts Shell Prompt C shell machine_name% C shell superuser machine_name# Bourne shell and Korn shell $ Bourne shell and Korn shell superuser # Ordering Sun Documents The SunDocs Order Desk is a distribution center for Sun Microsystems technical documentation. You can use major credit cards and company purchase orders.
1 Sun Welcomes Your Comments Please use the Reader Comment Card that accompanies this document. We are interested in improving our documentation and welcome your comments and suggestions. If a card is not available, you can also email or fax your comments to us. Please include the part number of your document in the subject line of your email or fax message. • • 4 Email: smcc-docs@sun.
The hme Device Driver 2 The hme device driver handles the SUNW,hme device on these hardware devices: • • • • • SunSwift SBus Adapter SunFastEthernet Adapter 2.
2 In addition to the RJ-45 connector, a Media Independent Interface (MII) connector, which is an Ultra DB 40 connector, is also provided on Sun systems. The MII connects to an external transceiver that may use any physical media, such as copper or fiber as specified in the 100BASE-TX standard. When an external transceiver is connected to the MII, the driver selects the external transceiver and disables the internal transceiver.
2 • Selects the highest common denominator mode of operation based on the following priorities: • 100 BASE-T4 • 100 Mbps, full-duplex • 100 Mbps, half-duplex • 10 Mbps, full-duplex • 10 Mbps, half-duplex The link partner is the networking device (system, Ethernet hub, or Ethernet switch) at the other end of the link or cable. If the SUNW,hme device is connected to a remote system or interface that is not capable of autonegotiation, the system automatically selects the correct speed and half-duplex mode.
2 • If the external transceiver supports auto-negotiation, the driver uses the auto-negotiation feature to select the link speed and mode. • If the external transceiver does not support auto-negotiation, the driver selects the highest priority mode supported by the transceiver. You can also manually select the speed and mode of the link. For example, two transceivers might not support the same mode and speed.
3 Parameter Definitions This chapter describes the parameters and settings for the hme device driver. Driver Parameter Values and Definitions The following sections describe the hme driver parameters, which are listed in Table 3-1.
3 Table 3-1 10 hme Driver Parameter, Status, and Descriptions (Continued) Parameter Status Description adv_100hdx_cap Read and write Operational mode parameter adv_10fdx_cap Read and write Operational mode parameter adv_10hdx_cap Read and write Operational mode parameter autoneg_cap Read only Local transceiver auto negotiation capability 100T4_cap Read only Local transceiver capability of the hardware 100fdx_cap Read only Local transceiver capability of the hardware 100hdx_cap Read
3 Defining the Current Status The read-only parameters described in Table 3-2 explain the operational mode of the interface. These parameters define the current status.
3 By default, the driver sets ipg1 to 8-byte time and ipg2 to 4-byte time, which are the standard values. (Byte time is the time it takes to transmit one byte on the link, with a link speed of either 100 Mbps or 10 Mbps.) If your network has systems that use longer IPG (the sum of ipg1 and ipg2) and if those machines seem to be slow in accessing the network, increase the values of ipg1 and ipg2 to match the longer IPGs of other machines.
3 Table 3-4 defines the lance_mode and ipg0 parameters. Table 3-4 Parameters Defining lance_mode and ipg0 Parameter Values Description lance_mode 0 1 lance_mode disabled lance_mode enabled (default) ipg0 0-311 Additional IPG before transmitting a packet (after receiving a packet) 1. The default value is 16 nibble-times, which is 6.4 microseconds for 10 Mbps and 0.64 microseconds for 100 Mbps.
3 Table 3-5 Parameter Operational Mode Parameters (Continued) Values Description 0 1 Local transceiver capability advertised by the hardware; read/write parameter = Not 10Mbit/sec full-duplex capable (default) = 10Mbit/sec full-duplex capable 0 1 Local transceiver capability advertised by the hardware; read/write parameter = Not 10Mbit/sec half-duplex capable = 10Mbit/sec half-duplex capable (default) 0 1 Local transceiver capability selected for networking by the user = External transceiver is use
3 Defining the Number of Back-to-Back Packets To Transmit The pace_size parameter (see Table 3-6) defines the maximum number of back-to-back packets you can transmit at one time. If the value is zero, there is no limit to the number of back-to-back packets that can be transmitted.
3 Table 3-7 Read-Only Transceiver Capabilities Parameter Values Description 0 1 Local transceiver capability of the hardware; initialized at startup = Not 100Mbit/sec half-duplex capable = 100Mbit/sec half-duplex capable 0 1 Local transceiver capability of the hardware; initialized at startup = Not 10Mbit/sec full-duplex capable = 10Mbit/sec full-duplex capable 0 1 Local transceiver capability of the hardware; initialized at startup = Not 10Mbit/sec half-duplex capable = 10Mbit/sec half-duplex cap
3 Table 3-8 Read-Only Link Partner Capabilities (Continued) Parameter Values Description lp_100hdx_cap 0 1 = No 100Mbit/sec half-duplex transmission = 100Mbit/sec half-duplex lp_10fdx_cap 0 1 = No 10Mbit/sec full-duplex transmission = 10Mbit/sec full-duplex lp_10hdx_cap 0 1 = No 10Mbit/sec half-duplex transmission = 10Mbit/sec half-duplex If the link partner is not capable of auto-negotiation (when lp_autoneg_cap is 0) the information described in Table 3-8 is not relevant and the parameter va
3 18 Platform Notes: The hme Fast Ethernet Device Driver—May 1996
Setting Parameters 4 This chapter describes how to configure the hme driver parameters using the ndd utility in the /etc/system file, or in the hme.conf file. Use the ndd utility to configure parameters that are valid until you reboot the system. To configure the hme driver parameters for all devices in the system so that the parameter values are always in effect (even after rebooting the system), enter the parameter values in the /etc/system file.
4 To set parameters so they remain in effect after you reboot the system: • Add the parameter values to /etc/system when you want to configure parameters for all devices in the system. • Create the hme.conf file and add parameter values to hme.conf when you need to set a particular parameter for a device in the system. If you want to test parameter settings, use the ndd utility described in Chapter 3. With ndd, the parameters are effective until you reboot the system.
4 2. Use that instance number to select the device as follows: % ndd -set /dev/hme instance The device remains selected until you change the selection. Non-Interactive and Interactive Modes You can use the ndd utility in two modes: • • Non-interactive Interactive In non-interactive mode, you invoke the utility to execute a specific command. Once the command is executed, you exit the utility. In interactive mode, you can use the utility to get or set more than one parameter value.
4 ▼ To display the value of a parameter ♦ Specify the parameter name (and omit the value). When you omit the -set option, a query operation is assumed and the utility queries the named driver instance, retrieves the value associated with the specified parameter, and prints it: % ndd /dev/hme parameter Using the ndd Utility in Interactive Mode ▼ To modify a parameter value in interactive mode ♦ Specify ndd hme, as shown below.
4 ▼ To list all the parameters supported by the hme driver ♦ Type ndd /dev/hme \?. (Refer to Table 3-1 through 3-8 for parameter descriptions.
4 Setting Forced Mode This section describes how to set forced mode (not capable of autonegotiation). ▼ To select one of the five local transceiver capabilities and set the mode to forced mode 1. Select one of the following capabilities: adv_100T4_cap, adv_100fdx_cap, adv_100hdx_cap, adv_10fdx_cap, or adv_10hdx_cap, and set its value to 1.
4 Configuring TCP/IP for Maximum Performance This section describes how to benchmark the TCP/IP throughput and how to set the TCP/IP hiwater marks for best performance. ▼ To benchmark the TCP/IP throughput ♦ Use the ndd command to configure the values of some of the TCP parameters for maximum performance.
4 Table 4-1 Setting Variables in the /etc/system File (Continued) Parameter Variable adv_100T4_cap hme_adv_100T4_cap adv_100fdx_cap hme_adv_100fdx_cap adv_100hdx_cap hme_adv_100hdx_cap adv_10fdx_cap hme_adv_10fdx_cap adv_10hdx_cap hme_adv_10hdx_cap lance_mode hme_lance_mode ipg0 hme_ipg0 These parameter values, described in Chapter 3, are applicable to all SUNW,hme devices on the system. Refer to Table 3-2 on page 11 through Table 3-8 on page 16 for parameter descriptions.
4 Setting Parameters Using the hme.conf File You can also specify the properties described in the section “Setting Parameters in the /etc/system File” on page 25 on a per device basis by creating the hme.conf file in the /kernel/drv directory. The properties set in the hme.conf file will override the parameters set in the /etc/system file. Use hme.conf when you need to set a particular parameter for a device in the system. The parameters you set are read and write parameters that are listed in Chapter 3.
4 4. Create the hme.conf file in the /kernel/drv directory using a text editor and add lines similar to the following to the file: • Specify name=”hme” and class=”sbus.” • Use the reg property to specify the device, 0xe in this case. Use the value following Bus Type in the prtconf -v output. • Type the addresses followed by the specified sizes. Precede each size with 0x and leading zeros, as indicated in the following screen. • Set ipg1 and ipg2.