aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorMaxime Coquelin <maxime.coquelin@redhat.com>2017-05-23 14:31:19 +0200
committerMichael S. Tsirkin <mst@redhat.com>2017-05-25 21:25:28 +0300
commit75ebec11afe49539f71cc1c494e3010f91c86adb (patch)
tree1965291be3a0308383d201d83de4a3aa1a272ed9 /include/hw
parentc10595fb348d3fe6991fe9750834bd2ab16d3190 (diff)
virtio_net: Bypass backends for MTU feature negotiation
This patch adds a new internal "x-mtu-bypass-backend" property to bypass backends for MTU feature negotiation. When this property is set, the MTU feature is negotiated as soon as supported by the guest and a MTU value is set via the host_mtu parameter. In case the backend advertises the feature (e.g. DPDK's vhost-user backend), the feature negotiation is propagated down to the backend. When this property is not set, the backend has to support the MTU feature for its negotiation to succeed. For compatibility purpose, this property is disabled for machine types v2.9 and older. Cc: Aaron Conole <aconole@redhat.com> Suggested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Vlad Yasevich <vyasevic@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/compat.h4
-rw-r--r--include/hw/virtio/virtio-net.h1
-rw-r--r--include/hw/virtio/virtio.h1
3 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/compat.h b/include/hw/compat.h
index 4c53d600c1..400c64b318 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -10,6 +10,10 @@
.driver = "intel-iommu",\
.property = "pt",\
.value = "off",\
+ },{\
+ .driver = "virtio-net-device",\
+ .property = "x-mtu-bypass-backend",\
+ .value = "off",\
},
#define HW_COMPAT_2_8 \
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index 1eec9a2da3..602b4868d4 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -97,6 +97,7 @@ typedef struct VirtIONet {
QEMUTimer *announce_timer;
int announce_counter;
bool needs_vnet_hdr_swap;
+ bool mtu_bypass_backend;
} VirtIONet;
void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 7b6edbafd7..80c45c321e 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -79,6 +79,7 @@ struct VirtIODevice
uint16_t queue_sel;
uint64_t guest_features;
uint64_t host_features;
+ uint64_t backend_features;
size_t config_len;
void *config;
uint16_t config_vector;