mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
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>
This commit is contained in:
parent
3f429a3400
commit
590790297c
3 changed files with 175 additions and 10 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue