RSS

Glossary

  • RSS: Receive Side Scaling

    The RSS feature is designed to improve networking performance by load balancing the packets received from a NIC port to multiple NIC RX queues, with each queue handled by a different logical core.

    1. The receive packet is parsed into the header fields used by the hash operation (such as IP addresses, TCP port, etc.)
    2. A hash calculation is performed. The Fortville supports four hash function: Toeplitz, simple XOR and their Symmetric RSS.
    3. The seven LSBs of the hash result are used as an index into a 128/512 entry redirection table. Each entry provides a 4-bit RSS output index.
    4. There are four cases to test the four hash function.
  • RETA: Redirection table

  • PMD: Poll Mode Driver

  • EAL: Environment Abstraction Layer

    The Environment Abstraction Layer (EAL) is responsible for gaining access to low-level resources such as hardware and memory space. It provides a generic interface that hides the environment specifics from the applications and libraries. It is the responsibility of the initialization routine to decide how to allocate these resources (that is, memory space, PCI devices, timers, consoles, and so on).

Instructions

testpmd -- -i --rxq=8 --txq=8 --forward-mode=rxonly --port-topology=chained testpmd -- -i --rxq=8 --txq=8 --forward-mode=rxonly --pkt-filter-mode=perfect --port-topology=chained --txq=32 --rxq=32 --disable-rss

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# For DDP
stop
port stop all
ddp add 0 /root/ddp/gtp.pkgo,/root/ddp/gtp.bak
set verbose 8
port start all
start
# FDIR
flow create 0 ingress pattern eth / ipv4 / udp / gtpc teid is 0x3456 / end actions queue index 12 / end
flow create 0 ingress pattern eth / ipv4 / udp / gtpc teid is 0x3458 / end actions vf id 0 / queue index 2 / end

# RSS
port config 0 pctype mapping update 22 26
port config 0 pctype mapping update 24 27
port config 0 pctype mapping update 25 28
show port 0 pctype mapping
port config all rss 26


flow validate 0 ingress pattern eth / ipv4 / udp / gtpc teid is 0x3456 / end actions queue index 11 / end
List of defined packet classification types:
22: GTPU IPV4 23: GTPU IPV6 24: GTPU 25: GTPC

show port 0 pctype mapping pctype: 36 -> flowtype: 03 I40E_FILTER_PCTYPE_FRAG_IPV4 pctype: 33 -> flowtype: 04 I40E_FILTER_PCTYPE_NONF_IPV4_TCP pctype: 31 -> flowtype: 05 I40E_FILTER_PCTYPE_NONF_IPV4_UDP pctype: 34 -> flowtype: 06 I40E_FILTER_PCTYPE_NONF_IPV4_SCTP pctype: 35 -> flowtype: 07 I40E_FILTER_PCTYPE_NONF_IPV4_OTHER pctype: 46 -> flowtype: 09 I40E_FILTER_PCTYPE_FRAG_IPV6 pctype: 43 -> flowtype: 10 I40E_FILTER_PCTYPE_NONF_IPV6_TCP pctype: 41 -> flowtype: 11 I40E_FILTER_PCTYPE_NONF_IPV6_UDP pctype: 44 -> flowtype: 12 I40E_FILTER_PCTYPE_NONF_IPV6_SCTP pctype: 45 -> flowtype: 13 I40E_FILTER_PCTYPE_NONF_IPV6_OTHER pctype: 63 -> flowtype: 14 I40E_FILTER_PCTYPE_L2_PAYLOAD pctype: 22 -> flowtype: 26

#define I40E_VALID_FLOW(flow_type)
((flow_type) == RTE_ETH_FLOW_FRAG_IPV4 || (flow_type) == RTE_ETH_FLOW_NONFRAG_IPV4_TCP || (flow_type) == RTE_ETH_FLOW_NONFRAG_IPV4_UDP || (flow_type) == RTE_ETH_FLOW_NONFRAG_IPV4_SCTP || (flow_type) == RTE_ETH_FLOW_NONFRAG_IPV4_OTHER || (flow_type) == RTE_ETH_FLOW_FRAG_IPV6 || (flow_type) == RTE_ETH_FLOW_NONFRAG_IPV6_TCP || (flow_type) == RTE_ETH_FLOW_NONFRAG_IPV6_UDP || (flow_type) == RTE_ETH_FLOW_NONFRAG_IPV6_SCTP || (flow_type) == RTE_ETH_FLOW_NONFRAG_IPV6_OTHER || (flow_type) == RTE_ETH_FLOW_L2_PAYLOAD)
#define I40E_VALID_PCTYPE_X722(pctype)
((pctype) == I40E_FILTER_PCTYPE_FRAG_IPV4 || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_TCP || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_UDP || (pctype) == I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP || (pctype) == I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_SCTP || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV4_OTHER || (pctype) == I40E_FILTER_PCTYPE_FRAG_IPV6 || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_UDP || (pctype) == I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP || (pctype) == I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_TCP || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_SCTP || (pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_OTHER || (pctype) == I40E_FILTER_PCTYPE_L2_PAYLOAD)

port config all rss all set verbose 8 start set_hash_global_config 0 toeplitz ipv4-tcp enable get_hash_global_config 0

testpmd> set verbose 1 testpmd> start

testpmd -- -i --rxq=8 --txq=8 --forward-mode=rxonly

ddp get list 0 ddp get info /root/ddp/gtp.pkgo stop port stop 0 ddp add 0 /root/ddp/gtp.pkgo,/root/ddp/gtp.bak ddp get list 0 set verbose 8 port start 0 start

testpmd> port config 0 pctype mapping update 22 22 testpmd> port start 0 testpmd> start testpmd> port config all rss 22

comments powered by Disqus