PERFORCE change 125126 for review

Kip Macy kmacy at FreeBSD.org
Mon Aug 13 17:16:31 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=125126

Change 125126 by kmacy at kmacy_home:ethng on 2007/08/14 00:15:29

	track rss_hash as queue cookie so that tx goes out on the same cpu/queue as rx

Affected files ...

.. //depot/projects/ethng/src/sys/netinet/tcp_input.c#2 edit
.. //depot/projects/ethng/src/sys/netinet/tcp_output.c#2 edit

Differences ...

==== //depot/projects/ethng/src/sys/netinet/tcp_input.c#2 (text+ko) ====

@@ -632,6 +632,7 @@
 			INP_UNLOCK(inp);	/* listen socket */
 			inp = sotoinpcb(so);
 			INP_LOCK(inp);		/* new connection */
+			inp->inp_rss_hash = m->m_pkthdr.rss_hash;
 			tp = intotcpcb(inp);
 			KASSERT(tp->t_state == TCPS_SYN_RECEIVED,
 			    ("%s: ", __func__));
@@ -833,8 +834,8 @@
 		 */
 		INP_INFO_UNLOCK_ASSERT(&tcbinfo);
 		return;
-	}
-
+	} else if (inp->inp_rss_hash != m->m_pkthdr.rss_hash && m->m_pkthdr.rss_hash)
+		inp->inp_rss_hash = m->m_pkthdr.rss_hash;
 	/*
 	 * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later
 	 * state.  tcp_do_segment() always consumes the mbuf chain, unlocks

==== //depot/projects/ethng/src/sys/netinet/tcp_output.c#2 (text+ko) ====

@@ -1122,6 +1122,7 @@
 	if (path_mtu_discovery)
 		ip->ip_off |= IP_DF;
 
+	m->m_pkthdr.rss_hash = tp->t_inpcb->inp_rss_hash;
 	error = ip_output(m, tp->t_inpcb->inp_options, NULL,
 	    ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0,
 	    tp->t_inpcb);


More information about the p4-projects mailing list