From owner-svn-src-stable-10@FreeBSD.ORG Thu May 21 09:06:42 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A738EEB6; Thu, 21 May 2015 09:06:42 +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 94D941C6A; Thu, 21 May 2015 09:06:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4L96gOq067049; Thu, 21 May 2015 09:06:42 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4L96gWE067048; Thu, 21 May 2015 09:06:42 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505210906.t4L96gWE067048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 21 May 2015 09:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283207 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:06:42 -0000 Author: arybchik Date: Thu May 21 09:06:41 2015 New Revision: 283207 URL: https://svnweb.freebsd.org/changeset/base/283207 Log: MFC: r282941 sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed It is simply not required since the kernel checks corresponding IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads. Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits are set in IPv4 and IPv6 mbufs. Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:05:13 2015 (r283206) +++ stable/10/sys/dev/sfxge/sfxge.c Thu May 21 09:06:41 2015 (r283207) @@ -281,10 +281,14 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); else ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); - if (ifp->if_capenable & IFCAP_TSO) - ifp->if_hwassist |= CSUM_TSO; - else - ifp->if_hwassist &= ~CSUM_TSO; + + /* + * The kernel takes both IFCAP_TSOx and CSUM_TSO into + * account before using TSO. So, we do not touch + * checksum flags when IFCAP_TSOx is modified. + * Note that CSUM_TSO is (CSUM_IP_TSO|CSUM_IP6_TSO), + * but both bits are set in IPv4 and IPv6 mbufs. + */ SFXGE_ADAPTER_UNLOCK(sc); break;