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. When the system is rebooted, it reads the /etc/system file and sets the parameter values in that file.
To set the parameters for a particular device in the system, set the parameters in the hme.conf file in the /kernel/drv directory. The parameters set in the hme.conf file have precedence over the parameters set in the /etc/system file and override the parameters set in the /etc/system file. Setting hme.conf parameter values are always in effect (even after rebooting the system).
You can set the hme device driver parameters in three ways (ndd, /etc/system, and hme.conf), depending on your needs. To set parameters that are valid until you reboot the system, use the ndd utility. Using ndd is a good way to test parameter settings.
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. To make the parameter settings permanent, enter the values in /etc/system or hme.conf as described in this chapter.
Use the ndd utility to configure parameters that are valid until you reboot the system. The ndd utility supports any networking driver, which implements the Data Link Provider Interface (DLPI).
The following sections describe how you can use the hme driver and the ndd utility to modify (with the -set option) or display (without the -set option) the parameters for each SUNW,hme device.
Before you use the ndd utility to get or set a parameter for the hme device, you must specify the device instance for the utility if there is more than one SUNW,hme device.
If there is only one SUNW,hme device, the device is automatically chosen by the ndd utility.
Check the /etc/path_to_inst file to identify the instance associated with a particular device.
Use that instance number to select the device as follows:
% ndd -set /dev/hme instance instance#
The device remains selected until you change the selection.
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. (Refer to the ndd (1M) man page for more information.)
This section describes how to modify a parameter value and how to display a parameter value.
To modify a parameter value, use the -set option.
If you invoke the ndd utility with the -set option, the utility passes value, which must be specified down to the named /dev/hme driver instance, and assigns it to the parameter:
% ndd -set /dev/hme parameter value
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
To modify a parameter value in interactive mode, specify ndd hme, as shown below.
The ndd utility then prompts you for the name of the parameter:
% ndd /dev/hme name to get/set? (Enter the parameter name or ? to view all parameters)
After entering the parameter name, the ndd utility prompts you for the parameter value (see Table 4-1 through Table 4-8).
To list all the parameters supported by the hme driver, type ndd /dev/hme \?.
(See Table 4-1 through Table 4-8 for parameter descriptions.)
example# ndd /dev/hme \? ? (read only) transceiver_inuse (read only) link_status (read only) link_speed (read only) link_mode (read only) ipg1 (read and write) ipg2 (read and write) use_int_xcvr (read and write) pace_size (read and write) adv_autoneg_cap (read and write) adv_100T4_cap (read and write) adv_100fdx_cap (read and write) adv_100hdx_cap (read and write) adv_10fdx_cap (read and write) adv_10hdx_cap (read and write) autoneg_cap (read only) 100T4_cap (read only) 100fdx_cap (read only) 100hdx_cap (read only) 10fdx_cap (read only) 10hdx_cap (read only) lp_autoneg_cap (read only) lp_100T4_cap (read only) lp_100fdx_cap (read only) lp_100hdx_cap (read only) lp_10fdx_cap (read only) lp_10hdx_cap (read only) instance (read and write) lance_mode (read and write) ipg0 (read and write) example#
Example of Listing All Parameters Supported by the hme Driver
The procedure that follows describes how to set forced mode (not capable of auto-negotiation).
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.
If you select more than one of the local transceiver capabilities, the driver selects the one that is highest in the priority order.
Set the local transceiver capabilities advertised by the hardware to forced mode = 0, which is not capable of auto-negotiation: adv_autoneg_cap 0
Use the ndd utility as described in "Using the ndd Utility in Interactive Mode" in this chapter.
The procedure that follows describes how to select at least one of the five local transceiver capabilities and set the mode to auto-negotiation.
Select at least one of the five capabilities (adv_100T4_cap, adv_100fdx_cap, adv_100hdx_cap, adv_10fdx_cap, adv_10hdx_cap) that you want to advertise to the remote system, and set its value to 1.
Set the local transceiver capabilities advertised by the hardware to 1, the auto-negotiation setting: adv_autoneg_cap 1
Use the ndd utility as described in "Using the ndd Utility in Interactive Mode" in this chapter.
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.
To set the TCP hiwater marks for maximum performance, type the following ndd commands:
# ndd -set /dev/tcp tcp_xmit_hiwat 65535 # ndd -set /dev/tcp tcp_recv_hiwat 65535 # ndd -set /dev/tcp tcp_cwnd_max 65534
To configure the hme driver parameters for all SUNW,hme devices in the system so that the parameter variables are always effective (even after rebooting the system), enter the parameter variables in the /etc/system file. When you reboot the system, the system reads the /etc/system file and sets these parameter variables in the hme module in the operating system kernel.
Table 4-1 lists the variables you need to set in the /etc/system file.
Table 4-1 Setting Variables in the /etc/system FileParameter | Variable |
---|---|
ipg1 |
hme_ipg1 |
ipg2 |
hme_ipg2 |
use_int_xcvr |
hme_use_int_xcvr |
pace_size |
hme_pace_size |
adv_autoneg_cap |
hme_adv_autoneg_cap |
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, Parameter Definitions, are applicable to all SUNW,hme devices on the system. See Table 3-2 through Table 3-8 for parameter descriptions. An example follows.
Become superuser.
Add the following lines to the /etc/system file:
set hme:hme_ipg1 = 10 set hme:hme_ipg2 = 5
Save the /etc/system file.
Save all files and exit all programs, exit the windowing system.
Reboot the system by typing init 6 at the # prompt.
The system is halted and then rebooted.
You can also specify the properties described in the section, "Setting Parameters in the /etc/system File"," in this chapter 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.
The man pages for prtconf (1M), system (4) and driver.conf (4) include additional details. An example follows:
Invoke the prtconf -v command and pipe the output to the more command ( prtconf -v | more ) or redirect the output of the command to a file name ( prtconf -v > filename) and print the redirected file.
Find the section in the prtconf -v output for SUNW,hme,instance #0, or SUNW,hme,instance #1, and so on.
The output for SUNW,hme,instance #0 for a Sun Ultra 1 Creator Series system follows:
SUNW,hme, instance #0 Driver software properties: name <pm_norm_pwr> length <4> value <0x00000001>. name <pm_timestamp> length <4> value <0x30743b26>. Register Specifications: Bus Type=0xe, Address=0x8c00000, Size=108 Bus Type=0xe, Address=0x8c02000, Size=2000 Bus Type=0xe, Address=0x8c04000, Size=2000 Bus Type=0xe, Address=0x8c06000, Size=2000 Bus Type=0xe, Address=0x8c07000, Size=20
Become superuser.
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. Type a semicolon ( ; ) after the last value.
These parameters are set to 20 and 10, respectively, in this example. The ipg parameters are defined in Chapter 3.
name="hme" class="sbus" reg=0xe,0x8c00000,0x00000108,0xe,0x8c02000,0x00002000,0xe, 0x8c04000,0x00002000,0xe,0x8c06000,0x00002000,0xe,0x8c07000, 0x00000020 ipg1=20 ipg2=10;
Save the hme.conf file.
Save and close all files and exit all programs; exit the windowing system.
Halt and reboot the system by typing the init 6 command at the # prompt.
Obtain the hardware path name for the device in the device tree. Typically this path name and the associated instance number will be present in the /etc/path_to_inst file. For example, on a Sun Ultra 30 UPA/PCI system in which one SunSwift-PCI card is plugged in, the /etc/path_to_inst file will have the following two entries (in addition to entries for other devices):
Obtain the hardware path name for the device in the device tree. Typically this path name and the associated instance number will be present in the /etc/path_to_inst file. For example, on a Sun Ultra 30 UPA/PCI system in which one SunSwift-PCI card is plugged in, the /etc/path_to_inst file will have the following two entries (in addition to entries for other devices):
"/pci@1f,4000/network@1,1" 0 "hme" "/pci@1f,4000/pci@4/SUNW,hme@0,1" 1 "hme"
The first entry corresponds to the hme device on the motherboard. The second entry corresponds to the hme device on the SunSwift-PCI card.
In the previous lines:
The first part within the double quotes specifies the hardware node name in the device tree.
The second number is the instance number.
The last part in double quotes is the driver name.
In the device path name, the last component after the last / character and before the @ character is the device name.
The path name before the last component is the parent name.
The comma-separated numbers after the @ character at the end represent the device and function numbers, which are together referred to as unit-address.
To identify a PCI device unambiguously in the hme.conf file, use the name, parent name, and the unit-address for the device. Refer to the pci(4) man page for more information about the PCI device specification.
In the first line of the previous example:
Name = network
Parent = /pci@1f,4000
Unit-address = 1,1
In the second line in the previous example:
Name = SUNW,hme
Parent = /pci@1f,4000/pci@4
Unit-address = 0,1
Set the ipg1 and ipg2 parameters for the above two devices in the /kernel/drv/hme.conf file:
name = "SUNW,hme" parent = "/pci@1f,4000" unit-address = "1,1" ipg1=10 ipg2=5; name = "SUNW,hme" parent = "/pci@1f,4000/pci@4" unit-address = "0,1" ipg1=20 ipg2=10;
Note that for the motherboard device, the SUNW,hme device is used even though the path name uses the name network. The SUNW,hme device name is the value of the compatible property for this device.