virtio_net: don't require ANY_LAYOUT with VERSION_1
Subsystems (4)
Michael S. Tsirkin
maintainerPATCH 1/1 virtio_net: don't require ANY_LAYOUT with VERSION_1
ANY_LAYOUT is a compatibility feature. It's implied for VERSION_1 devices, and non-transitional devices might not offer it. Change code to behave accordingly.
--- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/virtio_net.c +2 -1
@@ -1828,7 +1828,8 @@ static int virtnet_probe(struct virtio_device *vdev)else vi->hdr_len =sizeof (struct virtio_net_hdr ); -if (virtio_has_feature (vdev,VIRTIO_F_ANY_LAYOUT )) +if (virtio_has_feature (vdev,VIRTIO_F_ANY_LAYOUT ) || +virtio_has_feature (vdev,VIRTIO_F_VERSION_1 )) vi->any_header_sg = true;if (virtio_has_feature (vdev,VIRTIO_NET_F_CTRL_VQ ))
Signature · 1 line
MST
Quoted 15 lines · Michael S. Tsirkin
ANY_LAYOUTis a compatibility feature. It's implied forVERSION_1devices, and non-transitional devices might not offer it. Change code to behave accordingly.Signed-off-by Michael S. Tsirkin <[email protected]>--- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/virtio_net.c +0
-0
drivers/net/virtio_net.c static int virtnet_probe(struct virtio_device *vdev) · line 1835
Quoted 9 lines
drivers/net/virtio_net.c +2
-1@@ -1828,7 +1828,8 @@ static int virtnet_probe(struct virtio_device *vdev)else vi->hdr_len =sizeof (struct virtio_net_hdr ); -if (virtio_has_feature (vdev,VIRTIO_F_ANY_LAYOUT )) +if (virtio_has_feature (vdev,VIRTIO_F_ANY_LAYOUT ) || +virtio_has_feature (vdev,VIRTIO_F_VERSION_1 )) vi->any_header_sg = true;if (virtio_has_feature (vdev,VIRTIO_NET_F_CTRL_VQ ))
Quoted 8 lines · Michael S. Tsirkin
ANY_LAYOUTis a compatibility feature. It's implied forVERSION_1devices, and non-transitional devices might not offer it. Change code to behave accordingly.Signed-off-by Michael S. Tsirkin <[email protected]>--- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 8 lines · Michael S. Tsirkin
ANY_LAYOUTis a compatibility feature. It's implied forVERSION_1devices, and non-transitional devices might not offer it. Change code to behave accordingly.Signed-off-by Michael S. Tsirkin <[email protected]>--- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
From: "Michael S. Tsirkin" <[email protected]>
Date: Wed, 15 Jul 2015 15:26:19 +0300
Quoted 5 lines
ANY_LAYOUTis a compatibility feature. It's implied forVERSION_1devices, and non-transitional devices might not offer it. Change code to behave accordingly.Signed-off-by Michael S. Tsirkin <[email protected]>
Applied.
Michael S. Tsirkin
maintainerQuoted 10 lines · David Miller
From: "Michael S. Tsirkin" <[email protected]>
Date: Wed, 15 Jul 2015 15:26:19 +0300Quoted 5 lines
ANY_LAYOUTis a compatibility feature. It's implied forVERSION_1devices, and non-transitional devices might not offer it. Change code to behave accordingly.Signed-off-by Michael S. Tsirkin <[email protected]>Applied.
Thanks!
Please also forward this to stable as it's a spec
compliance question.
Signature · 1 line
MST
Michael S. Tsirkin
maintainerQuoted 10 lines · David Miller
From: "Michael S. Tsirkin" <[email protected]>
Date: Wed, 15 Jul 2015 15:26:19 +0300Quoted 5 lines
ANY_LAYOUTis a compatibility feature. It's implied forVERSION_1devices, and non-transitional devices might not offer it. Change code to behave accordingly.Signed-off-by Michael S. Tsirkin <[email protected]>Applied.
Thanks!
Please also forward this to stable as it's a spec
compliance question.
Signature · 1 line
MST