From owner-svn-src-stable@FreeBSD.ORG  Sun Jun 22 16:26:17 2014
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id 8DA26AF9;
 Sun, 22 Jun 2014 16:26:17 +0000 (UTC)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 60CE7223A;
 Sun, 22 Jun 2014 16:26:17 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5MGQHJ8035103;
 Sun, 22 Jun 2014 16:26:17 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
 by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5MGQH4v035102;
 Sun, 22 Jun 2014 16:26:17 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201406221626.s5MGQH4v035102@svn.freebsd.org>
From: Michael Tuexen <tuexen@FreeBSD.org>
Date: Sun, 22 Jun 2014 16:26:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r267722 - stable/10/sys/netinet
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable/>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jun 2014 16:26:17 -0000

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@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
 		}