You are here: Foswiki>NetFPGA/OneGig Web>ContributedAnyToAny (20 Jun 2008, Lockwood)EditAttach

Contributed-Any to Any

Contribute by: Nick Weaver


Connect all four ports on a NetFPGA board into a Gigabit Ethernet switch, load the ethernet NIC firmware.

Untar the ntest directory.

in the directory:

  ./make_test.sh
will fetch the Click sourcecode and compile

  sudo ./run_test.sh
will run the "any to any" random-size test

  sudo ./run_size.sh $SIZE
will run the "any to any" fixed-size test.

Everything is self contained and runs from the directory. It is designed to be compiled as an ordinary user but needs to be run as root.

This test invokes Click to run an "any to any" send test. It first sends a total of 16 ethernet Broadcast packets, with the SRC mac as CA:FE:BA:BE:00:p# and the dest MAC as FF:FF:FF:FF:FF:FF, ethertype 0x890F (an unassigned ethertype).

It will then repeat forever, sending a packet from a pseudo-random SRC to a different pseduo-random DST, ethertype 0x890F. The packet is a (60 <= pseudo random size <= 1514 or fixed, depending). The first 4 bytes are the index of the packet, with the rest as pseudo-random payload. The pseudo-random function is a reduced round 32 bit RC5.

Any packet which is received on the wrong port or which is duplicated results in a warning message and adds to the warning count. Warnings can occur if a switch's MAC cache is zeroed, or if a long routing path resulted in a duplicate packet (the NF2 ports can be plugged into different switches, as long as they are within the same Ethernet LAN).

Any packet which is corrupted (wrong size, wrong payload) results in an error message and an add to the error count.

Every 10K packets, statistics are printed out, in the form:

 packets: 100000 lost/holes: 0 bytes: 78588795 warnings: 0 errors: 0
    pps:  11111   bps:  69856704

Any packet which is provably lost (some minor reordering is allowed to occur, thus 0-8 holes are natural) are printed out, in the form such as:

 Loss: index: 1378470 from: 3 to: 0 size: 822
 Loss: index: 1378468 from: 2 to: 3 size: 663
 Loss: index: 1378463 from: 3 to: 1 size: 1088
 Loss: index: 1378462 from: 1 to: 3 size: 850
 Loss: index: 1378460 from: 3 to: 0 size: 1473
 Loss: index: 1378458 from: 3 to: 1 size: 330
 Loss: index: 1378452 from: 1 to: 3 size: 434
 Loss: index: 1378451 from: 1 to: 3 size: 434
 Loss: index: 1378449 from: 2 to: 3 size: 362
 Loss: index: 1378446 from: 2 to: 3 size: 1319
 Loss: index: 1378444 from: 0 to: 3 size: 389
 Loss: index: 1378440 from: 3 to: 0 size: 183
 Loss: index: 1378438 from: 0 to: 3 size: 770
 Loss: index: 1378437 from: 2 to: 3 size: 506
 Loss: index: 1378435 from: 1 to: 3 size: 593
 Loss: index: 1378434 from: 0 to: 3 size: 868
 Loss: index: 1378432 from: 3 to: 0 size: 1033
 Loss: index: 1378431 from: 3 to: 0 size: 812

(this loss event was triggered by disconnecting port 3)

Loss events are queued and printed every 10k packets, thus the decrementing order.

Prerequisites
Working NF2 plugged into a >= 4 port Ethernet switch
Known bugs
None
Target release
Beta
Due Date
Available now

Works reproducibly
Yes. Multiple users at Stanford have successfully run the test. Only known failures are due to using an old (pre alpha) driver. When driver was updated, test operated normally
Topic revision: r1 - 20 Jun 2008 - 20:09:07 - Lockwood