C H A P T E R  5

Configuring the nxge Device Driver Parameters

The nxge device driver controls the Sun Quad Gigabit Ethernet interfaces. You can manually set the nxge driver parameters to customize each device in your system.

This chapter lists the available device driver parameters and describes how you can set these parameters.


nxge Hardware and Software Overview

The Sun Quad GbE UTP x8 PCIe ExpressModule provides four Gigabit full-duplex networking interfaces. The device driver automatically sets the link speed to 1000 Mbit/sec and conforms to the IEEE 802.3ad Ethernet standard. Each interface has 4 receive DMA channels and 6 transmit DMA channels to allow for parallel processing of the packets.

The Sun Quad GbE UTP x8 PCIe ExpressModule extends CPU and OS parallelism to networking with its support for hardware-based flow classification and multiple DMAs. Using CPU thread affinity to bind a given flow to a specific CPU thread, the ExpressModule enables a one-to-one correlation of Rx and Tx packets across the same TCP connection. This can help avoid cross-calls and context switching to deliver greater performance while reducing the need for CPU resources to support I/O processing. The Sun Quad GbE UTP x8 PCIe ExpressModule uses the Sun innovative MAC controller.


Setting nxge Driver Parameters on a Solaris Platform

You can set the nxge device driver parameters in two ways:

If you use the ndd utility, the parameters are valid only until you reboot the system. This method is good for testing parameter settings.


procedure icon  To Set the Driver Parameters

To set parameters so they remain in effect after you reboot the system, perform the following procedure:

1. Create an nxge.conf file:


/platform/sun4u/kernel/drv/nxge.conf

2. Add parameter values to this file when you need to set a particular parameter for a device in the system.


Setting Parameters Using the ndd Utility

Use the ndd utility to configure parameters that are valid until you reboot the system.

The following sections describe how you can use the nxge driver and the ndd utility to modify (with the -set option) or display (without the -set option) the parameters for each nxge device.

Noninteractive and Interactive Modes

You can use the ndd utility in two modes:

In Noninteractive 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.


procedure icon  To Specify Device Instances for the ndd Utility

Before you use the ndd utility to get or set a parameter for a nxge device, you must specify the device instance for the utility.

1. Check the /etc/path_to_inst file to identify the instance associated with a particular device.


# grep nxge /etc/path_to_inst
"/pci@7c0/pci@0/pci@9/network@0" 0 "nxge"
"/pci@7c0/pci@0/pci@9/network@0,1" 1 "nxge"
"/pci@7c0/pci@0/pci@9/network@0,2" 2 "nxge"
"/pci@7c0/pci@0/pci@9/network@0,3" 3 "nxge"


procedure icon  To Specify Parameter Values Using the ndd Utility

This section describes how to modify and display parameter values.

1. Use the -set option to modify a parameter.

If you invoke the ndd utility with the -set option, the utility passes value, which must be specified, down to the named /dev/nxgedriver-instance, and assigns the value to the parameter:


# ndd -set /dev/nxgenumber parameter-value

where number is the driver instance, for example /dev/nxge0, /dev/nxge1.

2. Display the value of a parameter by specifying the parameter name and omitting the value.

When you omit the -set option, the utility queries the named driver instance, retrieves the value associated with the specified parameter, and prints it:


# ndd /dev/nxgenumber parameter


procedure icon  To Use the ndd Utility in Interactive Mode

1. Modify a parameter value in interactive mode by specifying ndd /dev/nxgenumber:


# ndd /dev/nxge0
name to get/set? (Enter the parameter name or ? to view all parameters)

After you enter the parameter name, the ndd utility prompts you for the parameter value.

2. List all the parameters supported by the nxge driver, by typing ?.


# ndd /dev/nxge1 name to get/set ?
?                             (read only)
function_number               (read only)
adv_autoneg_cap               (read and write)
adv_10gfdx_cap                (read and write)
adv_1000fdx_cap               (read and write)
adv_100fdx_cap                (read and write)
adv_10fdx_cap                 (read and write)
adv_pause_cap                 (read and write)
accept_jumbo                  (read and write)
rxdma_intr_time               (read and write)
rxdma_intr_pkts               (read and write)
class_opt_ipv4_tcp            (read and write)
class_opt_ipv4_udp            (read and write)
class_opt_ipv4_ah             (read and write)
class_opt_ipv4_sctp           (read and write)
class_opt_ipv6_tcp            (read and write)
class_opt_ipv6_udp            (read and write)
class_opt_ipv6_ah             (read and write)
class_opt_ipv6_sctp           (read and write)
 


Setting Parameters Using the nxge.conf File

Specify the driver parameter properties for each device by creating a nxge.conf file in the /platform/sun4v/kernel/drv/sparcv9/ directory. Use a nxge.conf file when you need to set a particular parameter for a device in the system.

The man pages for prtconf(1M) and driver.conf(4) include additional details. The next procedure shows an example of setting parameters in a nxge.conf file.


procedure icon  To Access a Man Page

single-step bullet  To access any man page, type the man command plus the name of the man page.

For example, to access man pages for prtconf(1M), type:


% man prtconf


procedure icon  To Set Driver Parameters Using an nxge.conf File

1. Obtain the hardware path names for the nxge devices in the device tree.

a. Check the /etc/driver_aliases file to identify the name associated with a particular device:


# grep nxge /etc/driver_aliases
nxge "pciex108e,abcd"

b. Locate the path names and the associated instance numbers in the
/etc/path_to_inst file.


# grep nxge /etc/path_to_inst
"/pci@7c0/pci@0/pci@9/network@0" 0 "nxge"
"/pci@7c0/pci@0/pci@9/network@0,1" 1 "nxge"
"/pci@7c0/pci@0/pci@9/network@0,2" 2 "nxge"
"/pci@7c0/pci@0/pci@9/network@0,3" 3 "nxge"

In this example:

To identify a PCIe device unambiguously in the nxge.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 PCIe device specification.

In this example:

2. Set the parameters for the nxge devices in the /platform/sun4u/kernel/drv/nxge.conf file.

The following example shows ports on two different cards being set. Only one node needs to be specified.


name = "pciex108e,abcd" parent = "/pci@780/pci@0/pci@8/" unit-address = "0" class-opt-ipv4-tcp = 0x100;
 
name = "pciex108e,abcd" parent = "/pci@7c0/pci@0/pci@9/" unit-address = "0" class-opt-ipv4-tcp = 0x40;

3. Save the nxge.conf file.