IPFMode Command

Reference Documentation

Napatech SmartNIC
Reference Information

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

Supported Options Per Feature Set


Feature Sets





















The syntax for IPFMode is shown below.

<IPFModeAction>                 ::= 'IPFMode' '[' <IPFModeOptionSpec> ']''=' <PortTest>
<IPFModeOptionsSpec>            ::= <IPFModeOption> [ ';' <IPFModeOptionSpec> ]
<IPFModeOption>                 ::= ( 'StreamId' '=' <StreamIdSpec> ) |
                                    ( 'Timeout' '=' <TimeoutSpec> ) |
                                    ( 'TablePersist' '=' <TablePersistSpec> ) |
                                    ( 'ClassifyUnmatched' '=' <ClassifyUnmatchedSpec> ) |
                                    ( 'ColorInherit' '=' <TrueFalseValue> ) |
                                    ( 'Tag' '=' <Identifier> )
<TimeoutSpec>                   ::= '0' | '1' | '2' | ... | '100000' | '0x0' | '0x1' | '0x2' | ... | '0x186A0'
<TablePersistSpec>              ::= 'TimeoutOnly' | 'LastFragment'
<ClassifyUnmatchedSpec>         ::= 'None' | 'Outer' | 'All'

Each <IPFModeAction> command enables IPF and configures how to handle unmatched fragments from one or more ports. You can only issue one IPFMode command at a time, so if you want to change the behavior, you will have to delete the old command first.

When an IP fragment has not been received for a period equal to 'Timeout', the table entry associated with the datagram is de-allocated from the table. The unit for 'Timeout' is 100 us.

The 'StreamId' option must be specified - it has no default value.

If 'TablePersist' is set to 'LastFragment', the associated table entry will be de-allocated when the last fragment for an IP datagram is received (irrespective of whether all fragments for the datagram have been received), or when the entry reaches its timeout limit.

If 'TablePersist' is set to 'TimeoutOnly', the associated table entry is only de-allocated when the entry reaches its timeout limit, reception of the last fragment will not de-allocate the entry.

When 'ClassifyUnmatched' is left out or set equal to the default setting of 'None', the adapter defragments IP fragments. When 'ClassifyUnmatched' is 'Outer', the adapter classifies all IP packets that are fragmented in the outermost network layer as unmatched. When 'ClassifyUnmatched' is 'All', the adapter classifies all IP packets that are fragmented at either the outer-most level or inside a tunnel as unmatched.

The 'ColorInherit' option controls whether the coloring applied to the first fragment should be inherited by the following fragments. When set to 'True' (default), all fragments will receive the same color as the first fragment. When set to 'False', fragments will be colored individually. Note that color inheritance only applies to hardware de-fragmentation (i.e. ClassifyUnmatched=None)

For a description of the 'Tag' option please refer to Tag Option.

Note 1: The ports specified in the Port Tests"<PortTest>" must include all ports on the adapters that are involved. Note 2: When 'ClassifyUnmatched' is either'Outer' or 'All', the adapter performs no defragmentation and silently ignores the values of 'Timeout' and 'TablePersist'. Note 3: IP packets that are not fragmented are not affected by the 'ClassifyUnmatched' option.

IPFMode Examples

This section describes some examples of using the IPFMode command.

Setting up Handling of Fragments from Port 0 to 3

The following command enables the IP fragment handling for ports 0 to 3 and sends all unmatched fragments to streams 2 and 3. The timeout for the datagram lookup table is set to 10000 us and the datagram lookup table will be cleaned when last fragments are received.

The IPFMode NTPL example is shown below.

IPFMode[StreamId=(2..3); Timeout=100; TablePersist=LastFragment] = port==(0..3)

Performing Software Defragmentation of Fragments from Ports 0 through 3

The following NTPL command disables IP defragmentation in the adapter and causes the adapter to send IP packets that are fragmented at the outermost network layer to stream zero. An application can use this setup to receive fragments on the same stream, which enables a single thread to receive fragments that belong together.

IPFMode[StreamId=0; ClassifyUnmatched=All] = port==(0..3)