|C H A P T E R 14|
Ethernet Loopback Test (xnetlbtest)
The xnetlbtest provides functional test coverage of the network products based on Neptune Ethernet chip/core. nxge is the first driver xnetlbtest supports.
xnetlbtest uses DLPI to send and receive packets in loopback modes. A packet is defined as an Ethernet header followed by data payload. The test generates and sends a desired number of packets and receives the packets through the external or internal loopback interface. It also supports back-to-back (port-to-port) loopback tests between two ports. Loopback tests perform continuous transmit and receive asynchronously, and in case of the back-to-back loopback test, both ports perform transmit and receive concurrently. Due to asynchronous transmission, tests do not retry if a packet is not received. Instead, a tunable threshold is used to allow a number of packet drops in heavily loaded test systems. If an error occurs, an error message indicating the type of error, its probable causes, and recommended actions is displayed on the SunVTS console.
For internal and external loopback, xnetlbtest reads supported loopback types from the device driver and performs the tests sequentially for each type. In order to setup back-to-back loopback tests, the probe function registers the first of each two consecutive devices, and the last single device if there are an odd number of devices. For example, in a system with five nxge devices configured for xnetlbtest: nxge0, nxge2, nxge3, nxge4, nxge5, xnetlbtest is registered with nxge0, nxge3, and nxge5. Back-to-back loopback test is performed between (nxge0, nxge2) and between (nxge3, nxge4), nxge5 stands by itself and runs internal or external loopback only. With CLI, you can specify any two ports for back-to-back loopback tests.
The test stops when all packets are received or when there is a time out on the next incoming packet. At the completion of the test, the number of received packets are checked against the number sent. The test passes if (Number packets received) >= (Number packets sent - Threshold) where Threshold is the percentage of package drops allowed. An error is reported if there is an excessive packet drop or data is miscompared.
|Note - Do not run xnetlbtest with netlbtest, or xnetlbtest with nettest, on the same device at the same time. The test will fail.|
You must have the Ethernet card and the device driver installed, a loopback connector in place (external loopback only), and Intervention mode enabled before running xnetlbtest. xnetlbtest cannot run and does not appear in the GUI if the network interface is connected to a live network. xnetlbtest also requires that the Ethernet device be configured offline before running the test. Use the ifconfig(1M) command to bring the Ethernet device down before running xnetlbtest. Enter the following commands to bring the interface down:
A loopback connector provides the network interface driver, the necessary link for testing, while maintaining isolation from a live network. A loopback connector is needed for external loopback and back-to-back loopback. It is not needed for internal loopback.
To reach the dialog box (FIGURE 14-1), right-click on test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, expand the collapsed groups, or your system might not include the device appropriate to this test. Refer to the SunVTS User's Guidefor more details.
FIGURE 14-1 xnetlbtestTest Parameter Options
Refer to TABLE 14-1 for test parameter descriptions.
Since xnetlbtest requires a loopback connector for the external or back-to-back loopback test, it can only be selected when Intervention mode is enabled.
The standard arguments for /opt/SUNWvts/bin/xnetlbtest are described in TABLE 14-3. The command-line syntax is below:
-o lb=<option>,pattern=<option>,thresh=<number>, timeout=<number>,delay=<number>, tpkts=<number>,pktype=<option>,pksz=<number>,debug=<option>,perform=<option>,dev=<device_name>