mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-24 00:18:36 -07:00
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>
This commit is contained in:
parent
52a7ff5269
commit
4b52d63249
10 changed files with 5 additions and 74 deletions
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue