aboutsummaryrefslogtreecommitdiff
path: root/net/netmap.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 /net/netmap.c
parent52a7ff526964e7810ec1ccc71efbdd60952dd20b (diff)
downloadqemu-4b52d63249a508dd927222ffac1a868d38681fc5.zip
qemu-4b52d63249a508dd927222ffac1a868d38681fc5.tar.gz
qemu-4b52d63249a508dd927222ffac1a868d38681fc5.tar.bz2
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 'net/netmap.c')
-rw-r--r--net/netmap.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/netmap.c b/net/netmap.c
index 241b27c..297510e 100644
--- a/net/netmap.c
+++ b/net/netmap.c
@@ -351,10 +351,6 @@ static bool netmap_has_vnet_hdr(NetClientState *nc)
return netmap_has_vnet_hdr_len(nc, sizeof(struct virtio_net_hdr));
}
-static void netmap_using_vnet_hdr(NetClientState *nc, bool enable)
-{
-}
-
static void netmap_set_vnet_hdr_len(NetClientState *nc, int len)
{
NetmapState *s = DO_UPCAST(NetmapState, nc, nc);
@@ -393,7 +389,6 @@ static NetClientInfo net_netmap_info = {
.has_ufo = netmap_has_vnet_hdr,
.has_vnet_hdr = netmap_has_vnet_hdr,
.has_vnet_hdr_len = netmap_has_vnet_hdr_len,
- .using_vnet_hdr = netmap_using_vnet_hdr,
.set_offload = netmap_set_offload,
.set_vnet_hdr_len = netmap_set_vnet_hdr_len,
};