Date: Fri, 26 Oct 2012 16:52:56 +0000 (UTC) From: Andre Oppermann <andre@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242148 - user/andre/tcp_workqueue/sys/netinet Message-ID: <201210261652.q9QGqu4g044224@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andre Date: Fri Oct 26 16:52:56 2012 New Revision: 242148 URL: http://svn.freebsd.org/changeset/base/242148 Log: Revert r242001. All NICs supporting TSO also support doing DMA chains larger than 64K and hacking around it in TCP is not correct. The correct fix is within the drivers artificially limiting their DMA chain length. Discussed with: yongari Modified: user/andre/tcp_workqueue/sys/netinet/tcp_output.c Modified: user/andre/tcp_workqueue/sys/netinet/tcp_output.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_output.c Fri Oct 26 16:47:52 2012 (r242147) +++ user/andre/tcp_workqueue/sys/netinet/tcp_output.c Fri Oct 26 16:52:56 2012 (r242148) @@ -772,12 +772,9 @@ send: * Limit a burst to IP_MAXPACKET minus IP, * TCP and options length to keep ip->ip_len * from overflowing. - * Deduct max_linkhdr as well to prevent the - * eventual DMA chain from exceeding IP_MAXPACKET - * (64K) as well. */ - if (len > IP_MAXPACKET - (hdrlen + max_linkhdr)) { - len = IP_MAXPACKET - (hdrlen + max_linkhdr); + if (len > IP_MAXPACKET - hdrlen) { + len = IP_MAXPACKET - hdrlen; sendalot = 1; } @@ -808,7 +805,7 @@ send: } else tso = 0; - KASSERT(len + hdrlen + ipoptlen + max_linkhdr <= IP_MAXPACKET, + KASSERT(len + hdrlen + ipoptlen <= IP_MAXPACKET, ("%s: len > IP_MAXPACKET", __func__)); /*#ifdef DIAGNOSTIC*/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210261652.q9QGqu4g044224>