Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Feb 2014 06:29:06 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r261705 - stable/10/sys/netinet
Message-ID:  <201402100629.s1A6T6cC055898@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Mon Feb 10 06:29:05 2014
New Revision: 261705
URL: http://svnweb.freebsd.org/changeset/base/261705

Log:
  MFC r260871:
  
    If the flowid is available for the mbuf that finalised the creation
    of a syncache connection, copy it into the inp_flowid field.
  
    Without this, an incoming TCP connection won't have an inp_flowid marked
    until some data comes in, and this means that things like the per-CPU
    TCP timer option will choose a different CPU for the timer work.
    (It also means that if one grabbed the flowid via an ioctl from userland,
    it won't be available until some data has been received.)
  
  Sponsored by:	Netflix, Inc.

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

Modified: stable/10/sys/netinet/tcp_syncache.c
==============================================================================
--- stable/10/sys/netinet/tcp_syncache.c	Mon Feb 10 05:37:04 2014	(r261704)
+++ stable/10/sys/netinet/tcp_syncache.c	Mon Feb 10 06:29:05 2014	(r261705)
@@ -721,6 +721,16 @@ syncache_socket(struct syncache *sc, str
 #endif
 
 	/*
+	 * If there's an mbuf and it has a flowid, then let's initialise the
+	 * inp with that particular flowid.
+	 */
+	if (m != NULL && m->m_flags & M_FLOWID) {
+		inp->inp_flags |= INP_HW_FLOWID;
+		inp->inp_flags &= ~INP_SW_FLOWID;
+		inp->inp_flowid = m->m_pkthdr.flowid;
+	}
+
+	/*
 	 * Install in the reservation hash table for now, but don't yet
 	 * install a connection group since the full 4-tuple isn't yet
 	 * configured.



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