Platform Notes: The hme FastEthernet Device Driver

Setting Parameters Using ndd

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.

Identifying Device Instances

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.


Note -

If there is only one SUNW,hme device, the device is automatically chosen by the ndd utility.


To Specify the Device Instance for the ndd Utility
  1. Check the /etc/path_to_inst file to identify the instance associated with a particular device.

  2. 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.

Non-Interactive and Interactive Modes

You can use the ndd utility in two modes:

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.)

Using the ndd Utility in Non-Interactive Mode

This section describes how to modify a parameter value and how to display a parameter value.

  1. 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
    

  1. 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

  1. 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).

  1. 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 4-1 Example of Listing All Parameters Supported by the hme Driver

    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

Setting Forced Mode

The procedure that follows describes how to set forced mode (not capable of auto-negotiation).

To Select One Local Transceiver Capability and Setting 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.

    If you select more than one of the local transceiver capabilities, the driver selects the one that is highest in the priority order.

  2. 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.

Auto-Negotiation Mode

The procedure that follows describes how to select at least one of the five local transceiver capabilities and set the mode to auto-negotiation.

To Set the Mode to Auto-Negotiation
  1. 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.

  2. 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.

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.

  1. To benchmark the TCP/IP throughput, use the ndd command to configure the values of some of the TCP parameters for maximum performance.

  1. 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