svn commit: r247104 - head/sys/netinet

Andrew Gallatin gallatin at FreeBSD.org
Thu Feb 21 17:00:36 UTC 2013


Author: gallatin
Date: Thu Feb 21 17:00:35 2013
New Revision: 247104
URL: http://svnweb.freebsd.org/changeset/base/247104

Log:
  Fix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED.
  Specifcially, in_cksum_hdr() returns 0 (not 0xffff) when the IPv4
  checksum is correct. Without this fix, the tcp_lro code will reject
  good IPv4 traffic from drivers that do not implement IPv4 header
  harder csum offload.
  
  Sponsored by: Myricom Inc.
  
  MFC after:	7 days

Modified:
  head/sys/netinet/tcp_lro.c

Modified: head/sys/netinet/tcp_lro.c
==============================================================================
--- head/sys/netinet/tcp_lro.c	Thu Feb 21 16:59:28 2013	(r247103)
+++ head/sys/netinet/tcp_lro.c	Thu Feb 21 17:00:35 2013	(r247104)
@@ -333,7 +333,7 @@ tcp_lro_rx_ipv4(struct lro_ctrl *lc, str
 		}
 	} else {
 		csum = in_cksum_hdr(ip4);
-		if (__predict_false((csum ^ 0xffff) != 0)) {
+		if (__predict_false((csum) != 0)) {
 			lc->lro_bad_csum++;
 			return (TCP_LRO_CANNOT);
 		}


More information about the svn-src-all mailing list