diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2015-09-23 12:19:56 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2015-09-24 16:27:52 +0300 |
| commit | dcb10c000cdd4d14f5ac4f07b04fb666494ef4a8 (patch) | |
| tree | 125005c6c7d27f69771f8e1b0d20b0c0d4eebc85 /hw/net/vhost_net.c | |
| parent | 7305483a3d113456681ba6c6e8dd41513decd5f6 (diff) | |
| download | focaccia-qemu-dcb10c000cdd4d14f5ac4f07b04fb666494ef4a8.tar.gz focaccia-qemu-dcb10c000cdd4d14f5ac4f07b04fb666494ef4a8.zip | |
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>
Diffstat (limited to 'hw/net/vhost_net.c')
| -rw-r--r-- | hw/net/vhost_net.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 1d76b94c84..9d32d76abb 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -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; |