summary refs log tree commit diff stats
path: root/hw/net/e1000e.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2024-04-28 16:00:45 +0900
committerJason Wang <jasowang@redhat.com>2024-06-04 15:14:25 +0800
commit4b52d63249a508dd927222ffac1a868d38681fc5 (patch)
tree5f19fc43f34d0b1029d1cee2aaa4a1b3bc28a051 /hw/net/e1000e.c
parent52a7ff526964e7810ec1ccc71efbdd60952dd20b (diff)
downloadfocaccia-qemu-4b52d63249a508dd927222ffac1a868d38681fc5.tar.gz
focaccia-qemu-4b52d63249a508dd927222ffac1a868d38681fc5.zip
tap: Remove qemu_using_vnet_hdr()
Since qemu_set_vnet_hdr_len() is always called when
qemu_using_vnet_hdr() is called, we can merge them and save some code.

For consistency, express that the virtio-net header is not in use by
returning 0 with qemu_get_vnet_hdr_len() instead of having a dedicated
function, qemu_get_using_vnet_hdr().

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/e1000e.c')
-rw-r--r--hw/net/e1000e.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index edc101eaf6..843892ce09 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -352,7 +352,6 @@ e1000e_init_net_peer(E1000EState *s, PCIDevice *pci_dev, uint8_t *macaddr)
     for (i = 0; i < s->conf.peers.queues; i++) {
         nc = qemu_get_subqueue(s->nic, i);
         qemu_set_vnet_hdr_len(nc->peer, sizeof(struct virtio_net_hdr));
-        qemu_using_vnet_hdr(nc->peer, true);
     }
 }