Configuration

Feature Set N-ANL11

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Feature Description

Correlation key calculation is enabled and configured through NTPL.

NTPL program flow

The general program flow for configuring correlation key calculation includes the following steps:

  • Define and select a packet descriptor that includes the correlation key.

  • Define and select correlation key recipes to specify correlation key ranges, masks and, for deduplication, group IDs (see Deduplication).

  • Use Assign commands to create filters that apply the correlation key recipes.

This program flow is illustrated in Example.

Packet descriptors

The following packet descriptors offer the host application access to the calculated correlation key:
  • DYN4. By default DYN4 does not include the correlation key. When specifying the DYN4 descriptor, set the option ColorBits=8 to make the 64-bit correlation key available in the color1 field of DYN4.

  • EXT9. The lower 24 bit of the correlation key are available in the dedupCrc field of EXT9.
    Note: The 24-bit correlation key in EXT9 is supported for compatibility with legacy applications. The full 64-bit correlation key in DYN4 provide much better uniqueness.

Correlation key range

The range of the frame for which the correlation key is calculated is specified as the location of the beginning of the range and the location of the end of the range.

Frame data selection for calculating the correlation key.

Each location is calculated as a dynamic protocol offset plus a signed static offset. In NTPL, the syntax is ProtocolOffset[StaticOffset].

The Begin location defaults to StartOfFrame[0] and the End location defaults to EndOfFrame[-4] (that is, excluding the FCS).

Dynamic protocol offsets

The following protocol offsets are available for specifying the range for calculating the correlation key:

Layer Outer Protocol Offset Inner Protocol Offset Description
L2 StartOfFrame   Start of frame, including ISL encapsulation
Layer2Header InnerLayer2Header Layer 2 header
FirstVLAN InnerFirstVLAN First VLAN tag
MPLS FirstMPLS InnerFirstMPLS First MPLS tag
L3 Layer3Header InnerLayer3Header Layer 3 Header
IdentificationField InnerIdentificationField Identification field
DestinationIp InnerDestinationIp Destination IP
L4 Layer4Header InnerLayer4Header Layer 4 header
Layer4Payload InnerLayer4Payload Start of layer 4 payload
TunnelPayload   Start of tunneled payload
L3 Layer3PayloadEnd InnerLayer3PayloadEnd End of layer 3, excluding padding
L2 EndOfFrame   End of frame, including ISL encapsulation and FCS

Max length

A maximum length of the range can be specified. The length defaults to 10.000.

Masks

To prevent for example dynamic header information from affecting the correlation key calculation, parts of the range can be excluded.

Exclusion of dynamic fields through masking

Two exclusion mechanisms are available:

  • One custom defined field mask

  • One list of predefined mask elements

Custom field mask

A custom 32-bit mask can be defined for excluding a part of the frame from the correlation key calculation. The custom mask is specified as a 32-bit value and a location. The location is composed of a dynamic protocol offset plus a signed static offset, similar to the begin and end locations of the range for which the correlation key is calculated.

If part or all of the custom mask is outside of the correlation key range, then only the part inside will be applied.

Predefined mask elements

One list of predefined mask elements can be defined for excluding parts of the frame from the correlation key calculation.

Both outer and inner protocol fields are available as mask elements. The list must consist of either outer or inner mask elements.

A mask element is ignored if the corresponding protocol field is not present in the frame.

The following predefined mask elements can be used to exclude parts of the frame from the correlation key calculation:

Layer Outer Mask Element Inner Mask Element Description
L3 IPTOSDSCP InnerIPTOSDSCP IPv4 Type Of Service DSCP
IPTOSECN InnerIPTOSECN IPv4 Type Of Service ECN
IPID InnerIPID IPv4 Identification field
IPTTL InnerIPTTL IPv4 Time To Live field
IPFLAGS InnerIPFLAGS IPv4 Flags field
IPCHK InnerIPCHK IPv4 Header Checksum
IPSRC InnerIPSRC IPv4/IPv6 Source Address
IPDST InnerIPDST IPv4/IPv6 Destination Address
IPFLOW InnerIPFLOW IPv6 Flow Label
IPHOP InnerIPHOP IPv6 Hop Limit
IPTC InnerIPTC IPv6 Traffic Class
IPNXTHDR InnerIPNXTHDR IPv6 Next Header
L4 TCPSEQ InnerTCPSEQ TCP Sequence
TCPSRC InnerTCPSRC TCP Source port
TCPDST InnerTCPDST TCP Destination port
TCPCHK InnerTCPCHK TCP Checksum
UDPCHK InnerUDPCHK UDP Checksum
UDPSRC InnerUDPSRC UDP Source port
UDPDST InnerUDPDST UDP Destination port
Tip:

To exclude L2, VLAN or MPLS header fields, specify a Begin location after the header field that you want to exclude, optionally in combination with a custom mask.