virtio-net: alloc big buffers also when guest can receive UFO
Subsystems (4)
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.)
---
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
@@ -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
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]>Signed-off-by Jason Wang <[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@@ -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
Rusty Russell
Acked-byQuoted 11 lines · Michael S. Tsirkin
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:
Indeed.
Thanks,
Rusty.
David Miller
maintainerFrom: 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]>Signed-off-by Jason Wang <[email protected]>---
Changes from V1:
- tweak the commit log
Applied with commit message fixes, thanks.