commit 5cda06d55bf533abf65636a08446002ffa455fb6 Author: Ryan Stone Date: Thu Mar 23 13:49:14 2017 ixl: Use new interface to limit TSO segs per mss diff --git a/sys/dev/ixl/if_ixlv.c b/sys/dev/ixl/if_ixlv.c index 390ef51e5ce8..676bafce65f3 100644 --- a/sys/dev/ixl/if_ixlv.c +++ b/sys/dev/ixl/if_ixlv.c @@ -1573,6 +1573,12 @@ ixlv_setup_interface(device_t dev, struct ixlv_sc *sc) ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN; + /* Set TSO limits */ + ifp->if_hw_tsomax = IP_MAXPACKET - (ETHER_HDR_LEN + ETHER_CRC_LEN); + ifp->if_hw_tsomaxsegcount = IXL_MAX_TSO_SEGS; + ifp->if_hw_tsomaxsegsize = PAGE_SIZE; + ifp->if_hw_tsomaxsegpermss = IXL_MAX_TX_SEGS; + /* * Tell the upper layer(s) we support long frames. */ diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index fa271d434ec4..57282e1b9f47 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -1917,6 +1917,7 @@ ixl_setup_interface(device_t dev, struct ixl_vsi *vsi) ifp->if_hw_tsomax = IP_MAXPACKET - (ETHER_HDR_LEN + ETHER_CRC_LEN); ifp->if_hw_tsomaxsegcount = IXL_MAX_TSO_SEGS; ifp->if_hw_tsomaxsegsize = PAGE_SIZE; + ifp->if_hw_tsomaxsegpermss = IXL_SPARSE_CHAIN; /* * Tell the upper layer(s) we support long frames. diff --git a/sys/dev/ixl/ixl_txrx.c b/sys/dev/ixl/ixl_txrx.c index 3501ebc4cd50..36d806eee4c6 100644 --- a/sys/dev/ixl/ixl_txrx.c +++ b/sys/dev/ixl/ixl_txrx.c @@ -215,6 +215,7 @@ ixl_qflush(struct ifnet *ifp) static inline bool ixl_tso_detect_sparse(struct mbuf *mp) { +#if __FreeBSD_version < 1200053 struct mbuf *m; int num, mss; @@ -235,6 +236,7 @@ ixl_tso_detect_sparse(struct mbuf *mp) mss += mp->m_pkthdr.tso_segsz; } } +#endif return (false); }