Configuring Receive Side Scaling (RSS)

Link-Inline™ Software User Guide

Platform
Napatech SmartNIC
Content Type
User Guide
Capture Software Version
Link-Inline™ Software 3.2

The RSS feature can be configured on ports or per flow.

Port RSS configuration

The following testpmd commands configure RSS for GTP-U traffic on all ports. Then, it displays the RSS configuration for port 0. The TEID field of the GTP-U header is used for hash calculation.
port config all rss gtpu
show port 0 rss-hash
An output example:
testpmd> port config all rss gtpu
rss_hf 0x800000

testpmd> show port 0 rss-hash
RSS functions:
 gtpu
The following testpmd commands demonstrate how to configure RSS for IPv4 traffic on all ports and set the RSS hash to be calculated using headers on the inner layer. Then, it displays the RSS configuration for port 0. IPv4 source and destination addresses on the inner layer are used for hash calculation.
port config all rss ipv4
port config all rss level-inner
show port 0 rss-hash
An output example:
testpmd> port config all rss ipv4
rss_hf 0x4

testpmd> port config all rss level-inner
rss_hf 0x8000000000004

testpmd> show port 0 rss-hash
RSS functions:
 ipv4

Flow RSS configuration

The following testpmd commands create a flow rule specifying that IPv4/GTP-U traffic received on port 0 are forwarded to queues 1 through 5 on the host. RSS for hash calculation is done using the TEID field of GTP-U header.
flow create 0 pattern ipv4 / udp / gtp / end actions rss types gtpu end queues 1 2 3 4 5 end / end
The following testpmd commands create a flow rule specifying that IPv4/GTP-U traffic received on port 0 are forwarded to queue 1 through 5 on the host. RSS for hash calculation is done using IPv4 source and destination addresses on the inner layer.
flow create 0 pattern any num is 3 / ipv4 / end actions rss level 2 types ipv4 end queues 1 2 3 4 5 end / end
The following testpmd commands create a flow rule specifying that VLAN/IPv4/GTP-U traffic received on port 0 are forwarded to queue 0 through 6 on the host. RSS for hash calculation is done using the outermost VLAN tag, the TEID field on the GTP-U header and the IPv4 destination address on the outer layer.
flow create 0 pattern vlan / ipv4 / udp / gtp / end actions rss types s-vlan gtpu ipv4 l3-dst-only end queues 0 1 2 3 4 5 6 end / end
The following testpmd commands create a flow rule specifying that Ethernet traffic received on port 0 are forwarded to queue 1 through 5 on the host. RSS for hash calculation is done using the IPv4/IPv6 source and destination addresses. The Toeplitz algorithm is selected with a user-defined key.
flow create 0 pattern eth / end actions rss types ipv4 ipv6 end func toeplitz key 0123456789abcdef key_len 16 queues 1 2 3 4 5 end / end
The flow dump command can be used to display all flow rules associated with a specified port. For example:
flow dump 0 all
For detailed information on the flow dump command, see Displaying Flow Information.