Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
Show First 20 Lines • Show All 623 Lines • ▼ Show 20 Lines | if (tso_maxlen <= 0 || tso_maxlen > IP_MAXPACKET) | ||||
tso_maxlen = IP_MAXPACKET; | tso_maxlen = IP_MAXPACKET; | ||||
ifp->if_hw_tsomaxsegcount = HN_TX_DATA_SEGCNT_MAX; | ifp->if_hw_tsomaxsegcount = HN_TX_DATA_SEGCNT_MAX; | ||||
ifp->if_hw_tsomaxsegsize = PAGE_SIZE; | ifp->if_hw_tsomaxsegsize = PAGE_SIZE; | ||||
ifp->if_hw_tsomax = tso_maxlen - | ifp->if_hw_tsomax = tso_maxlen - | ||||
(ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); | (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); | ||||
ether_ifattach(ifp, eaddr); | ether_ifattach(ifp, eaddr); | ||||
if (bootverbose) { | |||||
if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, | if_printf(ifp, "TSO: %u/%u/%u\n", ifp->if_hw_tsomax, | ||||
ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); | ifp->if_hw_tsomaxsegcount, ifp->if_hw_tsomaxsegsize); | ||||
} | |||||
/* Inform the upper layer about the long frame support. */ | /* Inform the upper layer about the long frame support. */ | ||||
ifp->if_hdrlen = sizeof(struct ether_vlan_header); | ifp->if_hdrlen = sizeof(struct ether_vlan_header); | ||||
return (0); | return (0); | ||||
failed: | failed: | ||||
/* TODO: reuse netvsc_detach() */ | /* TODO: reuse netvsc_detach() */ | ||||
hn_destroy_tx_data(sc); | hn_destroy_tx_data(sc); | ||||
▲ Show 20 Lines • Show All 2,814 Lines • Show Last 20 Lines |