virtio_net: bigger header when VERSION_1 is set
With VERSION_1 virtio_net uses same header size whether mergeable buffers are enabled or not. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
Родитель
bcff3162f3
Коммит
d04302b334
|
@ -1805,7 +1805,8 @@ static int virtnet_probe(struct virtio_device *vdev)
|
|||
if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF))
|
||||
vi->mergeable_rx_bufs = true;
|
||||
|
||||
if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF))
|
||||
if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF) ||
|
||||
virtio_has_feature(vdev, VIRTIO_F_VERSION_1))
|
||||
vi->hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf);
|
||||
else
|
||||
vi->hdr_len = sizeof(struct virtio_net_hdr);
|
||||
|
|
Загрузка…
Ссылка в новой задаче