Skip to contentSkip to conversation

vhost: fix mergeable bufs on BE hosts

PATCH In review Michael S. Tsirkin 2 participants 5 messages Oct 15, 2012 – Oct 24, 2012

Subsystems (5)
lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

PATCH 1/1 vhost: fix mergeable bufs on BE hosts

We copy head count to a 16 bit field,
this works by chance on LE but on BE
guest gets 0. Fix it up.

---
 drivers/vhost/net.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/vhost/net.c +2 -1
index 9ab6d47..2bb463c 100644
@@ -448,7 +448,8 @@ static void handle_rx(struct vhost_net *net)
 		.hdr.gso_type = VIRTIO_NET_HDR_GSO_NONE
 	};
 	size_t total_len = 0;
-	int err, headcount, mergeable;
+	int err, mergeable;
+	s16 headcount;
 	size_t vhost_hlen, sock_hlen;
 	size_t vhost_len, sock_len;
 	/* TODO: check that we are running from vhost_worker? */
Signature · 1 line
MST
author maintainer
#1 lore raw
Quoted 7 lines · Michael S. Tsirkin

We copy head count to a 16 bit field,
this works by chance on LE but on BE
guest gets 0. Fix it up.

Ping. Dave, could you apply this to -net please?

Quoted 20 lines
---
 drivers/vhost/net.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/vhost/net.c +2 -1
index 9ab6d47..2bb463c 100644
@@ -448,7 +448,8 @@ static void handle_rx(struct vhost_net *net)
 		.hdr.gso_type = VIRTIO_NET_HDR_GSO_NONE
 	};
 	size_t total_len = 0;
-	int err, headcount, mergeable;
+	int err, mergeable;
+	s16 headcount;
 	size_t vhost_hlen, sock_hlen;
 	size_t vhost_len, sock_len;
 	/* TODO: check that we are running from vhost_worker? */
Signature · 1 line
MST
maintainer
#2 lore raw

From: "Michael S. Tsirkin" <[email protected]>
Date: Sun, 21 Oct 2012 14:49:01 +0200

Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines

We copy head count to a 16 bit field,
this works by chance on LE but on BE
guest gets 0. Fix it up.

Ping. Dave, could you apply this to -net please?

Pinging me but not cc:'ing me? That's really strange.

What if I operate by just mass deleting things that I'm not explicitly on the To: or CC: when I'm very backlogged?

author maintainer
#3 lore raw
Quoted 12 lines · David Miller

From: "Michael S. Tsirkin" <[email protected]>
Date: Sun, 21 Oct 2012 14:49:01 +0200

Quoted 9 lines · Michael S. Tsirkin
Quoted 7 lines

We copy head count to a 16 bit field,
this works by chance on LE but on BE
guest gets 0. Fix it up.

Quoted 6 lines
Quoted 1 line

Ping. Dave, could you apply this to -net please?

Pinging me but not cc:'ing me? That's really strange.

What if I operate by just mass deleting things that I'm not explicitly on the To: or CC: when I'm very backlogged?

Yes, that was silly. Would you like me to repost the patch?

Signature · 1 line
MST
maintainer
#4 lore raw

From: "Michael S. Tsirkin" <[email protected]>
Date: Wed, 24 Oct 2012 18:24:38 +0200

Quoted 1 line

Would you like me to repost the patch?

This question is almost retorical.

I said I don't reliably read things I'm not explicitly CC:'d on, therefore it's possible (and in fact, likely) I don't have the patch in my inbox.

What do you think you should do?