git: 5a78df20ce77 - main - in_pcb: garbage collect unused structure in_pcblist
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 18 Oct 2021 17:33:51 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=5a78df20ce77e418503d0264d3daa26487908b1f commit 5a78df20ce77e418503d0264d3daa26487908b1f Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2021-04-27 17:43:56 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2021-10-18 17:06:39 +0000 in_pcb: garbage collect unused structure in_pcblist --- sys/netinet/in_pcb.c | 22 ---------------------- sys/netinet/in_pcb.h | 8 -------- 2 files changed, 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);