From owner-svn-src-all@freebsd.org Wed Sep 14 08:59:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 223E6BDA824; Wed, 14 Sep 2016 08:59:15 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CC0FCDC1; Wed, 14 Sep 2016 08:59:14 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8E8xEWu030419; Wed, 14 Sep 2016 08:59:14 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8E8xDuc030418; Wed, 14 Sep 2016 08:59:13 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609140859.u8E8xDuc030418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 14 Sep 2016 08:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305796 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2016 08:59:15 -0000 Author: sephe Date: Wed Sep 14 08:59:13 2016 New Revision: 305796 URL: https://svnweb.freebsd.org/changeset/base/305796 Log: hyperv/hn: Remove the FreeBSD_version check for TSO configuration It is available on both stable/10 and stable/11. This eases future MFCs to stable/10. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7872 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 14 08:48:08 2016 (r305795) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Sep 14 08:59:13 2016 (r305796) @@ -232,12 +232,10 @@ SYSCTL_INT(_hw_hn, OID_AUTO, trust_hosti "Trust ip packet verification on host side, " "when csum info is missing (global setting)"); -#if __FreeBSD_version >= 1100045 /* Limit TSO burst size */ static int hn_tso_maxlen = 0; SYSCTL_INT(_hw_hn, OID_AUTO, tso_maxlen, CTLFLAG_RDTUN, &hn_tso_maxlen, 0, "TSO burst limit"); -#endif /* Limit chimney send size */ static int hn_tx_chimney_size = 0; @@ -452,9 +450,7 @@ netvsc_attach(device_t dev) uint32_t link_status; struct ifnet *ifp = NULL; int error, ring_cnt, tx_ring_cnt; -#if __FreeBSD_version >= 1100045 int tso_maxlen; -#endif sc->hn_dev = dev; sc->hn_prichan = vmbus_get_channel(dev); @@ -587,7 +583,6 @@ netvsc_attach(device_t dev) if (link_status == NDIS_MEDIA_STATE_CONNECTED) sc->hn_carrier = 1; -#if __FreeBSD_version >= 1100045 tso_maxlen = hn_tso_maxlen; if (tso_maxlen <= 0 || tso_maxlen > IP_MAXPACKET) tso_maxlen = IP_MAXPACKET; @@ -596,17 +591,14 @@ netvsc_attach(device_t dev) ifp->if_hw_tsomaxsegsize = PAGE_SIZE; ifp->if_hw_tsomax = tso_maxlen - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); -#endif error = hn_rndis_get_eaddr(sc, eaddr); if (error) goto failed; ether_ifattach(ifp, eaddr); -#if __FreeBSD_version >= 1100045 if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); -#endif hn_set_chim_size(sc, sc->hn_chim_szmax); if (hn_tx_chimney_size > 0 &&