PEF_MASK#

code: 1778

# set
<module-index>/<port-index> PEF_MASK [<flow_index>, <filter_type>, <protocol_segment_index>] <masks>

# get
<module-index>/<port-index> PEF_MASK [<flow_index>, <filter_type>, <protocol_segment_index>] ?

Description#

This command is valid only for Extended filter mode (check PEF_MODE.).

Defines the mask byte values that select the values specified by PEF_VALUE.

For a chosen <protocol_segment_index> the first byte in the value masks the first byte of the corresponding PEF_VALUE, and so on.

If <protocol_segment_index> = 0, the maximum number of match value bytes that can be set is determined by the total length of the protocol segments specified with PEF_PROTOCOL. E.g. if PEF_PROTOCOL is set to ETHERNET then only 12 bytes can be set. In order to set the full 128 bytes, either specify a detailed protocol segment list, or use the raw protocol segment type. This specifies 12 + 116 = 128 bytes.

If <protocol_segment_index> != 0, only the bytes covered by that segment are manipulated, so if PEF_PROTOCOL is set to ETHERNET VLAN ETHERTYPE ECPRI, then <protocol_segment_index> = 4 selects the 8 bytes of the eCPRI header starting at byte position (12 + 2 + 4) = 18.

For set command where fewer value bytes are provided than specified by the protocol segment, those unspecified bytes are set to zero.

The get command always returns the number of bytes specified by the protocol segment.

Actions#

set, get

Parameters#

  1. masks: hex list, mask byte values

Example#

# set
input:  0/1 PEF_MASK [1,0,1] 0xFFFFFFFFFFFFFFFFFFFFFFFF
output: <OK>

# get
input:  0/1 PEF_MASK [1,0,1] ?
output: 0/1 PEF_MASK [1,0,1] 0xFFFFFFFFFFFFFFFFFFFFFFFF