[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/7] tap: Fix virtio-net header buffer size
From: |
Akihiko Odaki |
Subject: |
[PATCH v2 1/7] tap: Fix virtio-net header buffer size |
Date: |
Tue, 10 Oct 2023 11:59:15 +0900 |
The largest possible virtio-net header is struct virtio_net_hdr_v1_hash.
Fixes: fbbdbddec0 ("tap: allow extended virtio header with hash info")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
net/tap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/tap.c b/net/tap.c
index c6639d9f20..ea46feeaa8 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -118,7 +118,7 @@ static ssize_t tap_receive_iov(NetClientState *nc, const
struct iovec *iov,
TAPState *s = DO_UPCAST(TAPState, nc, nc);
const struct iovec *iovp = iov;
struct iovec iov_copy[iovcnt + 1];
- struct virtio_net_hdr_mrg_rxbuf hdr = { };
+ struct virtio_net_hdr_v1_hash hdr = { };
if (s->host_vnet_hdr_len && !s->using_vnet_hdr) {
iov_copy[0].iov_base = &hdr;
@@ -136,7 +136,7 @@ static ssize_t tap_receive_raw(NetClientState *nc, const
uint8_t *buf, size_t si
TAPState *s = DO_UPCAST(TAPState, nc, nc);
struct iovec iov[2];
int iovcnt = 0;
- struct virtio_net_hdr_mrg_rxbuf hdr = { };
+ struct virtio_net_hdr_v1_hash hdr = { };
if (s->host_vnet_hdr_len) {
iov[iovcnt].iov_base = &hdr;
--
2.42.0
- [PATCH v2 0/7] virtio-net RSS/hash report fixes, Akihiko Odaki, 2023/10/09
- [PATCH v2 1/7] tap: Fix virtio-net header buffer size,
Akihiko Odaki <=
- [PATCH v2 2/7] virtio-net: Copy header only when necessary, Akihiko Odaki, 2023/10/09
- [PATCH v2 3/7] virtio-net: Disable RSS on reset, Akihiko Odaki, 2023/10/09
- [PATCH v2 4/7] virtio-net: Unify the logic to update NIC state for RSS, Akihiko Odaki, 2023/10/09
- [PATCH v2 5/7] virtio-net: Return an error when vhost cannot enable RSS, Akihiko Odaki, 2023/10/09
- [PATCH v2 6/7] virtio-net: Do not clear VIRTIO_NET_F_RSS, Akihiko Odaki, 2023/10/09
- [PATCH v2 7/7] ebpf: Fix RSS error handling, Akihiko Odaki, 2023/10/09