aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2021-04-27 17:43:56 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2021-10-18 17:06:39 +0000
commit5a78df20ce77e418503d0264d3daa26487908b1f (patch)
tree90666c66268722f9db00ba5af48d6deb09d23780 /sys/netinet
parent8c22b9f3ba586e008e8e55a6215a1d46eb6830b9 (diff)
downloadsrc-5a78df20ce77e418503d0264d3daa26487908b1f.tar.gz
src-5a78df20ce77e418503d0264d3daa26487908b1f.zip
in_pcb: garbage collect unused structure in_pcblist
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_pcb.c22
-rw-r--r--sys/netinet/in_pcb.h8
2 files changed, 0 insertions, 30 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 189f73028198..fc2914730e43 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1665,28 +1665,6 @@ in_pcbrele(struct inpcb *inp)
return (in_pcbrele_wlocked(inp));
}
-void
-in_pcblist_rele_rlocked(epoch_context_t ctx)
-{
- struct in_pcblist *il;
- struct inpcb *inp;
- struct inpcbinfo *pcbinfo;
- int i, n;
-
- il = __containerof(ctx, struct in_pcblist, il_epoch_ctx);
- pcbinfo = il->il_pcbinfo;
- n = il->il_count;
- INP_INFO_WLOCK(pcbinfo);
- for (i = 0; i < n; i++) {
- inp = il->il_inp_list[i];
- INP_RLOCK(inp);
- if (!in_pcbrele_rlocked(inp))
- INP_RUNLOCK(inp);
- }
- INP_INFO_WUNLOCK(pcbinfo);
- free(il, M_TEMP);
-}
-
static void
inpcbport_free(epoch_context_t ctx)
{
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index c20c516628b8..77a99e666663 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -407,13 +407,6 @@ struct inpcbport {
u_short phd_port;
};
-struct in_pcblist {
- int il_count;
- struct epoch_context il_epoch_ctx;
- struct inpcbinfo *il_pcbinfo;
- struct inpcb *il_inp_list[0];
-};
-
/*-
* Global data structure for each high-level protocol (UDP, TCP, ...) in both
* IPv4 and IPv6. Holds inpcb lists and information for managing them.
@@ -872,7 +865,6 @@ void in_pcbrehash_mbuf(struct inpcb *, struct mbuf *);
int in_pcbrele(struct inpcb *);
int in_pcbrele_rlocked(struct inpcb *);
int in_pcbrele_wlocked(struct inpcb *);
-void in_pcblist_rele_rlocked(epoch_context_t ctx);
void in_losing(struct inpcb *);
void in_pcbsetsolabel(struct socket *so);
int in_getpeeraddr(struct socket *so, struct sockaddr **nam);