vsrError
vsrError - configure the vsrError parameters for a port on a card on a chassis
SYNOPSIS
vsrError sub-command options
DESCRIPTION
The vsrError command is used to insert deliberate errors in VSR equipped 10Gigabit Ethernet cards.
STANDARD OPTIONS
General Control Options
enableChannelSwap
true | false
If true, enables Channel Swapping. Channels 1-6 are swapped with Channels 7-12, to check for cable crossover. (default = false)
enableDelimiterInsert
true | false
If true, enables the insertion of frame delimiters. Frame Delimiter Error Checking is also enabled. (default = true)
enableErrorCorrection
true | false
If true, enables CRC error correction. (default = true)
enableProtectSwitch
true | false
If true, enables the use of Protection Switching. Protection Switching is triggered when there is loss of synchronization on a single data channel. The data channel can be reconstructed, based on information in the Protection Channel and the other 9 data channels. This is a feature which is always present in the transmission, but which is optionally enabled by the receiver. (default = true)
Section BIP Error Insertion
bipErrorFrameCount
Specifies the number of consecutive frames, within a block of 256 frames, into which Section BIP Errors is injected. The errors repeats every 256 frames. (default = 0)
bipErrorMask
A one-byte mask which indicates which bits in the Section BIP B1 byte to XOR to generate the error. (default = 0)
bipInsertionMode
The mode in which errors are inserted. Options include:
Option | Value | Usage |
---|---|---|
vsrErrorInsertNone |
0 |
(default) Don't insert any errors. |
vsrErrorInsertContinuously |
1 |
Insert errors continuously, until stop is called. |
vsrErrorMomentarily |
2 |
Insert errors once. |
CRC Error Insertion
crcChannelSelection
Selects which channels to insert errors into. A 12-bit bitmask is used to indicate the channels. A `1' indicates that errors should be inserted. Channel 1 is the least significant bit. The values ::vsrChannel1 through ::vsrChannel7 can be or'd together to construct a channel mask. (default = 0)
crcErrorBlockCount
The number of consecutive virtual blocks to inject CRC errors into, within a group of 16 virtual blocks. The errors are repeated every 16 blocks. (default = 0)
crcInsertionMode
The mode in which errors are inserted. Options include:
Option | Value | Usage |
---|---|---|
vsrErrorInsertNone |
0 |
(default) Don't insert any errors. |
vsrErrorInsertContinuously |
1 |
Insert errors continuously, until stop is called. |
vsrErrorMomentarily |
2 |
Insert errors once. |
Frame Delimiter Error Insertion
enableControlByte1
true | false
If true, then the inserted value in frameDelimiterControlByte1 is inserted as a control character. (default = false)
enableControlByte2Ch1To6 true | false
If true, then the inserted value in frameDelimiterControlByte2Ch1To6 is inserted as a control character. (default = false)
enableControlByte2Ch7To12 true | false
If true, then the inserted value in frameDelimiterControlByte2Ch7To12 is inserted as a control character. (default = false)
enableControlByte3
true | false
If true, then the inserted value in frameDelimiterControlByte3 is inserted as a control character. (default = false)
frameDelimiter
ChannelSelection
Selects which channels to insert errors into. A 12-bit bitmask is used to indicate the channels. A `1' indicates that errors should be inserted. Channel 1 is the least significant bit. The values ::vsrChannel1 through ::vsrChannel7 can be or'd together to construct a channel mask. (default = 0)
frameDelimiterControl
Byte1
For the first delimiter byte, the 8b injected value. The default value (hex BC) translates to Codeword K28.5. (default = 0xBC)
frameDelimiterContro
Byte2Ch1To6
For the second delimiter byte, the 8b injected value in channels 1-6. The default value (hex 23) translates to Codeword D3.1. The delimiter for Channels 1-6 is different from that used for Channels 7-12, so the polarity of the patchcord / channel order can be detected. (default = 0x23)
frameDelimiterControl
Byte2Ch7To12
For the second delimiter byte, the 8b injected value.in channels 7-12. The default value shown (hex 55) translates to Codeword D21.2. The delimiter for Channels 0-5 is different from that used for Channels 7-12, so the polarity of the patchcord/channel order can be detected. (default = 0x55)
frameDelimiterControl
Byte3
For the third delimiter byte, the 8b injected value. The default value (hex BC) translates to Codeword K28.5. (default = 0xBC)
frameDelimiterError
FrameCount
The number of consecutive frames to inject CRC errors into, within a block of 16 frames. The error is repeated for each block of 16 frames. If the count = 0, frame delimiter error injection is disabled. (default = 0)
frameDelimiterError
Mask
A 3-bit mask of where errors is inserted. The `1' bit corresponds to the B1 byte, the `2' bit corresponds to the B2 byte and the `4' bit corresponds to the B3 byte. For example, a value of `5' inserts errors into the B1 and B3 bytes. (default = 0)
frameDelimiter
InsertionMode
The mode in which errors are inserted. Options include:
Option |
Value |
Usage |
---|---|---|
vsrErrorInsertNone |
0 |
(default) Don't insert any errors. |
vsrErrorInsertContinuously |
1 |
Insert errors continuously, until stop is called. |
vsrErrorMomentarily |
2 |
Insert errors once. |
Channel Skew Error Insertion
channelSkew
ChannelSelection
Selects which channels to insert errors into. A 12-bit bitmask is used to indicate the channels. A `1' indicates that errors should be inserted. Channel 1 is the least significant bit. The values ::vsrChannel1 through ::vsrChannel7 can be or'd together to construct a channel mask. (default = 0)
channelSkew
DelayTime
The number of clock cycles of delay to be applied to the selected channels. (default = 1)
channelSkew
InsertionMode
The mode in which errors is inserted. Options include:
Option | Value | Usage |
---|---|---|
vsrErrorInsertNone |
0 |
(default) Don't insert any errors. |
vsrErrorInsertContinuously |
1 |
Insert errors continuously, until stop is called. |
vsrErrorMomentarily |
2 |
Insert errors once. |
channelSkewMod
The skew injection mode. Options include:
Option | Value | Usage |
---|---|---|
vsrErrorSingleChannelMode |
0 |
(default) Only delay a single channel. |
vsrErrorMultiChannelMode |
1 |
Each of the selected channels is delayed. |
8b/10b Code Word Error Insertion
enableControl
CharCodeWord
true | false
If true, the injected code word is a control character. (default = false)
enableDisparity
ErrorCodeWord
true | false
If true disparity errors are injected. Note: disparity errors may cause codeword violations. (default = false)
error8b10bChannel
Selection
Selects which channels to insert errors into. A 12-bit bitmask is used to indicate the channels. A `1' indicates that errors should be inserted. Channel 1 is the least significant bit. The values ::vsrChannel1 through ::vsrChannel7 can be or'd together to construct a channel mask. (default = 0)
error8b10bCodeWord
Count
Specifies the number of consecutive codewords, per block of 16 code words, into which code violations are injected. This pattern is repeated for every block of 16 codewords. (default = 0)
error8b10bCodeWord
Value
Specifies the 8b value for the code word to be injected. (default = 0)
error8b10bInsertion
Mode
The mode in which errors are inserted. Options include:
Option | Value | Usage |
---|---|---|
vsrErrorInsertNone |
0 |
(default) Don't insert any errors. |
vsrErrorInsertContinuously |
1 |
Insert errors continuously, until stop is called. |
vsrErrorMomentarily |
2 |
Insert errors once. |
COMMANDS
The vsrError command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
vsrError cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the vsrError command.
vsrError config option value
Modify the vsrError configuration options of the port. If no option is specified, returns a list describing all of the available vsrError options (see STANDARD OPTIONS) for port.
vsrError get chasID cardID portID
Gets the current VSR error configuration of the port with id portID on card cardID, chassis chasID. Call this command before calling vsrError cget option to get the value of the configuration option.
vsrError insertErrorvsrErrorType chasID cardID portID
Insert a single instance of the error indicated in vsrErrorType into the indicated port. The choices of vsrErrorType are:
Option | Value | Usage |
---|---|---|
vsrErrorSectionBip |
1 |
Section BIP errors |
vsrErrorCrc |
2 |
CRC errors |
vsrErrorFrameDelimiter |
3 |
Frame delimiter errors |
vsrErrorChannelSkew |
4 |
Channel skew errors |
vsrError8b10bCode |
5 |
8b/10b code word errors |
vsrErrorAll |
0xEF |
All errors |
vsrErrorStopAll |
0xFF |
Stop all errors |
vsrError set chasID cardID portID
Sets the vsrError configuration of the port with id portID on card cardID, chassis chasID by reading the configuration option values set by the vsrError config option value command.
vsrError setDefault
Sets to IxTclHal default values for all configuration options.
vsrError start chasID cardID portID
Insert errors as indicated by the various options into the indicated port. vsrError stop should be used to stop error insertions if any of the *InsertionMode's are set to vsrErrorInsertContinuously.
vsrError stop chasID cardID portID
Stops all errors insertion on the indicated port.
EXAMPLES
package require IxTclHal
# Connect to chassis and get chassis ID
set host localhost
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]
# Assuming that a VSR card is in slot 39
set card 39
set portList [list [list $chas $card 1]]
# 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
}
# see if the card supports VSR
if {[port isValidFeature portFeatureVsr $chas $card 1] == 0} {
ixPuts "Card $card is not an VSR card"
return 1
}
# ... Normal port, protocol, stream operations
# Insert channel skew on channels 1, 3 and 5 continuously
vsrError setDefault
vsrError config -channelSkewMode vsrErrorMultiChannelMode
vsrError config -channelSkewChannelSelection 21
vsrError config -channelSkewInsertionMode vsrErrorInsertContinuously
vsrError config -channelSkewDelayTime 1
if [vsrError set $chas $card 1] {
ixPuts "Can't vsrError set $chas:$card:1"
return 1
}
# 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
}