ixSetPacketGroupMode
ixSetPacketGroupMode - set a group of ports to Packet Group Receive mode
SYNOPSIS
ixSetPacketGroupMode portList [write]
DESCRIPTION
The ixSetPacketGroupMode command sends a message to the IxServer to set the receive mode of a group of ports simultaneously to Packet Group mode. The ports may span multiple chassis. This mode must be used when real-time latency metrics are to be obtained.
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}
write
(By value) (Optional) Valid values:
write: the action is committed to hardware
noWrite: the action is not committed to hardware but just set in IxHAL (default)
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 cardA 1
set portA 1
set cardB 1
set portB 2
set pl1 [list 1,$cardA,$portA]
set pl2 [list 1,$cardA,$portA 1,$cardB,$portB]
set pl3 [list [list $chas $cardA $portA] [list 1 $cardB $portB]]
set pl4 [list [list 1,$cardA,$portA] [list 1,$cardB,$portB]]
# Login before taking ownership
if [ixLogin $username] {
ixPuts $::ixErrorInfo
return 1
}
# Take ownership of the ports we'll use
if [ixTakeOwnership $pl4] {
ixPuts $::ixErrorInfo
return 1
}
map new -type one2one
map config -type one2one
map add 1 $cardA $portA 1 $cardB $portB
map add 1 $cardB $portB 1 $cardA $portA
if {[ixSetPacketGroupMode pl1 write] != 0} {
puts "Could not set PacketGroup mode for $pl1"
}
map new -type one2one
map config -type one2one
map add 1 $cardA $portA 1 $cardB $portB
map add 1 $cardB $portB 1 $cardA $portA
if {[ixSetPacketGroupMode pl1 write] != 0} {
puts "Could not set PacketGroup mode for $pl1"
}
if {[ixSetPacketGroupMode pl2 write] != 0} {
puts "Could not set PacketGroup mode for $pl2"
}
if {[ixSetPacketGroupMode pl3 write] != 0} {
puts "Could not set PacketGroup mode for $pl3"
}
if {[ixSetPacketGroupMode pl4 write] != 0} {
puts "Could not set PacketGroup mode for $pl4"
}
if {[ixSetPacketGroupMode one2oneArray write] != 0} {
puts "Could not set PacketGroup mode for $one2oneArray"
}
# Let go of the ports that we reserved
ixClearOwnership $pl4
# Disconnect from the chassis we're using
ixDisconnectFromChassis $host
# If we're running on UNIX, disconnect from the TCL Server
if [isUNIX] {
ixDisconnectTclServer $host
}