From cb3772639fd0eb74961ff94248d448f5c7f035a9 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Sun, 19 Dec 2021 08:22:12 -0800 Subject: [PATCH] tcptw: remove unused fields The structure goes away anyway, but it would be interesting to know how much memory we used to save with it. So for the record, structure size with this revision is 64 bytes. --- sys/netinet/tcp_timewait.c | 3 --- sys/netinet/tcp_var.h | 5 ----- 2 files changed, 8 deletions(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index b0ab3e02c61..f0ab7710033 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -324,9 +324,6 @@ tcp_twstart(struct tcpcb *tp) tw->snd_nxt = tp->snd_nxt; tw->t_port = tp->t_port; tw->rcv_nxt = tp->rcv_nxt; - tw->iss = tp->iss; - tw->irs = tp->irs; - tw->t_starttime = tp->t_starttime; tw->tw_time = 0; /* XXX diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 57d7352b8f1..6b121a7fd31 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -528,18 +528,13 @@ struct tcptw { t_unused:16; tcp_seq snd_nxt; tcp_seq rcv_nxt; - tcp_seq iss; - tcp_seq irs; u_short last_win; /* cached window value */ short tw_so_options; /* copy of so_options */ struct ucred *tw_cred; /* user credentials */ u_int32_t t_recent; u_int32_t ts_offset; /* our timestamp offset */ - u_int t_starttime; int tw_time; TAILQ_ENTRY(tcptw) tw_2msl; - void *tw_pspare; /* TCP_SIGNATURE */ - u_int *tw_spare; /* TCP_SIGNATURE */ }; #define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb)