diff options
author | Yuri Benditovich <yuri.benditovich@daynix.com> | 2020-05-08 15:59:28 +0300 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2020-06-18 21:05:50 +0800 |
commit | 590790297c0dd2c8e817c7b33daf66862b0ee8ef (patch) | |
tree | 451a25ac6b916e185d0fefd86dda472ccbe8f476 /include | |
parent | 3f429a3400822141651486193d6af625eeab05a5 (diff) | |
download | qemu-590790297c0dd2c8e817c7b33daf66862b0ee8ef.zip qemu-590790297c0dd2c8e817c7b33daf66862b0ee8ef.tar.gz qemu-590790297c0dd2c8e817c7b33daf66862b0ee8ef.tar.bz2 |
virtio-net: implement RSS configuration command
Optionally report RSS feature.
Handle RSS configuration command and keep RSS parameters
in virtio-net device context.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/virtio-net.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h index 96c68d4..d3fad7c 100644 --- a/include/hw/virtio/virtio-net.h +++ b/include/hw/virtio/virtio-net.h @@ -126,6 +126,18 @@ typedef struct VirtioNetRscChain { /* Maximum packet size we can receive from tap device: header + 64k */ #define VIRTIO_NET_MAX_BUFSIZE (sizeof(struct virtio_net_hdr) + (64 * KiB)) +#define VIRTIO_NET_RSS_MAX_KEY_SIZE 40 +#define VIRTIO_NET_RSS_MAX_TABLE_LEN 128 + +typedef struct VirtioNetRssData { + bool enabled; + uint32_t hash_types; + uint8_t key[VIRTIO_NET_RSS_MAX_KEY_SIZE]; + uint16_t indirections_len; + uint16_t *indirections_table; + uint16_t default_queue; +} VirtioNetRssData; + typedef struct VirtIONetQueue { VirtQueue *rx_vq; VirtQueue *tx_vq; @@ -199,6 +211,7 @@ struct VirtIONet { bool failover; DeviceListener primary_listener; Notifier migration_state; + VirtioNetRssData rss_data; }; void virtio_net_set_netclient_name(VirtIONet *n, const char *name, |