Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1184758 > unrolled thread
| Started by | "Michael S. Tsirkin" <mst@redhat.com> |
|---|---|
| First post | 2015-07-15 14:30 +0200 |
| Last post | 2015-07-16 12:30 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1 "Michael S. Tsirkin" <mst@redhat.com> - 2015-07-15 14:30 +0200
Re: [virtio-dev] [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1 Paolo Bonzini <pbonzini@redhat.com> - 2015-07-15 15:00 +0200
Re: [virtio-dev] [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1 Stefan Hajnoczi <stefanha@redhat.com> - 2015-07-16 12:30 +0200
| From | "Michael S. Tsirkin" <mst@redhat.com> |
|---|---|
| Date | 2015-07-15 14:30 +0200 |
| Subject | [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1 |
| Message-ID | <pMtZ0-7p7-5@gated-at.bofh.it> |
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@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2015-07-15 15:00 +0200 |
| Subject | Re: [virtio-dev] [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1 |
| Message-ID | <pMus2-7Xo-13@gated-at.bofh.it> |
| In reply to | #1184758 |
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@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@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Stefan Hajnoczi <stefanha@redhat.com> |
|---|---|
| Date | 2015-07-16 12:30 +0200 |
| Subject | Re: [virtio-dev] [PATCH] virtio_net: don't require ANY_LAYOUT with VERSION_1 |
| Message-ID | <pMOAq-3Pj-25@gated-at.bofh.it> |
| In reply to | #1184758 |
[Multipart message — attachments visible in raw view] — view raw
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@redhat.com> > --- > drivers/net/virtio_net.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web