[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 12/15] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF nego
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 12/15] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation |
Date: |
Thu, 18 Sep 2014 21:18:58 +0300 |
From: Damjan Marion <address@hidden>
Header length check should happen only if backend is kernel. For user
backend there is no reason to reset this bit.
vhost-user code does not define .has_vnet_hdr_len so
VIRTIO_NET_F_MRG_RXBUF cannot be negotiated even if both sides
support it.
Signed-off-by: Damjan Marion <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/net/vhost_net.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index b21e7a4..77bb93e 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -163,11 +163,11 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options)
if (r < 0) {
goto fail;
}
- if (!qemu_has_vnet_hdr_len(options->net_backend,
- sizeof(struct virtio_net_hdr_mrg_rxbuf))) {
- net->dev.features &= ~(1 << VIRTIO_NET_F_MRG_RXBUF);
- }
if (backend_kernel) {
+ if (!qemu_has_vnet_hdr_len(options->net_backend,
+ sizeof(struct virtio_net_hdr_mrg_rxbuf))) {
+ net->dev.features &= ~(1 << VIRTIO_NET_F_MRG_RXBUF);
+ }
if (~net->dev.features & net->dev.backend_features) {
fprintf(stderr, "vhost lacks feature mask %" PRIu64
" for backend\n",
--
MST
- [Qemu-devel] [PULL v2 04/15] test-qdev-global-props: Initialize not_used=true for all props, (continued)
- [Qemu-devel] [PULL v2 04/15] test-qdev-global-props: Initialize not_used=true for all props, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 03/15] test-qdev-global-props: Run tests on subprocess, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 05/15] test-qdev-global-props: Test handling of hotpluggable and non-device types, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 06/15] qdev: Rename qdev_prop_check_global() to qdev_prop_check_globals(), Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 01/15] hw/machine: Free old values of string properties, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 08/15] Revert "rng-egd: remove redundant free", Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 09/15] virtio-net: drop assert on vm stop, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 10/15] Revert "virtio: don't call device on !vm_running", Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 07/15] qdev: Move global validation to a single function, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 11/15] virtio-pci: enable bus master for old guests, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 12/15] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 13/15] virtio-pci: fix migration for pci bus master, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 14/15] pc: leave more space for BIOS allocations, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v2 15/15] tests: disable global props test for old glib, Michael S. Tsirkin, 2014/09/18
- Re: [Qemu-devel] [PULL v2 00/15] pci, pc, virtio, misc bugfixes, Peter Maydell, 2014/09/18