1

We want a specific lcore to receive packets belonging to the both sides of a TCP connection. I.e. packets going from client to Server (CtoS) and those which going from Server to Client (StoC), both be directed to a single lcore. It seems that the RSS guarantees the packets belonging to a stream (one way data flow) to be directed to the same lcore. To direct both side of a direction to the same lcore we need a symmetric RSS.

  • How we can configure a NIC (e.g. Intel 82599) to direct packets belonging to connection to a specific lcore?
  • Is there any way to direct packets belonging to a connection to a specific lcore when the CtoS traffic and StoC traffic are on different ports on the same NIC?
  • How about different ports on different NICs?
4

1 回答 1

3

Symmetrical hashing is not directly supported yet by DPDK (as of 16.07). However, there are workarounds discussed in the mailing list here. You might also find this helpful.

Another option is to do the load balancing yourself. For example, you'd have an lcore that pulls on the NIC queues, parse the packet, extract the source/destination ips and ports and calculate a symmetric value (an easy approach would be (src_port + dst_port + src_ip + dst_ip) % NUM_OF_SOFTWARE_RINGS

For each lcore worker you'd need to have an rte_ring to connect the load balancing lcore with it. Note that this approach is not nearly as performant as direct RSS.

于 2016-09-26T17:16:34.243 回答