P_TPLDOFFSET

code: 339

# set
<module-index>/<port-index> P_TPLDOFFSET <tx_offset> <rx_offset>

# get
<module-index>/<port-index> P_TPLDOFFSET ?

Description

Sets the offset of the Xena Test Payload (TPLD) in the transmitted and received packets. The offset is defined as the number of bytes from the start of FCS to the end of the TPLD.

By default, the TPLD offset for both Tx and Rx is 0, which means the TPLD is located at the end of the packet, right before FCS. The maximum allowed offset is advertised in P_CAPABILITIES: max_tpld_offset_bytes, with 1 byte granularity.

TPLD offset
  • When the TPLD offset for Tx is changed, it will affect ALL streams on the port.

  • When the TPLD offset for Rx is changed, it will change where the port looks for the TPLD in the received packets.

Important

If the TPLD offset is set to > 0, the port will automatically disable payload integrity checking, since the TPLD will no longer be located at the end of the packet. This means that the port will not be able to detect payload integrity errors (if the payload area has been modified or corrupted during transmission).

It is recommended to set TPLD offset > 0 only when necessary, and to ensure that the network is reliable enough to avoid payload corruption.

TPLD offset supports both normal and micro TPLD modes in P_TPLDMODE.

Actions

set, get

Parameters

  1. tx_offset: integer, the Test Payload offset for transmitted packets.

    Default is 0. The maximum allowed offset is advertised in P_CAPABILITIES: max_tpld_offset_bytes, with 1 byte granularity.

  2. rx_offset: integer, the Test Payload offset for received packets.

    Default is 0. The maximum allowed offset is advertised in P_CAPABILITIES: max_tpld_offset_bytes, with 1 byte granularity.

Example

# set
input:  0/1 P_TPLDOFFSET 0 0
output: <OK>

# get
input:  0/1 P_TPLDOFFSET ?
output: 0/1 P_TPLDOFFSET 0 0