Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio-net: support inner header hash #173

Closed
hengqiali opened this issue Jun 10, 2023 · 2 comments
Closed

virtio-net: support inner header hash #173

hengqiali opened this issue Jun 10, 2023 · 2 comments

Comments

@hengqiali
Copy link

hengqiali commented Jun 10, 2023

1. Currently, a received encapsulated packet has an outer and an inner header, but
the virtio device is unable to calculate the hash for the inner header. The same
flow can traverse through different tunnels, resulting in the encapsulated
packets being spread across multiple receive queues (refer to the figure below).
However, in certain scenarios, we may need to direct these encapsulated packets of
the same flow to a single receive queue. This facilitates the processing
of the flow by the same CPU to improve performance (warm caches, less locking, etc.).

               client1                    client2
                  |        +-------+         |
                  +------->|tunnels|<--------+
                           +-------+
                              |  |
                              v  v
                      +-----------------+
                      | monitoring host |
                      +-----------------+

To achieve this, the device can calculate a symmetric hash based on the inner headers
of the same flow.

2. For legacy systems, they may lack entropy fields which modern protocols have in
the outer header, resulting in multiple flows with the same outer header but
different inner headers being directed to the same receive queue. This results in
poor receive performance.

To address this limitation, inner header hash can be used to enable the device to advertise
the capability to calculate the hash for the inner packet, regaining better receive performance.

Latest v21 patch: https://lists.oasis-open.org/archives/virtio-dev/202307/msg00006.html

@hengqiali
Copy link
Author

hengqiali commented Jul 3, 2023

Hi chairs, I have updated the issue description with the latest v21 patch link:
https://lists.oasis-open.org/archives/virtio-dev/202307/msg00006.html

@mstsirkin
Copy link
Contributor

BALLOT CREATED AT URL: https://www.oasis-open.org/committees/ballot.php?id=3781

@cohuck cohuck closed this as completed in 9c3ba1e Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants