summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorbryanv <bryanv@FreeBSD.org>2014-11-29 23:05:01 +0000
committerbryanv <bryanv@FreeBSD.org>2014-11-29 23:05:01 +0000
commit957ca069b77a5ce68cc9631ce61a729532484a2c (patch)
tree146e0239415c2e1bb04979e076d0d9a410ae5797 /sys/dev
parentf9a98c5bdd238a380eacf38345af493abb6f8a57 (diff)
downloadFreeBSD-src-957ca069b77a5ce68cc9631ce61a729532484a2c.zip
FreeBSD-src-957ca069b77a5ce68cc9631ce61a729532484a2c.tar.gz
MFC r274325:
Enable LRO by default when available on vtnet interfaces The prior change to not enable LRO by default has confused several people. The configurations where LRO is problematic is not the typical use case for VirtIO, and due to other issues, this often requires checksum offloading to be disabled anyways.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/virtio/network/if_vtnet.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index c342df7..431dedf 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -967,9 +967,14 @@ vtnet_setup_interface(struct vtnet_softc *sc)
ifp->if_capabilities |= IFCAP_VLAN_HWTSO;
}
- if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_CSUM))
+ if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_CSUM)) {
ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6;
+ if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO4) ||
+ virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO6))
+ ifp->if_capabilities |= IFCAP_LRO;
+ }
+
if (ifp->if_capabilities & IFCAP_HWCSUM) {
/*
* VirtIO does not support VLAN tagging, but we can fake
@@ -987,12 +992,6 @@ vtnet_setup_interface(struct vtnet_softc *sc)
* Capabilities after here are not enabled by default.
*/
- if (ifp->if_capabilities & IFCAP_RXCSUM) {
- if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO4) ||
- virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO6))
- ifp->if_capabilities |= IFCAP_LRO;
- }
-
if (sc->vtnet_flags & VTNET_FLAG_VLAN_FILTER) {
ifp->if_capabilities |= IFCAP_VLAN_HWFILTER;
OpenPOWER on IntegriCloud