|
@@ -259,11 +259,7 @@ static bool tap_has_vnet_hdr(NetClientState *nc)
|
|
|
|
|
|
static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
|
|
static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
|
|
{
|
|
{
|
|
- TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
|
|
|
-
|
|
|
|
- assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
|
|
|
-
|
|
|
|
- return !!tap_probe_vnet_hdr_len(s->fd, len);
|
|
|
|
|
|
+ return tap_has_vnet_hdr(nc);
|
|
}
|
|
}
|
|
|
|
|
|
static int tap_get_vnet_hdr_len(NetClientState *nc)
|
|
static int tap_get_vnet_hdr_len(NetClientState *nc)
|
|
@@ -432,7 +428,7 @@ static TAPState *net_tap_fd_init(NetClientState *peer,
|
|
* Make sure host header length is set correctly in tap:
|
|
* Make sure host header length is set correctly in tap:
|
|
* it might have been modified by another instance of qemu.
|
|
* it might have been modified by another instance of qemu.
|
|
*/
|
|
*/
|
|
- if (tap_probe_vnet_hdr_len(s->fd, s->host_vnet_hdr_len)) {
|
|
|
|
|
|
+ if (vnet_hdr) {
|
|
tap_fd_set_vnet_hdr_len(s->fd, s->host_vnet_hdr_len);
|
|
tap_fd_set_vnet_hdr_len(s->fd, s->host_vnet_hdr_len);
|
|
}
|
|
}
|
|
tap_read_poll(s, true);
|
|
tap_read_poll(s, true);
|