[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 056/103] vhost-net: vhost-user feature bits support
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 056/103] vhost-net: vhost-user feature bits support |
Date: |
Tue, 17 Jun 2014 20:39:32 +0300 |
From: Nikolay Nikolaev <address@hidden>
Handle the feature bits negotiation when using vhost-user. Allow
the underlying implementation to have a finer control over all the
bits except the VIRTIO_NET_F_MAC.
Signed-off-by: Nikolay Nikolaev <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/net/vhost_net.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 2ec36d3..5f06736 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -54,6 +54,38 @@ static const int kernel_feature_bits[] = {
VHOST_INVALID_FEATURE_BIT
};
+/* Features supported by others. */
+const int user_feature_bits[] = {
+ VIRTIO_F_NOTIFY_ON_EMPTY,
+ VIRTIO_RING_F_INDIRECT_DESC,
+ VIRTIO_RING_F_EVENT_IDX,
+
+ VIRTIO_F_ANY_LAYOUT,
+ VIRTIO_NET_F_CSUM,
+ VIRTIO_NET_F_GUEST_CSUM,
+ VIRTIO_NET_F_GSO,
+ VIRTIO_NET_F_GUEST_TSO4,
+ VIRTIO_NET_F_GUEST_TSO6,
+ VIRTIO_NET_F_GUEST_ECN,
+ VIRTIO_NET_F_GUEST_UFO,
+ VIRTIO_NET_F_HOST_TSO4,
+ VIRTIO_NET_F_HOST_TSO6,
+ VIRTIO_NET_F_HOST_ECN,
+ VIRTIO_NET_F_HOST_UFO,
+ VIRTIO_NET_F_MRG_RXBUF,
+ VIRTIO_NET_F_STATUS,
+ VIRTIO_NET_F_CTRL_VQ,
+ VIRTIO_NET_F_CTRL_RX,
+ VIRTIO_NET_F_CTRL_VLAN,
+ VIRTIO_NET_F_CTRL_RX_EXTRA,
+ VIRTIO_NET_F_CTRL_MAC_ADDR,
+ VIRTIO_NET_F_CTRL_GUEST_OFFLOADS,
+
+ VIRTIO_NET_F_MQ,
+
+ VHOST_INVALID_FEATURE_BIT
+};
+
static const int *vhost_net_get_feature_bits(struct vhost_net *net)
{
const int *feature_bits = 0;
@@ -62,6 +94,9 @@ static const int *vhost_net_get_feature_bits(struct vhost_net
*net)
case NET_CLIENT_OPTIONS_KIND_TAP:
feature_bits = kernel_feature_bits;
break;
+ case NET_CLIENT_OPTIONS_KIND_VHOST_USER:
+ feature_bits = user_feature_bits;
+ break;
default:
error_report("Feature bits not defined for this type: %d",
net->nc->info->type);
--
MST
- [Qemu-devel] [PULL 042/103] migration: introduce self_announce_delay(), (continued)
- [Qemu-devel] [PULL 042/103] migration: introduce self_announce_delay(), Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 043/103] virtio-net: announce self by guest, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 044/103] Add kvm_eventfds_enabled function, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 045/103] Add chardev API qemu_chr_fe_read_all, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 049/103] vhost: add vhost_get_features and vhost_ack_features, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 050/103] vhost_net should call the poll callback only when it is set, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 051/103] Refactor virtio-net to use generic get_vhost_net, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 052/103] vhost_net_init will use VhostNetOptions to get all its arguments, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 053/103] Add vhost_ops to vhost_dev struct and replace all relevant ioctls, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 054/103] Add vhost-backend and VhostBackendType, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 056/103] vhost-net: vhost-user feature bits support,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 047/103] Add chardev API qemu_chr_fe_get_msgfds, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 055/103] Add vhost-user as a vhost backend., Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 057/103] Add new vhost-user netdev backend, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 058/103] Add the vhost-user netdev backend to the command line, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 059/103] Add vhost-user protocol documentation, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 061/103] Add qtest for vhost-user, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 065/103] NUMA: convert -numa option to use OptsVisitor, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 066/103] NUMA: expand MAX_NODES from 64 to 128, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 067/103] man: improve -numa doc, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 069/103] numa: introduce memory_region_allocate_system_memory, Michael S. Tsirkin, 2014/06/17