
SmartNA-X 1G/10G Modular | Working with the Intelligent Packet Processor (IPP) Module |
73
SmartNA-X
™
1G/10G User Guide 1.4
©
2015 Network Critical Solutions Limited
CONTROLLER>
create packetprocessor transform "remove v2 header"
Step 2: Create a set of Matches
The next step is to add one or more Matches to the Transform. A Match consists of a start-bit, a length, and a value. You
can specify these using custom values, or you can use one of the preset Matches that are built into the system, where
preset values for the start, length and value are used (see
Packet Processor Preset Matches
).
A Match works by examining the packet header for the value at the specified starting position and length. If a match is
found, the Action assigned to the Transform will be taken; if no match is found then the Action is ignored. You may add
multiple Matches to a Transform, but
all
the Matches must match for the Action to be taken.
The following example assigns a custom Match to the Transform named "remove v2 header":
CONTROLLER>
set packetprocessor transform "remove v2 header" match 17 1 1
In the following example, the predefined Match named "Ethertype-C-tag" is assigned to the "remove v2 header"
Transform:
CONTROLLER>
set packetprocessor transform "remove v2 header" named-match Ethertype-C-tag
Step 3: Create a set of Actions
The third step is to add to the Transform a set of Actions that will be taken if a Match is found. The following Actions are
available:
Delete a byte
Remove a specified byte from the packet header.
Replace a byte
Change a specified byte in the packet header to a different value.
Invert bit(s) within a byte (logical XOR)
Change any or all bits within a byte to the opposite value.
Set bit(s) within a byte (logical OR)
Change any or all bits within a byte to have the value 1.
Clear bit(s) within a byte (logical AND)
Change any or all bits within a byte to have the value 0.
Truncate all beyond a specified byte
Delete all bytes beyond a specified byte.
Obfuscate all beyond a specified byte
Change all bytes beyond a specified byte to a new value.
Pass all beyond a specified byte
Pass the rest of the packet without further processing further.
In the following example, an action applied to the Transform named "remove v2 header" will exclusive OR the 48th byte
of the packet with 30.
CONTROLLER>
set packetprocessor transform "remove v2 header" action 48 xor 30
Step 4: Apply the logically named Transform to a port
In this step we apply the Transform to a port, with a priority setting. Each port has eight priority levels (1-8 with 1 being
the highest priority), and each level can have one Transform applied to it. If multiple Transforms match, the Transform
with the highest priority is actioned and the rest are ignored.
In the following example, port 1A has the Transform named "remove v2 header" applied with priority 7: