svn commit: r267722 - stable/10/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sun Jun 22 16:26:17 UTC 2014


Author: tuexen
Date: Sun Jun 22 16:26:16 2014
New Revision: 267722
URL: http://svnweb.freebsd.org/changeset/base/267722

Log:
  MFC r263096:
  
  Put the offset of the CRC32C in csum_data instead of 0.
  The virtio driver needs the offset to be stored in csum_data,
  like in the case for UDP and TCP.
  
  The virtio problem was reported by
  Niu Zhixiong <kaiaixi at gmail.com>, who helped in debugging
  and testing the patch.

Modified:
  stable/10/sys/netinet/sctp_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sun Jun 22 16:22:44 2014	(r267721)
+++ stable/10/sys/netinet/sctp_output.c	Sun Jun 22 16:26:16 2014	(r267722)
@@ -4108,7 +4108,7 @@ sctp_lowlevel_chunk_output(struct sctp_i
 				SCTP_STAT_INCR(sctps_sendnocrc);
 #else
 				m->m_pkthdr.csum_flags = CSUM_SCTP;
-				m->m_pkthdr.csum_data = 0;
+				m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum);
 				SCTP_STAT_INCR(sctps_sendhwcrc);
 #endif
 			}
@@ -4457,7 +4457,7 @@ sctp_lowlevel_chunk_output(struct sctp_i
 				SCTP_STAT_INCR(sctps_sendnocrc);
 #else
 				m->m_pkthdr.csum_flags = CSUM_SCTP_IPV6;
-				m->m_pkthdr.csum_data = 0;
+				m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum);
 				SCTP_STAT_INCR(sctps_sendhwcrc);
 #endif
 			}
@@ -11007,7 +11007,7 @@ sctp_send_resp_msg(struct sockaddr *src,
 			SCTP_STAT_INCR(sctps_sendnocrc);
 #else
 			mout->m_pkthdr.csum_flags = CSUM_SCTP;
-			mout->m_pkthdr.csum_data = 0;
+			mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum);
 			SCTP_STAT_INCR(sctps_sendhwcrc);
 #endif
 		}
@@ -11037,7 +11037,7 @@ sctp_send_resp_msg(struct sockaddr *src,
 			SCTP_STAT_INCR(sctps_sendnocrc);
 #else
 			mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6;
-			mout->m_pkthdr.csum_data = 0;
+			mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum);
 			SCTP_STAT_INCR(sctps_sendhwcrc);
 #endif
 		}


More information about the svn-src-stable mailing list