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:


Introduction

You can set the dmfe device driver parameters temporarily (by using ndd ) or permanently (by editing a dmfe.conf file).

To set parameters for:


The Order of Precedence for the Parameter Settings

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 .


Setting Parameters Temporarily Using ndd

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.

Identifying Devices On the Command Line

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.

Displaying the Available Parameters Using ndd

1. To view the parameters you can set for a dmfe device, type:

# ndd /dev/dmfenum '?'

Where num will be 0 or 1.

TABLE 2-1 Using ndd to List the Parameters for the dmfe Driver
# ndd /dev/dmfe0 '?' 
?                             (read only)
link_status                   (read only)
link_speed                    (read only)
link_mode                     (read only)
adv_autoneg_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)

(For parameter descriptions, see Appendix A .)

Viewing the Current Setting for a Parameter

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:

# ndd /dev/dmfenum parameter

For example, to check whether auto-negotiation is currently enabled, type:

# ndd /dev/dmfenum adv_autoneg_cap

The result displayed will be either 0 (which means that auto-negotiation is disabled) or 1 (which means that auto-negotiation is enabled).

Setting a New Value for a Parameter

1. To modify a parameter value, use the -set option.

The syntax is as follows:

% ndd -set /dev/dmfenum parameter value

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.

Specifying a Particular Speed and Duplex Setting



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.


Note Note - When you use ndd to set the speed/duplex-mode parameters, the dmfe driver does not examine the value of these parameters until you subsequently set adv_autoneg_cap. This is why you must set adv_autoneg_cap last. In fact, for the new parameter values to take effect, you must set adv_autoneg_cap last even if this means setting it to the value it is already set to.



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.

Returning to Auto-Negotiation Mode

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 .


Setting Parameters Permanently Using the dmfe.conf File

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.

Using dmfe.conf To Set Parameters for All dmfe Devices in a System

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:

adv_autoneg_cap=0;
adv_100fdx_cap=0;

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:

adv_100hdx_cap=0;

Using dmfe.conf to Set Parameters for a Particular Device

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:

"/pci@1f,0/ethernet@c" 0 "dmfe" "/pci@1f,0/ethernet@5" 1 "dmfe"

In the entries above:

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:

parent="/pci@1f,0" unit-address="c" name="dmfe" adv_autoneg_cap=0 adv_100fdx_cap=0;

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;