[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 12/12] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF neg
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PULL 12/12] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation |
Date: |
Tue, 16 Sep 2014 18:57:31 +0300 |
On Sun, Sep 14, 2014 at 09:41:56PM +0300, Michael S. Tsirkin wrote:
> 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>
Cc: 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 04/12] test-qdev-global-props: Initialize not_used=true for all props, (continued)
- [Qemu-devel] [PULL 04/12] test-qdev-global-props: Initialize not_used=true for all props, Michael S. Tsirkin, 2014/09/14
- [Qemu-devel] [PULL 05/12] test-qdev-global-props: Test handling of hotpluggable and non-device types, Michael S. Tsirkin, 2014/09/14
- [Qemu-devel] [PULL 06/12] qdev: Rename qdev_prop_check_global() to qdev_prop_check_globals(), Michael S. Tsirkin, 2014/09/14
- [Qemu-devel] [PULL 07/12] qdev: Move global validation to a single function, Michael S. Tsirkin, 2014/09/14
- [Qemu-devel] [PULL 08/12] Revert "rng-egd: remove redundant free", Michael S. Tsirkin, 2014/09/14
- [Qemu-devel] [PULL 09/12] virtio-net: drop assert on vm stop, Michael S. Tsirkin, 2014/09/14
- [Qemu-devel] [PULL 10/12] Revert "virtio: don't call device on !vm_running", Michael S. Tsirkin, 2014/09/14
- [Qemu-devel] [PULL 11/12] virtio-pci: enable bus master for old guests, Michael S. Tsirkin, 2014/09/14
- [Qemu-devel] [PULL 12/12] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation, Michael S. Tsirkin, 2014/09/14
- Re: [Qemu-devel] [PULL 00/12] pci, pc, virtio, misc bugfixes, Peter Maydell, 2014/09/15
- Re: [Qemu-devel] [PULL 00/12] pci, pc, virtio, misc bugfixes, Michael S. Tsirkin, 2014/09/16
- Re: [Qemu-devel] [PULL 00/12] pci, pc, virtio, misc bugfixes, Paolo Bonzini, 2014/09/16
- Re: [Qemu-devel] [PULL 00/12] pci, pc, virtio, misc bugfixes, Michael S. Tsirkin, 2014/09/16
- Re: [Qemu-devel] [PULL 00/12] pci, pc, virtio, misc bugfixes, Michael Roth, 2014/09/18