Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Dec 2021 16:23:06 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: cb3772639fd0 - main - tcptw: remove unused fields
Message-ID:  <202112191623.1BJGN64N006762@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=cb3772639fd0eb74961ff94248d448f5c7f035a9

commit cb3772639fd0eb74961ff94248d448f5c7f035a9
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2021-12-19 16:22:12 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2021-12-19 16:22:12 +0000

    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 b0ab3e02c61f..f0ab77100336 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 57d7352b8f11..6b121a7fd311 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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112191623.1BJGN64N006762>