summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-02-10 13:29:44 +0000
committerhselasky <hselasky@FreeBSD.org>2015-02-10 13:29:44 +0000
commit4d9a35d0313c32e03f0564a23193edc97a1c1c2a (patch)
treefc9a1e87417cc03a6e82cbf314dc3a19c8ac40bc /sys/netinet
parentae29368fe4698203628d19c4b9b22da6042720fb (diff)
downloadFreeBSD-src-4d9a35d0313c32e03f0564a23193edc97a1c1c2a.zip
FreeBSD-src-4d9a35d0313c32e03f0564a23193edc97a1c1c2a.tar.gz
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
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index aacfeac..18bb7cd 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -798,6 +798,10 @@ smart_frag_failure:
IPSTAT_INC(ips_odropped);
goto done;
}
+ /* 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;
+ /* copy multicast flag, if any */
m->m_flags |= (m0->m_flags & M_MCAST);
/*
* In the first mbuf, leave room for the link header, then
OpenPOWER on IntegriCloud