ixStartPacketGroups

ixStartPacketGroups - start calculating real-time latency on a group of ports simultaneously

SYNOPSIS

ixStartPacketGroups portList

DESCRIPTION

The ixStartPacketGroups command sends a message to the IxServer to start calculating real-time latency metrics on a group of ports simultaneously. The minimum, maximum and average latencies are calculated for each packet group ID (PGID). The ports may span multiple chassis. Ensure to clear timestamps on all send and receive ports before starting latency measurements.

ARGUMENTS
portList

(By reference) The list of ports in one of the following formats:

one2oneArray, one2manyArray, many2oneArray, many2manyArray

Or a reference to a list. For example, pl after

set pl {{1 1 1} {1 1 2} {1 1 3} {1 1 4}} -or-

set pl {1,1,1 1,1,2 1,1,3 1,1,4}

RETURNS
0

No error; the command was successfully delivered to the IxServer.

1

Error; the command was delivered to the IxServer but it could not process the message.

EXAMPLES

package require IxTclHal

set host galaxy

set username user

# Check if we're running on UNIX - connect to the TCL Server

# which must be running on the chassis

if [isUNIX] {

if [ixConnectToTclServer $host] {

ixPuts "Could not connect to $host"

return 1

}

}

# Now connect to the chassis

if [ixConnectToChassis $host] {

ixPuts $::ixErrorInfo

return 1

}

# Get the chassis ID to use in port lists

set chas [ixGetChassisID $host]

set card 1

set port 1

set portList [list [list $chas $card $port]]

# Login before taking ownership

if [ixLogin $username] {

ixPuts $::ixErrorInfo

return 1

}

# Take ownership of the ports we'll use

if [ixTakeOwnership $portList] {

ixPuts $::ixErrorInfo

return 1

}

# Set up port for loopback and packet group mode

port setDefault

port config -loopback true

port config -receiveMode portPacketGroup

port set $chas $card $port

# Set up packet group configuration

packetGroup setDefault

packetGroup config -groupIdOffset 52

packetGroup config -latencyControl cutThrough

packetGroup config -preambleSize 8

packetGroup config -signature {08 71 18 05}

packetGroup config -signatureOffset 48

packetGroup setRx $chas $card $port

# Configure fir (Frame Identification Record) for stream

stream setDefault

stream config -fir true

# Set UDF 1 to count up the packet group

udf setDefault

udf config -enable true

udf config -continuousCount false

udf config -countertype c16

udf config -initval {00 00}

udf config -offset 52

udf config -repeat 10

udf config -updown uuuu

udf set 1

# Write config to stream

stream set $chas $card $port 1

# Set up packet group configuration

packetGroup setDefault

packetGroup config -groupId 1

packetGroup config -groupIdOffset 52

packetGroup config -insertSignature true

packetGroup config -signature {08 71 18 05}

packetGroup config -signatureOffset 48

packetGroup setTx $chas $card $port 1

# Write config to hardware, error checking omitted for brevity

ixWritePortsToHardware portList

after 1000

ixCheckLinkState portList

# Start packet group operation

if {[ixStartPacketGroups portList] != 0} {

ixPuts "Could not start packet groups on $portList"

}

# And then transmit

ixStartTransmit portList

# Let go of the ports that we reserved

ixClearOwnership $portList

# Disconnect from the chassis we're using

ixDisconnectFromChassis $host

# If we're running on UNIX, disconnect from the TCL Server

if [isUNIX] {

ixDisconnectTclServer $host

}

SEE ALSO

ixStartPortPacketGroups, ixStopPortPacketGroups, ixStopPacketGroups