提交 f8c4382e 编写于 作者: A Anthony Liguori

Merge remote-tracking branch 'stefanha/net' into staging

* stefanha/net:
  tap: reset vnet header size on open
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
......@@ -341,6 +341,13 @@ static TAPState *net_tap_fd_init(NetClientState *peer,
s->using_vnet_hdr = 0;
s->has_ufo = tap_probe_has_ufo(s->fd);
tap_set_offload(&s->nc, 0, 0, 0, 0, 0);
/*
* Make sure host header length is set correctly in tap:
* it might have been modified by another instance of qemu.
*/
if (tap_probe_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, 1);
s->vhost_net = NULL;
return s;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册