summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen/netfront/netfront.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/xen/netfront/netfront.c')
-rw-r--r--sys/dev/xen/netfront/netfront.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index 1fadee4..9ff872c 100644
--- a/sys/dev/xen/netfront/netfront.c
+++ b/sys/dev/xen/netfront/netfront.c
@@ -134,6 +134,7 @@ static const int MODPARM_rx_flip = 0;
* to mirror the Linux MAX_SKB_FRAGS constant.
*/
#define MAX_TX_REQ_FRAGS (65536 / PAGE_SIZE + 2)
+#define NF_TSO_MAXBURST ((IP_MAXPACKET / PAGE_SIZE) * MCLBYTES)
#define RX_COPY_THRESHOLD 256
@@ -2101,10 +2102,7 @@ create_netdev(device_t dev)
ifp->if_hwassist = XN_CSUM_FEATURES;
ifp->if_capabilities = IFCAP_HWCSUM;
- ifp->if_hw_tsomax = IF_HW_TSOMAX_BUILD_VALUE(
- 65535 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* bytes */,
- MAX_TX_REQ_FRAGS /* maximum frag count */,
- PAGE_SHIFT /* PAGE_SIZE frag size */);
+ ifp->if_hw_tsomax = NF_TSO_MAXBURST;
ether_ifattach(ifp, np->mac);
callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE);
OpenPOWER on IntegriCloud