mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 02:54:58 -06:00
vhost_net: add NetClientState->load() callback
It allows per-net client operations right after device's successful start. In particular, to load the device status. Vhost-vdpa net will use it to add the CVQ buffers to restore the device status. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
be4278b65f
commit
539573c317
2 changed files with 9 additions and 0 deletions
|
@ -281,6 +281,13 @@ static int vhost_net_start_one(struct vhost_net *net,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (net->nc->info->load) {
|
||||
r = net->nc->info->load(net->nc);
|
||||
if (r < 0) {
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
fail:
|
||||
file.fd = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue