Hash Key Type 9: 5-Tuple Sorted

Napatech Link™ Software Features

Platform
Napatech SmartNIC
Content Type
Feature Description
Capture Software Version
Link™ Capture Software 12.0

Hash key data

Hash key type 9 is a 5-tuple where the hash key data is the contents of these packet header fields:

  • 32-bit IPv4 / 128-bit IPv6 source address
  • 32-bit IPv4 / 128-bit IPv6 destination address
  • 16-bit UDP, TCP or SCTP source port number
  • 16-bit UDP, TCP or SCTP destination port number
  • 8-bit IPv4/IPv6 protocol number / next header

The hash key data for hash key type 9 is the same as for hash key type 8 (see Hash Key Type 8: 5-Tuple) except that it is sorted, so that the IPv4/IPv6 address with the highest value is used as hash key data word 0 / 0 – 3 and the IPv4/IPv6 address with the lowest value is used as hash key data word 4 / 4 – 7. This means that frames sent from IP address A to IP address B will generate the same hash value as frames sent from IP address B to IP address A.

Note: The source and destination addresses and ports can be swapped after sorting (see Tuple Swap).

If the IPv4/IPv6 source address is used as hash key data word 0 / 0 – 3, the UDP/TCP/SCTP source port number is placed in the upper 16 bits of hash key data word 8, and the UDP/TCP/SCTP destination port number is placed in the lower 16 bits of hash key data word 8. If the IPv4/IPv6 destination address is used as hash key data word 0 / 0 – 3, the UDP/TCP/SCTP destination port number is placed in the upper 16 bits of hash key data word 8, and the UDP/TCP/SCTP source port number is placed in the lower 16 bits of hash key data word 8.

The IPv4/IPv6 protocol number / next header is placed in a separate 8-bit word.

For IPv4 packets, hash key data words 1 – 3, 5 – 7 and 9 are all zeros for hash key type 9. For IPv6 packets, hash key data word 9 is all zeros for hash key type 9.

Algorithm for hash value generation using hash key type 9 for IPv4 packets

This figure shows the algorithm for hash value generation based on hash key type 9 for IPv4 packets.


Page-1 Center drag circle.18 Generate hash value using hash key type 9 Generate hash value using hash key type 9 Dynamic connector.18 Decision.19 Is an IPv4 packet present in the frame? Is an IPv4packet present inthe frame? Dynamic connector.4 Sheet.5 Yes Yes Decision.23 Is IPv4 source address larger than IPv4 destination address? Is IPv4 source address larger than IPv4 destination address? Dynamic connector.24 Sheet.8 Yes Yes Process.26 Use IPv4 source address as hash key data word 0. Use IPv4 des... Use IPv4 source address as hash key data word 0.Use IPv4 destination address as hash key data word 4.Use UDP/TCP/SCTP source port as upper 16 bits of hash key data word 8.Use UDP/TCP/SCTP destination port as lower 16 bits of hash key data word 8. Process.3 Use IPv4 destination address as hash key data word 0. Use IPv... Use IPv4 destination address as hash key data word 0.Use IPv4 source address as hash key data word 4.Use UDP/TCP/SCTP destination port as upper 16 bits of hash key data word 8.Use UDP/TCP/SCTP source port as lower 16 bits of hash key data word 8. Dynamic connector.11 Sheet.12 No No Sheet.13 No No Process.27 Go to common hash value generation. Go to common hash value generation. Dynamic connector Dynamic connector.28 Dynamic connector.29 Decision.18 Is a UDP, TCP or SCTP frame embedded in the IPv4 frame? Is a UDP, TCP orSCTP frame embedded in the IPv4 frame? Dynamic connector.19 Sheet.20 Yes Yes Dynamic connector.21 Sheet.22 No No

Algorithm for hash value generation using hash key type 9 for IPv6 packets

This figure shows the algorithm for hash value generation based on hash key type 9 for IPv6 packets.


Page-1 Center drag circle.23 Generate hash value using hash key type 9 Generate hash value using hash key type 9 Dynamic connector.24 Decision.25 Is an IPv6 packet present in the frame? Is an IPv6packet present inthe frame? Dynamic connector.26 Sheet.5 Yes Yes Decision.28 Is IPv6 source address larger than IPv6 destination address? Is IPv6 source address larger than IPv6 destination address? Dynamic connector.29 Sheet.8 Yes Yes Process.31 Use IPv6 source address as hash key data words 0 - 3. Use IPv... Use IPv6 source address as hash key data words 0 - 3.Use IPv6 destination address as hash key data words 4 - 7.Use UDP/TCP/SCTP source port as upper 16 bits of hash key data word 8.Use UDP/TCP/SCTP destination port as lower 16 bits of hash key data word 8. Process.32 Use IPv6 destination address as hash key data words 0 - 3. Us... Use IPv6 destination address as hash key data words 0 - 3.Use IPv6 source address as hash key data words 4 - 7.Use UDP/TCP/SCTP destination port as upper 16 bits of hash key data word 8.Use UDP/TCP/SCTP source port as lower 16 bits of hash key data word 8. Dynamic connector.33 Sheet.12 No No Sheet.13 No No Process.36 Go to common hash value generation. Go to common hash value generation. Dynamic connector.37 Dynamic connector.38 Dynamic connector.39 Decision.40 Is a UDP, TCP or SCTP frame embedded in the IPv6 frame? Is a UDP, TCP orSCTP frame embedded in the IPv6 frame? Dynamic connector.41 Sheet.20 Yes Yes Dynamic connector.43 Sheet.22 No No

Validity

Hash key type 9 is valid for frames containing an IPv4 packet or an IPv6 packet with a UDP, a TCP or an SCTP packet as payload.