Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2015 13:36:38 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r278513 - stable/9/sys/netinet
Message-ID:  <201502101336.t1ADacrn005377@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Feb 10 13:36:37 2015
New Revision: 278513
URL: https://svnweb.freebsd.org/changeset/base/278513

Log:
  MFC r278103:
  The flowid and hashtype should be copied from the originating packet
  when fragmenting IP packets to preserve the order of the packets in a
  stream. Else the resulting fragments can be sent out of order when the
  hardware supports multiple transmit rings.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/9/sys/netinet/ip_output.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/ip_output.c
==============================================================================
--- stable/9/sys/netinet/ip_output.c	Tue Feb 10 13:34:45 2015	(r278512)
+++ stable/9/sys/netinet/ip_output.c	Tue Feb 10 13:36:37 2015	(r278513)
@@ -787,7 +787,11 @@ smart_frag_failure:
 			IPSTAT_INC(ips_odropped);
 			goto done;
 		}
-		m->m_flags |= (m0->m_flags & M_MCAST) | M_FRAG;
+		/* copy multicast and flowid flag, if any */
+		m->m_flags |= (m0->m_flags & (M_FLOWID | M_MCAST)) | M_FRAG;
+		/* make sure the flowid is the same for the fragmented mbufs */
+		M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0));
+		m->m_pkthdr.flowid = m0->m_pkthdr.flowid;
 		/*
 		 * In the first mbuf, leave room for the link header, then
 		 * copy the original IP header including options. The payload



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502101336.t1ADacrn005377>