mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
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>
This commit is contained in:
parent
8b38694a2d
commit
e4fca7d6ff
1 changed files with 2 additions and 1 deletions
|
@ -1030,7 +1030,8 @@ static int vhost_net_set_features(struct vhost_net *n, u64 features)
|
|||
size_t vhost_hlen, sock_hlen, hdr_len;
|
||||
int i;
|
||||
|
||||
hdr_len = (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ?
|
||||
hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) |
|
||||
(1ULL << VIRTIO_F_VERSION_1))) ?
|
||||
sizeof(struct virtio_net_hdr_mrg_rxbuf) :
|
||||
sizeof(struct virtio_net_hdr);
|
||||
if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
|
||||
|
|
Loading…
Reference in a new issue