Use this command to configure a custom filter. The statistics and/or traces for configured filters are obtained for the packet matching configured data at the specific offset. If the mask is not specified, the default mask is 0xFF.
You can specify three different offsets specified as match conditions. Each time a custom filter is configured, the switch overrides the previous configuration.
Note
The offset should consider the VLAN tag headers because the packet to the CPU is always a tagged packet.Default | None |
Format | cpu-traffic direction {tx|rx|both} match cust-filter offset1 data1 [mask mask1] offset2 data2 [mask mask2] offset3 data3 [mask mask3] |
Mode | Global Config |
Parameter | Description |
---|---|
offset1 offset2 offset3 |
Up to three offsets, using the format 0xXXXX where XXXX is four hexadecimal digits. |
data1 data2 data3 |
The two-byte matching value for the corresponding offset, using the format 0xXXXX. |
mask1 mask2 mask3 |
The optional two-byte mask for the corresponding offset, using the format 0xXXXX. |
The following shows two examples of this command.
cpu-traffic direction both match cust-filter 0x0001 0xaabb mask 0xffff cpu-traffic direction both match cust-filter 0x0001 0xaabb 0x0081 0xccdd 0x00c1 0xeeff