Date: Mon, 29 Feb 2016 08:53:53 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296185 - head/sys/dev/hyperv/netvsc Message-ID: <201602290853.u1T8rrFx077448@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sephe Date: Mon Feb 29 08:53:53 2016 New Revision: 296185 URL: https://svnweb.freebsd.org/changeset/base/296185 Log: hyperv/hn: Put LRO aggregation limit settings under FreeBSD version check This simplifies MFC to 10-stable MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5487 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 Mon Feb 29 08:45:07 2016 (r296184) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Feb 29 08:53:53 2016 (r296185) @@ -290,8 +290,10 @@ static void hn_start(struct ifnet *ifp); static void hn_start_txeof(struct hn_tx_ring *); static int hn_ifmedia_upd(struct ifnet *ifp); static void hn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr); +#if __FreeBSD_version >= 1100099 static int hn_lro_lenlim_sysctl(SYSCTL_HANDLER_ARGS); static int hn_lro_ackcnt_sysctl(SYSCTL_HANDLER_ARGS); +#endif static int hn_trust_hcsum_sysctl(SYSCTL_HANDLER_ARGS); static int hn_tx_chimney_size_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rx_stat_ulong_sysctl(SYSCTL_HANDLER_ARGS); @@ -1368,6 +1370,7 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, /* Obtain and record requested MTU */ ifp->if_mtu = ifr->ifr_mtu; +#if __FreeBSD_version >= 1100099 /* * Make sure that LRO aggregation length limit is still * valid, after the MTU change. @@ -1383,6 +1386,7 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, } } NV_UNLOCK(sc); +#endif do { NV_LOCK(sc); @@ -1705,6 +1709,8 @@ hn_watchdog(struct ifnet *ifp) } #endif +#if __FreeBSD_version >= 1100099 + static int hn_lro_lenlim_sysctl(SYSCTL_HANDLER_ARGS) { @@ -1758,6 +1764,8 @@ hn_lro_ackcnt_sysctl(SYSCTL_HANDLER_ARGS return 0; } +#endif + static int hn_trust_hcsum_sysctl(SYSCTL_HANDLER_ARGS) { @@ -2040,8 +2048,10 @@ hn_create_rx_data(struct hn_softc *sc) tcp_lro_init(&rxr->hn_lro); rxr->hn_lro.ifp = sc->hn_ifp; #endif +#if __FreeBSD_version >= 1100099 rxr->hn_lro.lro_length_lim = HN_LRO_LENLIM_DEF; rxr->hn_lro.lro_ackcnt_lim = HN_LRO_ACKCNT_DEF; +#endif #endif /* INET || INET6 */ } @@ -2060,12 +2070,14 @@ hn_create_rx_data(struct hn_softc *sc) CTLTYPE_ULONG | CTLFLAG_RW, sc, __offsetof(struct hn_rx_ring, hn_lro_tried), hn_rx_stat_ulong_sysctl, "LU", "# of LRO tries"); +#if __FreeBSD_version >= 1100099 SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "lro_length_lim", CTLTYPE_UINT | CTLFLAG_RW, sc, 0, hn_lro_lenlim_sysctl, "IU", "Max # of data bytes to be aggregated by LRO"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "lro_ackcnt_lim", CTLTYPE_INT | CTLFLAG_RW, sc, 0, hn_lro_ackcnt_sysctl, "I", "Max # of ACKs to be aggregated by LRO"); +#endif SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "trust_hosttcp", CTLTYPE_INT | CTLFLAG_RW, sc, HN_TRUST_HCSUM_TCP, hn_trust_hcsum_sysctl, "I",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602290853.u1T8rrFx077448>