svn commit: r278513 - stable/9/sys/netinet

Hans Petter Selasky hselasky at FreeBSD.org
Tue Feb 10 13:36:38 UTC 2015


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


More information about the svn-src-stable-9 mailing list