Skip to contentSkip to conversation

virtio-net: alloc big buffers also when guest can receive UFO

PATCH In review Jason Wang 4 participants 4 messages Feb 21, 2014 – Feb 24, 2014

Subsystems (4)
lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH v2 1/1 virtio-net: alloc big buffers also when guest can receive UFO

We should alloc big buffers also when guest can receive UFO pakcets to let the big packets be fit into guest rx buffer.

Fixes 5c5167515d80f78f6bb538492c423adcae31ad65 (virtio-net: Allow UFO feature to be set and advertised.)

Cc Rusty Russell <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc Sridhar Samudrala <[email protected]>

---
Changes from V1:
- tweak the commit log

---
 drivers/net/virtio_net.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/virtio_net.c +2 -1
index d75f8ed..5632a99 100644
@@ -1711,7 +1711,8 @@ static int virtnet_probe(struct virtio_device *vdev)
 	/* If we can receive ANY GSO packets, we must allocate large ones. */
 	if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
 	    virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6) ||
-	    virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_ECN))
+	    virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_ECN) ||
+	    virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_UFO))
 		vi->big_packets = true;
 
 	if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF))
Signature · 1 line
1.8.3.2
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 2 lines · Jason Wang

We should alloc big buffers also when guest can receive UFO pakcets to let the big packets be fit into guest rx buffer.

s/pakcets/packets/

s/be fit/fit/

otherwise:

Quoted 31 lines

Fixes 5c5167515d80f78f6bb538492c423adcae31ad65 (virtio-net: Allow UFO feature to be set and advertised.)

Cc Rusty Russell <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc Sridhar Samudrala <[email protected]>

---
Changes from V1:
- tweak the commit log

---
 drivers/net/virtio_net.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/virtio_net.c +2 -1
index d75f8ed..5632a99 100644
@@ -1711,7 +1711,8 @@ static int virtnet_probe(struct virtio_device *vdev)
 	/* If we can receive ANY GSO packets, we must allocate large ones. */
 	if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
 	    virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6) ||
-	    virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_ECN))
+	    virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_ECN) ||
+	    virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_UFO))
 		vi->big_packets = true;
 
 	if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF))
Signature · 1 line
1.8.3.2
maintainer
#3 lore raw
In reply to Jason Wang

From: Jason Wang <[email protected]>
Date: Fri, 21 Feb 2014 13:08:04 +0800

Quoted 6 lines

We should alloc big buffers also when guest can receive UFO pakcets to let the big packets be fit into guest rx buffer.

Fixes 5c5167515d80f78f6bb538492c423adcae31ad65 (virtio-net: Allow UFO feature to be set and advertised.)

Quoted 7 lines
Cc Rusty Russell <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc Sridhar Samudrala <[email protected]>

---
Changes from V1:
- tweak the commit log

Applied with commit message fixes, thanks.