diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-10-24 07:23:52 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-12-09 05:05:30 -0500 |
commit | e4fca7d6ff1a8f784336b04aff3278cb7fc76332 (patch) | |
tree | bbb1f14c56e25d2c3722b0d5ada74f74d64add55 /drivers/vhost | |
parent | 8b38694a2dc8b18374310df50174f1e4376d6824 (diff) |
vhost/net: larger header for virtio 1.0
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r-- | drivers/vhost/net.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index c218188c8880..8ff4a6dd2387 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -1030,7 +1030,8 @@ static int vhost_net_set_features(struct vhost_net *n, u64 features) | |||
1030 | size_t vhost_hlen, sock_hlen, hdr_len; | 1030 | size_t vhost_hlen, sock_hlen, hdr_len; |
1031 | int i; | 1031 | int i; |
1032 | 1032 | ||
1033 | hdr_len = (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ? | 1033 | hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | |
1034 | (1ULL << VIRTIO_F_VERSION_1))) ? | ||
1034 | sizeof(struct virtio_net_hdr_mrg_rxbuf) : | 1035 | sizeof(struct virtio_net_hdr_mrg_rxbuf) : |
1035 | sizeof(struct virtio_net_hdr); | 1036 | sizeof(struct virtio_net_hdr); |
1036 | if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) { | 1037 | if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) { |