So I am currently working on understanding how to Receive Side Scaling (RSS) Offloads work inside DPDK (Data Plane Development Kit). So basically from my understanding depending on which offload you have selected, it calculates a Hash value and uses that to place your packet for processing on a specific Queue, which is binded to a specific CPU Core.
So I have 2 Queries regarding this:
When I use RSS offload of **ETH_RSS_IPV6_EX**
, I am unable to get
a Hash value other than Zero, meaning the packet is considered
invalid in accordance to the RSS Offload selected, even though my
Mellanox card supports this offload. I have sent the following Scapy packet but still hash is coming to be 0: sendp(Ether(dst="AA:AA:BB:BB:CC:DD")/IPv6(dst="a:a:a:a:a:a:a:b",src="a:a:a:a:a:a:a:c",nh=60)/IPv6ExtHdrDestOpt(nh=43,options=HAO(hoa="a:a:a:a:a:a:a:d"))/IPv6ExtHdrRouting(nh=59,type=2,addresses=["a:a:a:a:a:a:a:e"]),iface="enp4s0f0",count=1)
.
(On which packets to manipulate I got this resource from https://learn.microsoft.com/en-us/windows-hardware/drivers/network/rss-hashing-types#ndis_hash_ipv6_ex, but I believe there might be a difference between these RSS Offloads and the ones DPDK has.) What does this EX term mean in the RSS Offload.
Apart from that, can someone point me to a resource that explains the RSS Offloads, one at a time, that are inside the DPDK, some of them being the following (If you have an understanding of these, providing a jest of them can also be helpful):
#define ETH_RSS_IPV4 (1ULL << 2)
#define ETH_RSS_FRAG_IPV4 (1ULL << 3)
#define ETH_RSS_NONFRAG_IPV4_TCP (1ULL << 4)
#define ETH_RSS_NONFRAG_IPV4_UDP (1ULL << 5)
#define ETH_RSS_NONFRAG_IPV4_SCTP (1ULL << 6)
#define ETH_RSS_NONFRAG_IPV4_OTHER (1ULL << 7)
#define ETH_RSS_IPV6 (1ULL << 8)
#define ETH_RSS_FRAG_IPV6 (1ULL << 9)
#define ETH_RSS_NONFRAG_IPV6_TCP (1ULL << 10)
#define ETH_RSS_NONFRAG_IPV6_UDP (1ULL << 11)
#define ETH_RSS_NONFRAG_IPV6_SCTP (1ULL << 12)
#define ETH_RSS_NONFRAG_IPV6_OTHER (1ULL << 13)
#define ETH_RSS_L2_PAYLOAD (1ULL << 14)
#define ETH_RSS_IPV6_EX (1ULL << 15)
#define ETH_RSS_IPV6_TCP_EX (1ULL << 16)
#define ETH_RSS_IPV6_UDP_EX (1ULL << 17)
Please feel free for any clarifications or elaboration you require.
Thanks in Advance.
Edit_1 (In response to Vipin's comment):
I am enabling the RSS in this strucutre (ETH_RSS_IPV6_EX):
static struct rte_eth_conf port_conf = { .rxmode = { .mq_mode = ETH_MQ_RX_RSS, .max_rx_pkt_len = RTE_ETHER_MAX_LEN, .split_hdr_size = 0, .offloads = DEV_RX_OFFLOAD_CHECKSUM, }, .rx_adv_conf = { .rss_conf = { .rss_key = NULL, .rss_hf = ETH_RSS_IPV6_EX, //ETH_RSS_IP //Orignal, //AU: Changing Hash Application }, }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, }, };
DPDK Version I am using is 20.08.
NIC being used is Mellanox ConnectX-5
I am using the DPDK l3fwd application as the base and testing on it.
As explained in the comments, ETH_RSS_IPV6_EX
is a generic place holder. Not all drivers support the same. So depending upon PMD, driver and firmware extended features
like RSS based on SRC-IP/DST-IP or some part of fields will be supported. example ETH_RSS_IPV6_TCP
will be used if IPV6 has TCP in it and ETH_RSS_IPV6_TCP_EX
will use if TCP is extended header.
note: igb and ixgbe supports _EX
while i40e does not, you check intel NIC. DPDK mail thread discussion. Hence do not expect every NIC will has same features set for RSS