Page MenuHomeFreeBSD

D37125.1785291626.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D37125.1785291626.diff

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
@@ -254,9 +254,9 @@
struct inpcb *inp = tptoinpcb(tp);
#endif
- 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);
@@ -318,7 +318,6 @@
{
struct tcpcb *tp = xtp;
struct inpcb *inp = tptoinpcb(tp);
- CURVNET_SET(tp->t_vnet);
#ifdef TCPDEBUG
int ostate;
@@ -326,6 +325,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) ||
@@ -394,7 +395,6 @@
struct tcpcb *tp = xtp;
struct inpcb *inp = tptoinpcb(tp);
struct tcptemp *t_template;
- CURVNET_SET(tp->t_vnet);
#ifdef TCPDEBUG
int ostate;
@@ -402,6 +402,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);
@@ -539,7 +541,6 @@
#endif
bool progdrop;
int outrv;
- CURVNET_SET(tp->t_vnet);
#ifdef TCPDEBUG
int ostate;
@@ -547,6 +548,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);
@@ -619,7 +622,6 @@
{
struct epoch_tracker et;
struct tcpcb *tp = xtp;
- CURVNET_SET(tp->t_vnet);
struct inpcb *inp = tptoinpcb(tp);
int rexmt, outrv;
bool isipv6;
@@ -630,6 +632,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);
@@ -1090,8 +1094,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

Mime Type
text/plain
Expires
Wed, Jul 29, 2:20 AM (10 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29299647
Default Alt Text
D37125.1785291626.diff (3 KB)

Event Timeline