6.1.3. Multi-Port Packet Transmission and Analysis
1. Initiate Packet Counting on all Test Ports
20. Initiate Packet Transmission on all Test Ports
21. Monitor for Packet Transmission Complete on a Port-by-Port basis
22. Recover Packet Counts
those slots.
# Discontinue any prior packet transmission and counting
pva_rx_pkt 99,99 stop
pva_tx_pkt 99,99 stop
# Configure MAC addresses so Port 1 transmits to Port 2 on each slot and visa versa
pva_pkt_addr 99,99 auto match
# Establish Transmit and Receive Test Ports
set txPortList [list 1,1 2,1 3,1 4,1]
set rxPortList [list 1,2 2,2 3,2 4,2]
# Configure burst packet transmission to all Test Ports
pva_tx_pkt 99,99 size 128 rate line count 1024K
# Start all the Rx counters in parallel - we can ignore the ones
# that we don't care about when we retrieve the results.
pva_rx_pkt 99,99 start
# Start the Tx packet flow on the specific ports that we want transmitting
foreach port $txPortList {
pva_tx_pkt $port start
}
# Loop waiting for the burst packet transmissions to complete
# Remove ports from Tx Port List when measurements are completed
while { [llength $txPortList] > 0 } {
# Check each port's transmission status
foreach port $txPortList {
set status [lindex [pva_tx_pkt $txPort stat] 3]
# If burst transmission complete, remove Test Port from Tx List
if { $status == "IDLE"} {
set idx [lsearch $txPortList $port]
set txPortList [lreplace $txPortList $idx $idx]
}
} ; # Tx Port List
} ; # Scan Loop
# Wait DUT-specific time for all traffic to forward through all DUT ports
after 1000
# Retrieve all of the Rx counts to array variable rxCounts, discontinue packets
foreach port $rxPortList {
set status [pva_rx_pkt $port stat]
set rxCounts($port,Count) [lindex $rawStat 6]
set rxCounts($port,CRCErr) [lindex $rawStat 8]
}
pva_rx_pkt 99,99 stop
pva_tx_pkt 99,99 stop