|
@@ -57,6 +57,7 @@ typedef struct TAPState {
|
|
bool write_poll;
|
|
bool write_poll;
|
|
bool using_vnet_hdr;
|
|
bool using_vnet_hdr;
|
|
bool has_ufo;
|
|
bool has_ufo;
|
|
|
|
+ bool has_uso;
|
|
bool enabled;
|
|
bool enabled;
|
|
VHostNetState *vhost_net;
|
|
VHostNetState *vhost_net;
|
|
unsigned host_vnet_hdr_len;
|
|
unsigned host_vnet_hdr_len;
|
|
@@ -237,6 +238,15 @@ static bool tap_has_ufo(NetClientState *nc)
|
|
return s->has_ufo;
|
|
return s->has_ufo;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static bool tap_has_uso(NetClientState *nc)
|
|
|
|
+{
|
|
|
|
+ TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
|
|
|
+
|
|
|
|
+ assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
|
|
|
+
|
|
|
|
+ return s->has_uso;
|
|
|
|
+}
|
|
|
|
+
|
|
static bool tap_has_vnet_hdr(NetClientState *nc)
|
|
static bool tap_has_vnet_hdr(NetClientState *nc)
|
|
{
|
|
{
|
|
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
|
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
|
@@ -384,6 +394,7 @@ static NetClientInfo net_tap_info = {
|
|
.poll = tap_poll,
|
|
.poll = tap_poll,
|
|
.cleanup = tap_cleanup,
|
|
.cleanup = tap_cleanup,
|
|
.has_ufo = tap_has_ufo,
|
|
.has_ufo = tap_has_ufo,
|
|
|
|
+ .has_uso = tap_has_uso,
|
|
.has_vnet_hdr = tap_has_vnet_hdr,
|
|
.has_vnet_hdr = tap_has_vnet_hdr,
|
|
.has_vnet_hdr_len = tap_has_vnet_hdr_len,
|
|
.has_vnet_hdr_len = tap_has_vnet_hdr_len,
|
|
.get_using_vnet_hdr = tap_get_using_vnet_hdr,
|
|
.get_using_vnet_hdr = tap_get_using_vnet_hdr,
|
|
@@ -413,6 +424,7 @@ static TAPState *net_tap_fd_init(NetClientState *peer,
|
|
s->host_vnet_hdr_len = vnet_hdr ? sizeof(struct virtio_net_hdr) : 0;
|
|
s->host_vnet_hdr_len = vnet_hdr ? sizeof(struct virtio_net_hdr) : 0;
|
|
s->using_vnet_hdr = false;
|
|
s->using_vnet_hdr = false;
|
|
s->has_ufo = tap_probe_has_ufo(s->fd);
|
|
s->has_ufo = tap_probe_has_ufo(s->fd);
|
|
|
|
+ s->has_uso = tap_probe_has_uso(s->fd);
|
|
s->enabled = true;
|
|
s->enabled = true;
|
|
tap_set_offload(&s->nc, 0, 0, 0, 0, 0, 0, 0);
|
|
tap_set_offload(&s->nc, 0, 0, 0, 0, 0, 0, 0);
|
|
/*
|
|
/*
|