C H A P T E R 2 |
Setting Parameters Temporarily or Permanently |
This chapter describes how to configure the dmfe driver parameters.
This chapter contains the following sections:
You can set the dmfe device driver parameters temporarily (by using ndd ) or permanently (by editing a dmfe.conf file).
A specific dmfe device in the system and to give it settings that remain valid only until the next system reboot, use the ndd utility (see Setting Parameters Temporarily Using ndd ). Using ndd is a good way to test parameter settings.
A specific
dmfe
device or for all
dmfe
devices in the system and to ensure that the settings remain valid after subsequent reboots, use the
dmfe.conf
file in
/platform/SUNW,UltraAX-i2/kernel/drv
(see
Setting Parameters Permanently Using the dmfe.conf File
.)
The default setting for all the dmfe driver's read/write parameters is 1. When adv_autoneg_cap is set to 1, all of the other parameter settings are ignored by the driver.
However, if you set adv_autoneg_cap to 0 (in other words, if you disable auto-negotiation), the driver selects the combination of speed and duplex mode that gives the highest possible throughput permitted by the other parameter settings.
So, if you enable 100Mbps full-duplex operation ( adv_100fdx_cap =1), the driver selects this combination of speed and duplex mode in preference to 100Mbps half- duplex operation. Note that, in this case, it selects 100Mbps full-duplex operation even if the parameter permitting 100Mbps half-duplex mode is also enabled ( adv_100hdx_cap=1 ) or if parameters permitting other lower levels of throughput are also enabled.
Similarly, if you disable 100Mbps full-duplex operation ( adv_100fdx_cap =0) but enable 100Mbps half-duplex operation ( adv_100hdx_cap=1 ), the driver will select 100Mbps half-duplex operation in preference to 10Mbps full-duplex operation ( adv_10fdx_cap=1 ) or 10Mbps half-duplex operation ( adv_10hdx_cap=1 ).
So, to force the driver to select the combination of speed and duplex mode that gives the lowest possible throughput (10Mbps half-duplex), you must not only set adv_10hdx_cap to 1 (its default setting), you must also set to zero all the parameters that would otherwise enable higher levels of throughput. These are: adv_100fdx_cap , adv_100hdx_cap , and adv_10fdx_cap .
The ndd utility supports any networking driver that implements the Data Link Provider Interface (DLPI).
Use the ndd utility to configure parameters for a specific dmfe device in the system with settings that you intend to remain valid only until the next system reboot.
This section tells you how you use the ndd utility to modify (with the -set option) or display (without the -set option) the parameters for each dmfe device.
When you use the
ndd
utility to get or set a parameter for a
dmfe
device, you must specify the device instance for the utility. The device instance is always
/dev/dmfe
num, where num is the instance number, for example, 0 or 1.
1. To view the parameters you can set for a dmfe device, type:
(For parameter descriptions, see Appendix A .)
1. To display the current setting of a parameter, specify the parameter name but do not specify a new value. The syntax is as follows:
For example, to check whether auto-negotiation is currently enabled, type:
The result displayed will be either 0 (which means that auto-negotiation is disabled) or 1 (which means that auto-negotiation is enabled).
1. To modify a parameter value, use the -set option.
When you invoke the ndd utility with the -set option, the utility passes the parameter name and value down to the named dmfe driver instance. The driver then checks the new value and, if it is valid, assigns it to the parameter.
Note Note - Note that the values you set by using ndd remain valid only until the next system reboot. |
To specify the speed and duplex mode (that is, to force the device to use a particular speed and duplex mode instead of negotiating these variables with the device it is connected to), do the following:
1. Set one of the following parameters to 1: adv_100fdx_cap , adv_100hdx_cap , adv_10fdx_cap , or adv_10hdx_cap .
2. Set the other three parameters to zero.
3. Set
adv_autoneg_cap
to zero. This disables the device's auto-negotiation facility and causes the other new parameters to take effect.
For example, to specify a network speed of 100Mbps with half-duplex operation for device dmfe0 , you would type the following:
# ndd -set /dev/dmfe0 adv_100fdx_cap 0 # ndd -set /dev/dmfe0 adv_100hdx_cap 1 # ndd -set /dev/dmfe0 adv_10fdx_cap 0 # ndd -set /dev/dmfe0 adv_10hdx_cap 0 # ndd -set /dev/dmfe0 adv_autoneg_cap 0 |
If you enable more than one of the speed/duplex mode parameters (that is, if you set more than one of the parameters to a value of 1), the driver selects the combination of speed and duplex mode that allows the highest throughput.
1. To return the device to its default operating mode (that is, to cause it to negotiate a transfer speed and duplex mode automatically with the link partner), return all the parameters to their default value of 1.
To return to auto-negotiation mode, type the following:
# ndd -set /dev/dmfe0 adv_100fdx_cap 1 # ndd -set /dev/dmfe0 adv_100hdx_cap 1 # ndd -set /dev/dmfe0 adv_10fdx_cap 1 # ndd -set /dev/dmfe0 adv_10hdx_cap 1 # ndd -set /dev/dmfe0 adv_autoneg_cap 1 |
For an explanation of why we recommend you to return all the parameters to their default values of 1, see The Order of Precedence for the Parameter Settings .
You can specify parameters for all dmfe devices in a system or for specific devices by editing the dmfe.conf file in the /platform/SUNW,UltraAX-i2/kernel/drv directory. These parameters take effect after the next reboot and remain in effect across subsequent reboots.
To configure driver parameters for all dmfe devices in a system by using the dmfe.conf file, follow the instructions in this section.
For more information, refer to the manual pages for prtconf (1M), system (4) and driver.conf (4).
Note Note - When you edit the dmfe.conf file, make sure you do not modify any settings other than those of the parameters specifically described in this documentation. |
1. Use a text editor to open the dmfe.conf file in the following directory:
/platform/SUNW,UltraAX-i2/kernel/drv
2. Add a line for each parameter you want to set globally.
To force all dmfe devices in a system to use a speed of 100Mbps in half-duplex mode, you would make the following two entries:
The driver's default values for the speed/duplex-mode settings are all 1. This means that, in the example above, the driver will read the settings of 0 for adv_autoneg_cap (which disables auto-negotiation) and adv_100fdx_cap (which disables 100Mbps full-duplex operation). Then, because the next parameter in the order of precedence is adv_100hdx_cap (100Mbps half-duplex operation) and this parameter still has its default setting of 1, the driver will select 100Mbps with half-duplex operation.
For more information about the order in which the driver selects the combination of speed and duplex mode to use, see The Order of Precedence for the Parameter Settings .
If you wanted to force the device to use 10Mbps full-duplex mode (this is next in the driver's order of precedence, after 100Mbps half-duplex mode) you would also add the following entry:
1. Obtain the hardware path name for the device in the device tree.
Typically this path name and the associated instance number will be found in the
/etc/path_to_inst
file. Sample entries in
/etc/path_to_inst
are:
You need to use these elements in Step 3 when you make your entries in the dmfe.conf file.
2. Use a text editor to open the dmfe.conf file in the following directory:
/platform/SUNW,UltraAX-i2/kernel/drv
3. Type an entry into the dmfe.conf file you have created.
To identify a PCI device whose parameters you intend to set use the parent name, unit-address, and driver name for the device.
Refer to the pci (4) man page for more information about PCI device specification.
In the first line of the sample /etc/path_to_inst in Step 1 above:
Therefore an example of a dmfe.conf file in which the network speed and duplex mode for dmfe0 only are set to 100Mbps and half duplex respectively is as follows:
The driver's default values for the speed/duplex-mode settings are all 1. This means that, in the example above, the driver will read the settings of 0 for adv_autoneg_cap (which disables auto-negotiation) and adv_100fdx_cap (which disables 100Mbps full-duplex operation). Then, because the next parameter in the order of precedence is adv_100hdx_cap (100Mbps half-duplex operation) and this parameter still has its default setting of 1, the driver will select 100Mbps half-duplex operation.
For more information about the order in which the driver selects the combination of speed and duplex mode to use, see The Order of Precedence for the Parameter Settings .
If you wanted to force dmfe0 to operate at 10Mbps in full-duplex mode you would add adv_100hdx_cap=0 to the previous example. The entry in dmfe.conf would then look as follows:
parent="/pci@1f,0" unit-address="c" name="dmfe" adv_autoneg_cap=0 adv_100fdx_cap=0 adv_100hdx_cap=0; |
Copyright © 2002, Sun Microsystems, Inc. All rights reserved.