From e22f0603fb2fc274920a9e3a1d1306260b9a4cc4 Mon Sep 17 00:00:00 2001 From: Yuri Benditovich Date: Fri, 8 May 2020 15:59:31 +0300 Subject: virtio-net: reference implementation of hash report Suggest VIRTIO_NET_F_HASH_REPORT if specified in device parameters. If the VIRTIO_NET_F_HASH_REPORT is set, the device extends configuration space. If the feature is negotiated, the packet layout is extended to accomodate the hash information. In this case deliver packet's hash value and report type in virtio header extension. Use for configuration the same procedure as already used for RSS. We add two fields in rss_data that controls what the device does with the calculated hash if rss_data.enabled is set. If field 'populate' is set the hash is set in the packet, if field 'redirect' is set the hash is used to decide the queue to place the packet to. Signed-off-by: Yuri Benditovich Signed-off-by: Jason Wang --- include/hw/virtio/virtio-net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hw/virtio/virtio-net.h') diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h index 5081f3c..a45ef82 100644 --- a/include/hw/virtio/virtio-net.h +++ b/include/hw/virtio/virtio-net.h @@ -131,6 +131,8 @@ typedef struct VirtioNetRscChain { typedef struct VirtioNetRssData { bool enabled; + bool redirect; + bool populate_hash; uint32_t hash_types; uint8_t key[VIRTIO_NET_RSS_MAX_KEY_SIZE]; uint16_t indirections_len; -- cgit v1.1