All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: [PATCH RFC 4/4] virtio_net: bigger header when VERSION_1 is set
Date: Fri, 24 Oct 2014 00:28:10 +0300	[thread overview]
Message-ID: <1414099656-28090-4-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1414099656-28090-3-git-send-email-mst@redhat.com>

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>
---
 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 9c6d50f..a2fe340 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1764,7 +1764,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);
-- 
MST

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: cornelia.huck@de.ibm.com, Rusty Russell <rusty@rustcorp.com.au>,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org
Subject: [PATCH RFC 4/4] virtio_net: bigger header when VERSION_1 is set
Date: Fri, 24 Oct 2014 00:28:10 +0300	[thread overview]
Message-ID: <1414099656-28090-4-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1414099656-28090-3-git-send-email-mst@redhat.com>

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>
---
 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 9c6d50f..a2fe340 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1764,7 +1764,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);
-- 
MST


  reply	other threads:[~2014-10-23 21:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 21:27 [PATCH RFC 1/4] virtio_net: pass vi around Michael S. Tsirkin
2014-10-23 21:27 ` Michael S. Tsirkin
2014-10-23 21:28 ` [PATCH RFC 2/4] virtio_net: get rid of virtio_net_hdr/skb_vnet_hdr Michael S. Tsirkin
2014-10-23 21:28   ` Michael S. Tsirkin
2014-10-23 21:28   ` [PATCH RFC 3/4] virtio_net: stricter short buffer length checks Michael S. Tsirkin
2014-10-23 21:28     ` Michael S. Tsirkin
2014-10-23 21:28     ` Michael S. Tsirkin [this message]
2014-10-23 21:28       ` [PATCH RFC 4/4] virtio_net: bigger header when VERSION_1 is set Michael S. Tsirkin
2014-10-28  0:28       ` Rusty Russell
2014-10-28  0:28         ` Rusty Russell
2014-10-28  0:27   ` [PATCH RFC 2/4] virtio_net: get rid of virtio_net_hdr/skb_vnet_hdr Rusty Russell
2014-10-28  0:27     ` Rusty Russell
2014-10-24 10:02 ` [PATCH RFC 1/4] virtio_net: pass vi around David Laight
2014-10-24 10:02   ` David Laight
2014-10-24 14:10   ` Michael S. Tsirkin
2014-10-24 14:10     ` Michael S. Tsirkin
2014-10-28  0:27 ` Rusty Russell
2014-10-28  0:27   ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414099656-28090-4-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.