[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 4/7] tap: allow extended virtio header with hash info
From: |
Yuri Benditovich |
Subject: |
[PATCH v5 4/7] tap: allow extended virtio header with hash info |
Date: |
Wed, 18 Mar 2020 11:15:22 +0200 |
Signed-off-by: Yuri Benditovich <address@hidden>
---
net/tap.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/net/tap.c b/net/tap.c
index 6207f61f84..47de7fdeb6 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -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;
--
2.17.1
- [PATCH v5 0/7] reference implementation of RSS and hash report, Yuri Benditovich, 2020/03/18
- [PATCH v5 1/7] virtio-net: introduce RSS and hash report features, Yuri Benditovich, 2020/03/18
- [PATCH v5 2/7] virtio-net: implement RSS configuration command, Yuri Benditovich, 2020/03/18
- [PATCH v5 4/7] tap: allow extended virtio header with hash info,
Yuri Benditovich <=
- [PATCH v5 3/7] virtio-net: implement RX RSS processing, Yuri Benditovich, 2020/03/18
- [PATCH v5 6/7] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro, Yuri Benditovich, 2020/03/18
- Re: [PATCH v5 6/7] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro, Dr. David Alan Gilbert, 2020/03/18
- Re: [PATCH v5 6/7] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro, Juan Quintela, 2020/03/18
- [PATCH v5 5/7] virtio-net: reference implementation of hash report, Yuri Benditovich, 2020/03/18
- [PATCH v5 7/7] virtio-net: add migration support for RSS and hash report, Yuri Benditovich, 2020/03/18