aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hyperv/netvsc
diff options
context:
space:
mode:
authorSepherosa Ziehau <sephe@FreeBSD.org>2016-11-21 05:41:08 +0000
committerSepherosa Ziehau <sephe@FreeBSD.org>2016-11-21 05:41:08 +0000
commit7960e6ba99d5edacb94b87b4f60be4b0eecd3e5f (patch)
treeb898f38f55b2d0a4ab32cf15034538ef1534cee7 /sys/dev/hyperv/netvsc
parentfdc4f478ed88489f86e72a479843d43a51d684a6 (diff)
Notes
Diffstat (limited to 'sys/dev/hyperv/netvsc')
-rw-r--r--sys/dev/hyperv/netvsc/hn_rndis.c2
-rw-r--r--sys/dev/hyperv/netvsc/if_hn.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/hyperv/netvsc/hn_rndis.c b/sys/dev/hyperv/netvsc/hn_rndis.c
index 1c140f9be4d4d..fa749d31bb965 100644
--- a/sys/dev/hyperv/netvsc/hn_rndis.c
+++ b/sys/dev/hyperv/netvsc/hn_rndis.c
@@ -602,7 +602,6 @@ hn_rndis_conf_offload(struct hn_softc *sc, int mtu)
if ((hwcaps.ndis_lsov2.ndis_ip6_encap & NDIS_OFFLOAD_ENCAP_8023) &&
(hwcaps.ndis_lsov2.ndis_ip6_opts & HN_NDIS_LSOV2_CAP_IP6) ==
HN_NDIS_LSOV2_CAP_IP6) {
-#ifdef notyet
caps |= HN_CAP_TSO6;
params.ndis_lsov2_ip6 = NDIS_OFFLOAD_LSOV2_ON;
@@ -610,7 +609,6 @@ hn_rndis_conf_offload(struct hn_softc *sc, int mtu)
tso_maxsz = hwcaps.ndis_lsov2.ndis_ip6_maxsz;
if (hwcaps.ndis_lsov2.ndis_ip6_minsg > tso_minsg)
tso_minsg = hwcaps.ndis_lsov2.ndis_ip6_minsg;
-#endif
}
sc->hn_ndis_tso_szmax = 0;
sc->hn_ndis_tso_sgmin = 0;
diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index be5aafabd7b98..a5bb790d4d7f0 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -1127,6 +1127,13 @@ hn_attach(device_t dev)
/* Enable all available capabilities by default. */
ifp->if_capenable = ifp->if_capabilities;
+ /*
+ * Disable IPv6 TSO and TXCSUM by default, they still can
+ * be enabled through SIOCSIFCAP.
+ */
+ ifp->if_capenable &= ~(IFCAP_TXCSUM_IPV6 | IFCAP_TSO6);
+ ifp->if_hwassist &= ~(HN_CSUM_IP6_MASK | CSUM_IP6_TSO);
+
if (ifp->if_capabilities & (IFCAP_TSO6 | IFCAP_TSO4)) {
hn_set_tso_maxsize(sc, hn_tso_maxlen, ETHERMTU);
ifp->if_hw_tsomaxsegcount = HN_TX_DATA_SEGCNT_MAX;
@@ -3646,12 +3653,10 @@ hn_fixup_tx_data(struct hn_softc *sc)
csum_assist |= CSUM_IP_TCP;
if (sc->hn_caps & HN_CAP_UDP4CS)
csum_assist |= CSUM_IP_UDP;
-#ifdef notyet
if (sc->hn_caps & HN_CAP_TCP6CS)
csum_assist |= CSUM_IP6_TCP;
if (sc->hn_caps & HN_CAP_UDP6CS)
csum_assist |= CSUM_IP6_UDP;
-#endif
for (i = 0; i < sc->hn_tx_ring_cnt; ++i)
sc->hn_tx_ring[i].hn_csum_assist = csum_assist;