mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
vhost-user: add protocol feature negotiation
Support a separate bitmask for vhost-user protocol features, and messages to get/set protocol features. Invoke them at init. No features are defined yet. [ leverage vhost_user_call for request handling -- Yuanhan Liu ] Signed-off-by: Michael S. Tsirkin <address@hidden> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Tested-by: Marcel Apfelbaum <marcel@redhat.com>
This commit is contained in:
parent
7305483a3d
commit
dcb10c000c
4 changed files with 71 additions and 0 deletions
|
@ -152,8 +152,10 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options)
|
|||
net->dev.backend_features = qemu_has_vnet_hdr(options->net_backend)
|
||||
? 0 : (1ULL << VHOST_NET_F_VIRTIO_NET_HDR);
|
||||
net->backend = r;
|
||||
net->dev.protocol_features = 0;
|
||||
} else {
|
||||
net->dev.backend_features = 0;
|
||||
net->dev.protocol_features = 0;
|
||||
net->backend = -1;
|
||||
}
|
||||
net->nc = options->net_backend;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue