Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Nov 2014 20:04:12 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274325 - head/sys/dev/virtio/network
Message-ID:  <201411092004.sA9K4ChE077196@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bryanv
Date: Sun Nov  9 20:04:12 2014
New Revision: 274325
URL: https://svnweb.freebsd.org/changeset/base/274325

Log:
  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.
  
  PR:		185864
  MFC after:	2 weeks

Modified:
  head/sys/dev/virtio/network/if_vtnet.c

Modified: head/sys/dev/virtio/network/if_vtnet.c
==============================================================================
--- head/sys/dev/virtio/network/if_vtnet.c	Sun Nov  9 19:58:30 2014	(r274324)
+++ head/sys/dev/virtio/network/if_vtnet.c	Sun Nov  9 20:04:12 2014	(r274325)
@@ -967,9 +967,14 @@ vtnet_setup_interface(struct vtnet_softc
 			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
 	 * 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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411092004.sA9K4ChE077196>