svn commit: r335317 - head/sys/netinet

Randall Stewart rrs at FreeBSD.org
Mon Jun 18 14:10:13 UTC 2018


Author: rrs
Date: Mon Jun 18 14:10:12 2018
New Revision: 335317
URL: https://svnweb.freebsd.org/changeset/base/335317

Log:
  Move to using the inp->vnet pointer has suggested by lstewart.
  This is far better since the hpts system is using the inp
  as its basis anyway. Unfortunately his comments came late.
  
  Sponsored by:	Netflix Inc.

Modified:
  head/sys/netinet/tcp_hpts.c

Modified: head/sys/netinet/tcp_hpts.c
==============================================================================
--- head/sys/netinet/tcp_hpts.c	Mon Jun 18 13:49:44 2018	(r335316)
+++ head/sys/netinet/tcp_hpts.c	Mon Jun 18 14:10:12 2018	(r335317)
@@ -1216,7 +1216,7 @@ tcp_input_data(struct tcp_hpts_entry *hpts, struct tim
 		inp->inp_in_input = 0;
 		tp = intotcpcb(inp);
 		mtx_unlock(&hpts->p_mtx);
-		CURVNET_SET(tp->t_vnet);
+		CURVNET_SET(inp->inp_vnet);
 		if (drop_reason) {
 			INP_INFO_RLOCK(&V_tcbinfo);
 			ti_locked = TI_RLOCKED;
@@ -1589,7 +1589,7 @@ out_now:
 					getmicrouptime(&sv);
 				cts = tcp_tv_to_usectick(&sv);
 			}
-			CURVNET_SET(tp->t_vnet);
+			CURVNET_SET(inp->inp_vnet);
 			/*
 			 * There is a hole here, we get the refcnt on the
 			 * inp so it will still be preserved but to make


More information about the svn-src-all mailing list