summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2013-06-03 13:00:33 +0000
committerandre <andre@FreeBSD.org>2013-06-03 13:00:33 +0000
commitad87662b891760b05f177fb279f8bc65c1665fa9 (patch)
treea810e154888fb0873176a1642164d02b9bac3572 /sys/dev/xen
parentb706ceb4abd7f12c0ad38c0da053f4523814bcc4 (diff)
downloadFreeBSD-src-ad87662b891760b05f177fb279f8bc65c1665fa9.zip
FreeBSD-src-ad87662b891760b05f177fb279f8bc65c1665fa9.tar.gz
Specify a maximum TSO length limiting the segment chain to what the
Xen host side can handle after defragmentation. This prevents the driver from throwing away too long TSO chains and improves the performance on Amazon AWS instances with 10GigE virtual interfaces to the normally expected throughput. Submitted by: cperciva (earlier version) Reviewed by: cperciva Tested by: cperciva MFC after: 1 week
Diffstat (limited to 'sys/dev/xen')
-rw-r--r--sys/dev/xen/netfront/netfront.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index 6e3260d..f2dc3ac 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
@@ -2122,6 +2123,7 @@ create_netdev(device_t dev)
ifp->if_hwassist = XN_CSUM_FEATURES;
ifp->if_capabilities = IFCAP_HWCSUM;
+ ifp->if_hw_tsomax = NF_TSO_MAXBURST;
ether_ifattach(ifp, np->mac);
callout_init(&np->xn_stat_ch, CALLOUT_MPSAFE);
OpenPOWER on IntegriCloud