[PATCH] virtio-net: Set RXCSUM feature if GUEST_CSUM is available

2013-08-27 Thread Thomas Huth
If the VIRTIO_NET_F_GUEST_CSUM virtio feature is available, the guest
does not have to calculate the checksums on all received packets. This
is pretty much the same feature as RX checksum offloading on real
network cards, so the virtio-net driver should report this by setting
the NETIF_F_RXCSUM flag. When the user now runs ethtool -k, he or she
can see whether the virtio-net interface has to calculate RX checksums
or not.

Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com
---
 drivers/net/virtio_net.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f216002..defec2b 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1538,6 +1538,8 @@ static int virtnet_probe(struct virtio_device *vdev)
dev-features |= dev-hw_features  
(NETIF_F_ALL_TSO|NETIF_F_UFO);
/* (!csum  gso) case will be fixed by register_netdev() */
}
+   if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_CSUM))
+   dev-features |= NETIF_F_RXCSUM;
 
dev-vlan_features = dev-features;
 
-- 
1.8.1.4

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH] VMXNET3: Add support for virtual IOMMU

2013-08-27 Thread David Miller
From: Andy King ack...@vmware.com
Date: Fri, 23 Aug 2013 09:33:49 -0700

 This patch adds support for virtual IOMMU to the vmxnet3 module.  We
 switch to DMA consistent mappings for anything we pass to the device.
 There were a few places where we already did this, but using pci_blah();
 these have been fixed to use dma_blah(), along with all new occurrences
 where we've replaced kmalloc() and friends.
 
 Also fix two small bugs:
 1) use after free of rq-buf_info in vmxnet3_rq_destroy()
 2) a cpu_to_le32() that should have been a cpu_to_le64()
 
 Acked-by: George Zhang georgezh...@vmware.com
 Acked-by: Aditya Sarwade asarw...@vmware.com
 Signed-off-by: Andy King ack...@vmware.com

Applied, thanks.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization