Index: sys/dev/hyperv/netvsc/if_hn.c =================================================================== --- sys/dev/hyperv/netvsc/if_hn.c +++ sys/dev/hyperv/netvsc/if_hn.c @@ -3509,6 +3509,9 @@ return (ENOMEM); } +#if __FreeBSD_version >= 1100000 + sc->hn_tx_ehash_key = m_ether_tcpip_hash_init(); +#endif sc->hn_tx_ring_cnt = ring_cnt; sc->hn_tx_ring_inuse = sc->hn_tx_ring_cnt; @@ -3993,10 +3996,17 @@ #endif /* - * Select the TX ring based on flowid + * Select the TX ring. */ - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { idx = m->m_pkthdr.flowid % sc->hn_tx_ring_inuse; + } +#if __FreeBSD_version >= 1100000 + else { + idx = m_ether_tcpip_hash(MBUF_HASHFLAG_L3 | MBUF_HASHFLAG_L4, + m, sc->hn_tx_ehash_key) % sc->hn_tx_ring_inuse; + } +#endif txr = &sc->hn_tx_ring[idx]; error = drbr_enqueue(ifp, txr->hn_mbuf_br, m); Index: sys/dev/hyperv/netvsc/if_hnvar.h =================================================================== --- sys/dev/hyperv/netvsc/if_hnvar.h +++ sys/dev/hyperv/netvsc/if_hnvar.h @@ -182,6 +182,7 @@ int hn_tx_ring_cnt; int hn_tx_ring_inuse; + uint32_t hn_tx_ehash_key; struct hn_tx_ring *hn_tx_ring; uint8_t *hn_chim;