Action Command

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: Action Command

This section specifies the syntax and semantics for the action command.

Supported Options Per Feature Set

Supported Feature Sets
N-ANL4
N-ANL5
N-ANL6
N-ANL7
N-ANL8
N-ANL9
N-ANL10
N-ANL11
  X

The syntax for Action is shown below.

<ActionAction>          ::= 'Action' '[' <ActionOptionSpec> ']' '=' <ActionValueSpec>
<ActionOptionSpec>      ::= <ActionOption> [ ';' <ActionOptionSpec> ]
<ActionOption>          ::= ( 'Tag' '=' <Identifier> ) |
                            ( 'VLANTPID' '=' <16-bit value> |
                            ( 'Width' '=' <32-bit value> )
<ActionValueSpec>       ::= <ActionValue> [ ',' <ActionValueSpec> ]
<ActionValue>           ::= '{' [ <ActionValueIndex> ';' ] <ActionValueOptionSpec> '}'
<ActionValueIndex>      ::= 'Index' '=' <NumberSpec>
<ActionValueOptionSpec> ::= <ActionValueOption> [ ';' <ActionValueOptionSpec> ]
<ActionValueOption>     ::= ( 'StreamId' '=' ( <StreamIdSpec> | 'Key' | <OverwriteSpec> ) |
                            ( 'DestinationPort' '=' <PortNumberSpec> ) |
                            ( 'VLAN' '=' <VlanNumberSpec> )

Assigning Actions

Action allows fine-grained control over exactly what will happen to incoming packets. Action enables load-balancing, but also allows simpler functionality equivalent to Assign commands using StreamID and DestinationPort options. Action supersedes these Assign command options. When a packet hits a filter where an Action is assigned, then normal hash functionality is applied to decide which entry in Action is used. Round-robin and other forms of distribution is also supported.

VLAN injection is supported by Action, which can insert a IEEE 802.1Q header into packets that hit the assigned filters. The valid values for VLAN TPID is 0x8100, 0x88a8, and 0x9100. Action allows total control over the VLAN TCI field, thus any 16-bit value can be inserted, including reserved values.

It is a good idea to visualize Action as a simple allocated array of C-style structs, in which changes are made, before it is send of to the hardware. So if Width is set to 4, then an array of size 4 is allocated. Indexes are then used to make changes in the array. The total available size for Action is 4096, which is shared between all Actions. It is to allocate the entire array for a single Action, but then there will be no available resources for following Assign commands. The available space is not evaluated before the Assign command is used.

The default value of Width is "1", and the default value of Index is "0..Width-1", in other words the entire array. The default value of VLANTPID is "0x8100".

Action Examples

Uneven StreamID

In this example 50% of all traffic will be sent to StreamID 0, 25% to StreamID 1, and 25% will be dropped.

Action[Tag=example; Width=4]={Index=0..1; StreamID=0}, {Index=2; StreamID=1}
Assign[Action=example]=All

Index StreamId DestinationPort VLAN
0 0 Disabled Disabled
1 0 Disabled Disabled
2 1 Disabled Disabled
3 Disabled Disabled Disabled

Receive, retransmit, and VLAN inject

In this example the incoming traffic on port 0 will be evenly received on StreamID 0 and 1. Then all packets will be retransmitted on port 1. All packets will be injected with VLAN tag 100-103, depending on their hash.

Action[Tag=example; VLANTPID=0x8100; Width=4]={StreamID=0,0,1,1; DestinationPort=1; VLAN=100..103}
Assign[Action=example]=Port==0

Index StreamId DestinationPort VLAN
0 0 1 100
1 0 1 101
2 1 1 102
3 1 1 103