Index: sys/dev/cxgbe/t4_netmap.c =================================================================== --- sys/dev/cxgbe/t4_netmap.c +++ sys/dev/cxgbe/t4_netmap.c @@ -334,6 +334,21 @@ return (rc); } +static void +propagate_capenable_to_hwassist(struct ifnet *ifp) +{ + uint64_t hwassist = ifp->if_hwassist & ~(CSUM_TCP | CSUM_UDP | CSUM_IP | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6); + + if (ifp->if_capenable & IFCAP_TXCSUM) { + hwassist |= CSUM_TCP | CSUM_UDP | CSUM_IP; + } + if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) { + hwassist |= CSUM_TCP_IPV6 | CSUM_UDP_IPV6; + } + ifp->if_hwassist = hwassist; +} + static int cxgbe_netmap_on(struct adapter *sc, struct vi_info *vi, struct ifnet *ifp, struct netmap_adapter *na) @@ -363,6 +378,8 @@ } hwidx = i; + propagate_capenable_to_hwassist(ifp); + /* Must set caps before calling netmap_reset */ nm_set_native_flags(na); @@ -504,6 +521,8 @@ if_printf(ifp, "failed to restore RSS hash/defaultq: %d\n", rc); nm_clear_native_flags(na); + propagate_capenable_to_hwassist(ifp); + for_each_nm_txq(vi, i, nm_txq) { struct sge_qstat *spg = (void *)&nm_txq->desc[nm_txq->sidx];