Hash Key Masks

Multi-CPU Distribution

Platform
Intel® PAC
Napatech SmartNIC
Content Type
User Guide
Capture Software Version
Link™ Capture Software 12.7

Hash key masks

The hash calculation and thereby multi-CPU distribution can be controlled using hash key masks. Hash word bits that are masked out are set to 0. In this way certain parts of the input data can be disregarded from the hash calculation, so that frames with hash values that only differ due to, for instance, port numbers, can be configured to end up in the same stream. This is done using the HashMask NTPL command (see DN-0449).

Hash key mask example

This NTPL example sets up a hash key mask to process RTP and RTCP traffic from a VoIP media stream in the same process/CPU. VoIP allocates an even port number for RTP traffic and the RTP port number + 1 for RTCP traffic. Configuring the mask 0xFFFE for the port number ensures that any set of RTP and RTCP traffic gets the same hash value and ends up in the same stream:

DefineMacro("mHashMaskSrcPort", "HashWord8_Lo")
DefineMacro("mHashMaskDstPort", "HashWord8_Hi")
HashMask[mHashMaskSrcPort = 0xFFFE; mHashMaskDstPort = 0xFFFE] = Hash5Tuple
HashMode=Hash5Tuple
Assign[StreamId=(0..7)] = All