@@ -63,6 +63,14 @@ typedef struct TAPState {
Notifier exit;
} TAPState;
+/* TODO: remove when virtio_net.h updated */
+struct virtio_net_hdr_v1_hash {
+ struct virtio_net_hdr_v1 hdr;
+ uint32_t hash_value;
+ uint16_t hash_report;
+ uint16_t padding;
+};
+
static void launch_script(const char *setup_script, const char *ifname,
int fd, Error **errp);
@@ -254,7 +262,8 @@ static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
assert(len == sizeof(struct virtio_net_hdr_mrg_rxbuf) ||
- len == sizeof(struct virtio_net_hdr));
+ len == sizeof(struct virtio_net_hdr) ||
+ len == sizeof(struct virtio_net_hdr_v1_hash));
tap_fd_set_vnet_hdr_len(s->fd, len);
s->host_vnet_hdr_len = len;
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> --- net/tap.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)