Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142260489
D37125.id112196.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D37125.id112196.diff
View Options
diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c
--- a/sys/kern/uipc_ktls.c
+++ b/sys/kern/uipc_ktls.c
@@ -1748,7 +1748,7 @@
if (!in_pcbrele_wlocked(inp)) {
if (!(inp->inp_flags & INP_DROPPED)) {
tp = intotcpcb(inp);
- CURVNET_SET(tp->t_vnet);
+ CURVNET_SET(inp->inp_vnet);
tp = tcp_drop(tp, ECONNABORTED);
CURVNET_RESTORE();
if (tp != NULL)
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -2260,9 +2260,6 @@
}
#endif
-#ifdef VIMAGE
- tp->t_vnet = inp->inp_vnet;
-#endif
tp->t_timers = &tm->tt;
TAILQ_INIT(&tp->t_segq);
tp->t_maxseg =
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -252,9 +252,9 @@
struct tcpcb *tp = xtp;
struct inpcb *inp = tptoinpcb(tp);
- CURVNET_SET(tp->t_vnet);
-
INP_WLOCK(inp);
+ CURVNET_SET(inp->inp_vnet);
+
if (callout_pending(&tp->t_timers->tt_delack) ||
!callout_active(&tp->t_timers->tt_delack)) {
INP_WUNLOCK(inp);
@@ -316,7 +316,6 @@
{
struct tcpcb *tp = xtp;
struct inpcb *inp = tptoinpcb(tp);
- CURVNET_SET(tp->t_vnet);
#ifdef TCPDEBUG
int ostate;
@@ -324,6 +323,8 @@
#endif
INP_WLOCK(inp);
+ CURVNET_SET(inp->inp_vnet);
+
tcp_log_end_status(tp, TCP_EI_STATUS_2MSL);
tcp_free_sackholes(tp);
if (callout_pending(&tp->t_timers->tt_2msl) ||
@@ -392,7 +393,6 @@
struct tcpcb *tp = xtp;
struct inpcb *inp = tptoinpcb(tp);
struct tcptemp *t_template;
- CURVNET_SET(tp->t_vnet);
#ifdef TCPDEBUG
int ostate;
@@ -400,6 +400,8 @@
#endif
INP_WLOCK(inp);
+ CURVNET_SET(inp->inp_vnet);
+
if (callout_pending(&tp->t_timers->tt_keep) ||
!callout_active(&tp->t_timers->tt_keep)) {
INP_WUNLOCK(inp);
@@ -535,7 +537,6 @@
struct inpcb *inp = tptoinpcb(tp);
bool progdrop;
int outrv;
- CURVNET_SET(tp->t_vnet);
#ifdef TCPDEBUG
int ostate;
@@ -543,6 +544,8 @@
#endif
INP_WLOCK(inp);
+ CURVNET_SET(inp->inp_vnet);
+
if (callout_pending(&tp->t_timers->tt_persist) ||
!callout_active(&tp->t_timers->tt_persist)) {
INP_WUNLOCK(inp);
@@ -615,7 +618,6 @@
{
struct epoch_tracker et;
struct tcpcb *tp = xtp;
- CURVNET_SET(tp->t_vnet);
struct inpcb *inp = tptoinpcb(tp);
int rexmt, outrv;
bool isipv6;
@@ -626,6 +628,8 @@
#endif
INP_WLOCK(inp);
+ CURVNET_SET(inp->inp_vnet);
+
if (callout_pending(&tp->t_timers->tt_rexmt) ||
!callout_active(&tp->t_timers->tt_rexmt)) {
INP_WUNLOCK(inp);
@@ -1086,8 +1090,8 @@
struct tcpcb *tp = (struct tcpcb *)ptp;
struct inpcb *inp = tptoinpcb(tp);
- CURVNET_SET(tp->t_vnet);
INP_WLOCK(inp);
+ CURVNET_SET(inp->inp_vnet);
NET_EPOCH_ENTER(et);
KASSERT((tp->t_timers->tt_flags & TT_STOPPED) != 0,
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -181,7 +181,6 @@
struct mbuf *t_in_pkt;
struct mbuf *t_tail_pkt;
struct tcp_timer *t_timers; /* All the TCP timers in one struct */
- struct vnet *t_vnet; /* back pointer to parent vnet */
uint32_t snd_ssthresh; /* snd_cwnd size threshold for
* for slow start exponential to
* linear switch
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 18, 10:08 PM (1 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27720787
Default Alt Text
D37125.id112196.diff (3 KB)
Attached To
Mode
D37125: tcp: don't store VNET in every tcpcb, take it from the inpcbinfo
Attached
Detach File
Event Timeline
Log In to Comment