Michael S. Tsirkin
2015-Jul-15 12:26 UTC
[PATCH] 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. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 63c7810..7fbca37 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -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)) -- MST
Paolo Bonzini
2015-Jul-15 12:55 UTC
[virtio-dev] [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1
On 15/07/2015 14:26, Michael S. Tsirkin wrote:> 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. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/net/virtio_net.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 63c7810..7fbca37 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -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)) >Reviewed-by: Paolo Bonzini <pbonzini at redhat.com>
Stefan Hajnoczi
2015-Jul-16 10:29 UTC
[virtio-dev] [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1
On Wed, Jul 15, 2015 at 03:26:19PM +0300, Michael S. Tsirkin wrote:> 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. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/net/virtio_net.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 473 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20150716/47b75720/attachment.sig>
David Miller
2015-Jul-20 19:42 UTC
[PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1
From: "Michael S. Tsirkin" <mst at redhat.com> Date: Wed, 15 Jul 2015 15:26:19 +0300> 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. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com>Applied.
Michael S. Tsirkin
2015-Jul-22 10:08 UTC
[PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1
On Mon, Jul 20, 2015 at 12:42:59PM -0700, David Miller wrote:> From: "Michael S. Tsirkin" <mst at redhat.com> > Date: Wed, 15 Jul 2015 15:26:19 +0300 > > > 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. > > > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > Applied.Thanks! Please also forward this to stable as it's a spec compliance question. -- MST
Possibly Parallel Threads
- [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1
- [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1
- [PATCH] virtio-spec: add field for scsi command size
- [PATCH] virtio-spec: add field for scsi command size
- [PATCH] virtio-spec: add field for scsi command size