From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 29 23:10:20 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09B99346; Sat, 29 Nov 2014 23:10:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D02A1156; Sat, 29 Nov 2014 23:10:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATNAJFr068876; Sat, 29 Nov 2014 23:10:19 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATNAJQs068875; Sat, 29 Nov 2014 23:10:19 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201411292310.sATNAJQs068875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sat, 29 Nov 2014 23:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275275 - stable/9/sys/dev/virtio/network X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 23:10:20 -0000 Author: bryanv Date: Sat Nov 29 23:10:19 2014 New Revision: 275275 URL: https://svnweb.freebsd.org/changeset/base/275275 Log: 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. Modified: stable/9/sys/dev/virtio/network/if_vtnet.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/9/sys/dev/virtio/network/if_vtnet.c Sat Nov 29 23:05:01 2014 (r275274) +++ stable/9/sys/dev/virtio/network/if_vtnet.c Sat Nov 29 23:10:19 2014 (r275275) @@ -966,9 +966,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 @@ -986,12 +991,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;