Skip to content

PacketGeneratorRegressionTests

Adam edited this page Jan 18, 2013 · 4 revisions

Table of Contents

Packet generator regression tests

The regression tests verify the functionality of the packet generator. In order to run the tests, you need to have the machine connected for the regression tests as stated in the Run Regression Tests section of the Guide.

After connecting the cables. Run the following command to run the regression tests.

 nf21_regress_test.pl --project packet_generator

Test 1: Sending Packets

Name :
test_send_pkts
Description :
Load and send two pcap files from nf2c0 and nf2c1. Verify the counters
      # Initialize netfpga hardware
      # Load and send two pcap files from nf2c0 and nf2c1
      # Check counters to verify number of packets sent.
Location
projects/packet_generator/regress/test_send_pkts
Output
 SUCCESS!

Test 2: Capture

Name :
test_capture
Description :
Send two pcap files from eth1 and eth2. Capture the output using the packet generator (capture mode) and verify the packets received.
      # Initialize netfpga hardware
      # Start packet generator in capture mode
      # Send two pcap files from eth1 and eth2 using tcpreplay
      # Compare the captured pcap files to the originals and find errors.
Location
projects/packet_generator/regress/test_capture
Output
 SUCCESS!

Test 3: Iterations

Name :
test_iterations
Description :
Load and send two pcap files from nf2c0 and nf2c1 with a specified number of iterations for each. Verify the packet sent counters.
      # Initialize netfpga hardware
      # Load and send two pcap files from nf2c0 and nf2c1 with 10 iterations for nf2c0 and 100 iterations for nf2c1
      # Check counters to verify number of packets sent.
Location
projects/packet_generator/regress/test_iterations
Output
 SUCCESS!

Test 4: Rate Limiter

Name :
test_rate_limiter
Description :
Load and send two pcap files from nf2c0 and nf2c1 while setting the rate to 1 Mbps. Verify the sending rate.
      # Initialize netfpga hardware
      # Load and send two pcap files from nf2c0 and nf2c1 (specify 1 Mbps sending rate)
      # Capture the sent packets to a pcap file
      # Determine the sending rate from the pcap file generated
Location
projects/packet_generator/regress/test_rate_limiter
Output
 SUCCESS!
Clone this wiki locally